Instructions to use prithivMLmods/VoxCPM2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- VoxCPM
How to use prithivMLmods/VoxCPM2-GGUF with VoxCPM:
import soundfile as sf from voxcpm import VoxCPM model = VoxCPM.from_pretrained("prithivMLmods/VoxCPM2-GGUF") wav = model.generate( text="VoxCPM is an innovative end-to-end TTS model from ModelBest, designed to generate highly expressive speech.", prompt_wav_path=None, # optional: path to a prompt speech for voice cloning prompt_text=None, # optional: reference text cfg_value=2.0, # LM guidance on LocDiT, higher for better adherence to the prompt, but maybe worse inference_timesteps=10, # LocDiT inference timesteps, higher for better result, lower for fast speed normalize=True, # enable external TN tool denoise=True, # enable external Denoise tool retry_badcase=True, # enable retrying mode for some bad cases (unstoppable) retry_badcase_max_times=3, # maximum retrying times retry_badcase_ratio_threshold=6.0, # maximum length restriction for bad case detection (simple but effective), it could be adjusted for slow pace speech ) sf.write("output.wav", wav, 16000) print("saved: output.wav") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use prithivMLmods/VoxCPM2-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf prithivMLmods/VoxCPM2-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf prithivMLmods/VoxCPM2-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf prithivMLmods/VoxCPM2-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf prithivMLmods/VoxCPM2-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf prithivMLmods/VoxCPM2-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf prithivMLmods/VoxCPM2-GGUF:Q4_K_M
Use Docker
docker model run hf.co/prithivMLmods/VoxCPM2-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use prithivMLmods/VoxCPM2-GGUF with Ollama:
ollama run hf.co/prithivMLmods/VoxCPM2-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use prithivMLmods/VoxCPM2-GGUF with Docker Model Runner:
docker model run hf.co/prithivMLmods/VoxCPM2-GGUF:Q4_K_M
- Lemonade
How to use prithivMLmods/VoxCPM2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull prithivMLmods/VoxCPM2-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.VoxCPM2-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
VoxCPM2-GGUF
VoxCPM2 is an open-source, 2-billion-parameter tokenizer-free diffusion autoregressive Text-to-Speech (TTS) model built on the MiniCPM-4 backbone and trained on over 2 million hours of speech data. Supporting 30 languages and 9 Chinese dialects without requiring explicit language tags, it utilizes an asymmetric AudioVAE V2 to generate 48kHz studio-quality audio from 16kHz inputs. Its standout capabilities include Voice Design (creating novel voices solely from natural-language descriptions), Controllable Cloning (cloning voices from short clips with style and emotion steering), and Ultimate Cloning (high-fidelity audio continuation using a reference clip and its transcript). Requiring roughly 8 GB of VRAM, it supports real-time streaming (reaching a Real-Time Factor as low as ~0.13 with Nano-vLLM), offers LoRA and full fine-tuning with as little as 5β10 minutes of data, and is released under a commercially permissive Apache-2.0 license.
Model Files
| File Name | Quant Type | File Size | File Link | Description |
|---|---|---|---|---|
| VoxCPM2.BF16.gguf | BF16 | 2.95 GB | Link | Full BF16 weights. Highest quality, largest file size. |
| VoxCPM2.Q3_K_L.gguf | Q3_K_L | 818 MB | Link | Lower quality but usable, good for low RAM availability. |
| VoxCPM2.Q3_K_M.gguf | Q3_K_M | 759 MB | Link | Low quality, smallest file size. |
| VoxCPM2.Q4_K_M.gguf | Q4_K_M | 916 MB | Link | Good quality, default size for most use cases, recommended. |
| VoxCPM2.Q4_K_S.gguf | Q4_K_S | 874 MB | Link | Slightly lower quality with more space savings, recommended. |
| VoxCPM2.Q5_K_M.gguf | Q5_K_M | 1.06 GB | Link | High quality, recommended. |
| VoxCPM2.Q5_K_S.gguf | Q5_K_S | 1.03 GB | Link | High quality with slight space savings, recommended. |
| VoxCPM2.Q6_K.gguf | Q6_K | 1.21 GB | Link | Very high quality, near perfect, recommended. |
| VoxCPM2.Q8_0.gguf | Q8_0 | 1.57 GB | Link | Extremely high quality, generally unneeded but max available standard quant. |
| VoxCPM2.mmproj-bf16.gguf | mmproj-bf16 | 2.01 GB | Link | Multimodal projection file in BF16 format. Used for audio/voice capabilities. |
Run with llama.cpp
Install dependencies and clone llama.cpp
!pip install transformers huggingface-hub
!git clone https://github.com/ggml-org/llama.cpp.git
%cd /data/llama.cpp
Download GGUF model files
Download the BF16 model and BF16 multimodal projector:
from huggingface_hub import snapshot_download
# Target local directory
local_dir = "./model/VoxCPM2-GGUF"
# Download only the specified files
snapshot_download(
repo_id="prithivMLmods/VoxCPM2-GGUF",
local_dir=local_dir,
allow_patterns=[
"VoxCPM2.BF16.gguf",
"VoxCPM2.mmproj-bf16.gguf",
],
resume_download=True,
)
Build llama-tts
Build the TTS CLI with the CUDA backend enabled:
!cmake --build . --config Release -j$(nproc) --target llama-tts
Text-to-speech generation (GPU offloading)
Run inference using llama-tts with GPU offloading enabled:
!/data/llama.cpp/build/bin/llama-tts \
-m /data/llama.cpp/model/VoxCPM2-GGUF/VoxCPM2.BF16.gguf \
-mm /data/llama.cpp/model/VoxCPM2-GGUF/VoxCPM2.mmproj-bf16.gguf \
-p "VoxCPM2 is a tokenizer-free, diffusion autoregressive Text-to-Speech model with 2 billion parameters, support for 30 languages, and 48 kHz audio output. It is trained on over 2 million hours of multilingual speech data." \
-ngl 99 \
-n 1000 \
--seed 42 \
--output /data/llama.cpp/model/VoxCPM2-GGUF/out.wav
Output
The generated audio file will be saved at:
/data/llama.cpp/model/VoxCPM2-GGUF/out.wav
llama.cpp
LLM inference in C/C++ β https://github.com/ggml-org/llama.cpp
Quantized using llama.cpp by prithivMLmods.
- Downloads last month
- 18
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for prithivMLmods/VoxCPM2-GGUF
Base model
openbmb/VoxCPM2