Pengchao Feng, Chao-Hong Tan, Qian Chen, Wen Wang, Xiangang Li, Xie Chen
We propose Efficient Chain-of-Modality Reasoning (ECoM Reasoning), the first framework to introduce compressed reasoning into spoken language models (SLMs). By compressing the textual component so that it jointly serves as speech guidance and reasoning representation, ECoM Reasoning improves reasoning accuracy while using a smaller token budget than the standard Chain-of-Modality (CoM) architecture, which generates intermediate text before speech. To train this capability, we further propose Progressive Compression, a curriculum-based strategy that gradually trains the model from full-form reasoning to compressed reasoning.
If you are using this project inside FunResearch, enter the project directory first:
cd ECoM-ReasoningIf you want to clone only this project from FunResearch, use sparse checkout:
git clone --filter=blob:none --sparse https://github.com/QwenAudio/FunResearch.git
cd FunResearch
git sparse-checkout set ECoM-Reasoning
cd ECoM-ReasoningThen initialise the external dependencies directly:
git clone https://github.com/X-LANCE/SLAM-LLM.git SLAM-LLM
mkdir -p third_party
git clone https://github.com/microsoft/LLMLingua.git third_party/LLMLinguaThen set up the environment:
conda create -n ecom python=3.11 -y && conda activate ecom
pip install -e SLAM-LLM # the slam_llm framework + core deps
pip install -r requirements.txt
# patched LLMLingua (needed by the data-construction script)
git -C third_party/LLMLingua apply ../../patches/llmlingua-dynamiccache.patch
pip install -e third_party/LLMLinguaSLAM-LLM/ and third_party/LLMLingua/ are external dependencies; if their remotes are unreachable,
initialise those directories from your own checkouts.
Run everything from the repo root with the framework on the path:
export PYTHONPATH=./SLAM-LLM/src:$PYTHONPATH- Put model weights under
checkpoints/— seecheckpoints/README.md. - Build the compressed data and point the manifests — see
data/README.md. - Edit the paths at the top of each script, then launch:
bash src/scripts/finetune_com.sh # train
bash src/scripts/inference_com.sh # inference (streaming CosyVoice decoding)