Instructions to use FlexiSLM/FlexiSLM-7B-Stage1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FlexiSLM/FlexiSLM-7B-Stage1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="FlexiSLM/FlexiSLM-7B-Stage1")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("FlexiSLM/FlexiSLM-7B-Stage1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
FlexiSLM-7B-Stage1
Stage 1 (talker / input-module pre-training) checkpoint for FlexiSLM-7B.
This checkpoint is the default initialization for Stage 2 multi-task LoRA fine-tuning. For end-user inference (TTS / ASR / audio QA / speech-to-speech), use the Stage 2 release instead: FlexiSLM/FlexiSLM-7B-Stage2.
- Paper: arXiv:2606.31247
- Demo: flexislm.github.io
- Code: AmphionTeam/FlexiSLM
- Sibling: FlexiSLM-0_5B-Stage1
This project is in active development. Checkpoints may be overwritten as training continues.
Training stages (reminder)
- Stage 1 (this repo): freeze the Qwen backbone; train Talker, audio embeddings, and input frame-merging.
- Stage 2: train Talker + input modules; adapt Thinker with LoRA → FlexiSLM-7B-Stage2.
- Stage 3: merge Stage 2 LoRA, enable Talker→Thinker connection, full fine-tune.
Use as Stage 2 initialization
Install the code and download shared assets as in the Training Guide.
git clone --recurse-submodules https://github.com/AmphionTeam/FlexiSLM.git
cd FlexiSLM
pip install -r requirements.txt
MODEL_ROOT="$PWD/models"
# Optional local mirror (Stage 2 can also pull the Hub id automatically)
hf download FlexiSLM/FlexiSLM-7B-Stage1 --local-dir "$MODEL_ROOT/FlexiSLM-7B-Stage1"
# Shared encoder / codec + Qwen backbone (see repo README for full list)
hf download FlexiSLM/Qwen2_5-Omni-Audio_Encoder --local-dir "$MODEL_ROOT/Qwen2_5-Omni-Audio_Encoder"
hf download FunAudioLLM/SenseVoiceSmall --local-dir "$MODEL_ROOT/SenseVoiceSmall"
hf download jiaqili3/flexicodec \
12hz_v1_half_config.yaml \
nartts_flexicodec_only.safetensors \
--local-dir "$MODEL_ROOT/FlexiCodec"
hf download Qwen/Qwen2.5-7B-Instruct --local-dir "$MODEL_ROOT/Qwen2.5-7B-Instruct"
config/train_stage2_7B.yaml already sets:
resume_from_checkpoint: FlexiSLM/FlexiSLM-7B-Stage1
Launch Stage 2:
bash scripts/train_stage2_7B.sh
Override on the command line if needed:
bash scripts/train_stage2_7B.sh \
--resume_from_checkpoint FlexiSLM/FlexiSLM-7B-Stage1 \
--output_dir outputs/train_stage2_7B
Hub ids such as FlexiSLM/FlexiSLM-7B-Stage1 are downloaded into models/ when missing.
Inference
Prefer FlexiSLM-7B-Stage2 with checkpoint="stage2_7B" (auto-download or manual). Full Python / batch examples are in the code README.
Citation
@misc{li2026flexislmdynamiccontrollableframe,
title={FlexiSLM: A Dynamic and Controllable Frame Rate Spoken Language Model},
author={Jiaqi Li and Chaoren Wang and Xiaohai Tian and Mingjie Chen and Xinyu Liang and Xu Li and Yufan Lin and Junwen Qiu and Jun Zhang and Lu Lu and Haizhou Li and Zhizheng Wu},
year={2026},
eprint={2606.31247},
archivePrefix={arXiv},
primaryClass={cs.SD},
url={https://arxiv.org/abs/2606.31247},
}
- Downloads last month
- 15