Download required models for LLaMA-Omni 2
mainLLaMA-Omni 2 requires three sets of models to function:
- Whisper-large-v3: The speech encoder.
- CosyVoice 2: The flow-matching model and vocoder.
- LLaMA-Omni2 series: The core speech-language models.
Note: LLaMA-Omni2-0.5B through 14B support English only. LLaMA-Omni2-0.5B through 32B-Bilingual support both English and Chinese.
If you are in China and have connection issues with Hugging Face, set the HF_ENDPOINT environment variable to https://hf-mirror.com before downloading.
# 1. Download Whisper
import whisper
model = whisper.load_model("large-v3", download_root="models/speech_encoder/")
# 2. Download CosyVoice 2 components
huggingface-cli download --resume-download ICTNLP/cosy2_decoder --local-dir models/cosy2_decoder
# 3. Download LLaMA-Omni2 models (Example: 7B Bilingual)
export HF_ENDPOINT=https://hf-mirror.com
model_name=LLaMA-Omni2-7B-Bilingual
huggingface-cli download --resume-download ICTNLP/$model_name --local-dir models/$model_name