Views
No views yet

1git clone https://github.com/ictnlp/LLaMA-Omni2
2cd LLaMA-Omni21conda create -n llama-omni2 python=3.10
2conda activate llama-omni2
3pip install -e .Whisper-large-v3 model.1import whisper
2model = whisper.load_model("large-v3", download_root="models/speech_encoder/")CosyVoice 2.huggingface-cli download --resume-download ICTNLP/cosy2_decoder --local-dir models/cosy2_decoder[!Tip] If you’re experiencing unstable connections to Hugging Face from within China, you can try setting the following in your command line:export HF_ENDPOINT=https://hf-mirror.com
LLaMA-Omni2-0.5B/1.5B/3B/7B/14B support English only, while LLaMA-Omni2-0.5B/1.5B/3B/7B/14B/32B-Bilingual support both English and Chinese.1model_name=LLaMA-Omni2-7B-Bilingual
2huggingface-cli download --resume-download ICTNLP/$model_name --local-dir models/$model_namepython -m llama_omni2.serve.controller --host 0.0.0.0 --port 10000python -m llama_omni2.serve.gradio_web_server --controller http://localhost:10000 --port 8000 --vocoder-dir models/cosy2_decoderpython -m llama_omni2.serve.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40000 --worker http://localhost:40000 --model-path models/$model_name --model-name $model_name1output_dir=examples/$model_name
2mkdir -p $output_dir
3
4python llama_omni2/inference/run_llama_omni2.py \
5 --model_path models/$model_name \
6 --question_file examples/questions.json \
7 --answer_file $output_dir/answers.jsonl \
8 --temperature 0 \
9 --s2s
10
11python llama_omni2/inference/run_cosy2_decoder.py \
12 --input-path $output_dir/answers.jsonl \
13 --output-dir $output_dir/wav \
14 --lang enfengyang@ict.ac.cn.fangqingkai21b@ict.ac.cn.@inproceedings{
fang2025llamaomni2,
title={{LL}a{MA}-{O}mni 2: LLM-based Real-time Spoken Chatbot with Autoregressive Streaming Speech Synthesis},
author={Fang, Qingkai and Zhou, Yan and Guo, Shoutao and Zhang, Shaolei and Feng, Yang},
booktitle = {Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics},
year={2025}
}
@inproceedings{
fang2025llamaomni,
title={{LL}a{MA}-{O}mni: Seamless Speech Interaction with Large Language Models},
author={Qingkai Fang and Shoutao Guo and Yan Zhou and Zhengrui Ma and Shaolei Zhang and Yang Feng},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=PYmrUQmMEw}
}