Instructions to use Tinysoft/Cosyvoice2-0.5B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Tinysoft/Cosyvoice2-0.5B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Tinysoft/Cosyvoice2-0.5B-GGUF", filename="cosyvoice.gguf", )
llm.create_chat_completion( messages = "\"The answer to the universe is 42\"" )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Tinysoft/Cosyvoice2-0.5B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Tinysoft/Cosyvoice2-0.5B-GGUF:F16 # Run inference directly in the terminal: llama-cli -hf Tinysoft/Cosyvoice2-0.5B-GGUF:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Tinysoft/Cosyvoice2-0.5B-GGUF:F16 # Run inference directly in the terminal: llama-cli -hf Tinysoft/Cosyvoice2-0.5B-GGUF:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Tinysoft/Cosyvoice2-0.5B-GGUF:F16 # Run inference directly in the terminal: ./llama-cli -hf Tinysoft/Cosyvoice2-0.5B-GGUF:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Tinysoft/Cosyvoice2-0.5B-GGUF:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Tinysoft/Cosyvoice2-0.5B-GGUF:F16
Use Docker
docker model run hf.co/Tinysoft/Cosyvoice2-0.5B-GGUF:F16
- LM Studio
- Jan
- Ollama
How to use Tinysoft/Cosyvoice2-0.5B-GGUF with Ollama:
ollama run hf.co/Tinysoft/Cosyvoice2-0.5B-GGUF:F16
- Unsloth Studio new
How to use Tinysoft/Cosyvoice2-0.5B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Tinysoft/Cosyvoice2-0.5B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Tinysoft/Cosyvoice2-0.5B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Tinysoft/Cosyvoice2-0.5B-GGUF to start chatting
- Docker Model Runner
How to use Tinysoft/Cosyvoice2-0.5B-GGUF with Docker Model Runner:
docker model run hf.co/Tinysoft/Cosyvoice2-0.5B-GGUF:F16
- Lemonade
How to use Tinysoft/Cosyvoice2-0.5B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Tinysoft/Cosyvoice2-0.5B-GGUF:F16
Run and chat with the model
lemonade run user.Cosyvoice2-0.5B-GGUF-F16
List all available models
lemonade list
llm.create_chat_completion(
messages = "\"The answer to the universe is 42\""
)This only works with the token ID directly. The tokenizer is completely busted.
Update: the f16 and q8 now has the bias head. The q6 and q4 doesn't but I'm not sure how usable they are...
CosyVoice also has a rich pre- and post- processing on top of the LLM step, so you can't do TTS out of the box with llamacpp. Nevertheless, the LLM step is the slowest, and switching from pytorch to llamacpp yields 10x perf gain.
- Downloads last month
- 210
16-bit
Model tree for Tinysoft/Cosyvoice2-0.5B-GGUF
Base model
FunAudioLLM/CosyVoice2-0.5B
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Tinysoft/Cosyvoice2-0.5B-GGUF", filename="", )