Instructions to use sarvamai/sarvam-m-q8-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use sarvamai/sarvam-m-q8-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 sarvamai/sarvam-m-q8-gguf:Q8_0 # Run inference directly in the terminal: llama cli -hf sarvamai/sarvam-m-q8-gguf:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf sarvamai/sarvam-m-q8-gguf:Q8_0 # Run inference directly in the terminal: llama cli -hf sarvamai/sarvam-m-q8-gguf:Q8_0
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 sarvamai/sarvam-m-q8-gguf:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf sarvamai/sarvam-m-q8-gguf:Q8_0
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 sarvamai/sarvam-m-q8-gguf:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf sarvamai/sarvam-m-q8-gguf:Q8_0
Use Docker
docker model run hf.co/sarvamai/sarvam-m-q8-gguf:Q8_0
- LM Studio
- Jan
- Ollama
How to use sarvamai/sarvam-m-q8-gguf with Ollama:
ollama run hf.co/sarvamai/sarvam-m-q8-gguf:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use sarvamai/sarvam-m-q8-gguf with Docker Model Runner:
docker model run hf.co/sarvamai/sarvam-m-q8-gguf:Q8_0
- Lemonade
How to use sarvamai/sarvam-m-q8-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sarvamai/sarvam-m-q8-gguf:Q8_0
Run and chat with the model
lemonade run user.sarvam-m-q8-gguf-Q8_0
List all available models
lemonade list
- Atomic Chat
The Template file has a typo in {{.Response}} , only the .onse}} is present , causing model to not respond
TEMPLATE
FROM /usr/share/ollama/.ollama/models/blobs/sha256-4dbf02d64b32375935c4dfab74209fb045f9e2eb268d77bb158737c841c58dfe
TEMPLATE
"{{ if .System }}<*s*>[SYSTEM_PROMPT]Think deeply before answering the user's question. Do the thinking inside ... tags.
{{ .System }}[/SYSTEM_PROMPT]{{ end }}{{ if .Prompt }}[INST]{{ .Prompt }}[/INST]
{{ end }}onse }}<*/s*>"
PARAMETER stop <*s*>
PARAMETER stop
PARAMETER stop [INST]
as you see the onse is present
corrected template
{{ if .System }}<*s*>[SYSTEM_PROMPT]Think deeply before answering the user's question. Do the thinking inside ... tags.
{{ .System }}[/SYSTEM_PROMPT]{{ end }}{{ if .Prompt }}[INST]{{ .Prompt }}[/INST]
{{ .Response }}<*/s*>{{ end }}
Hi @mashriram
We hadn't tested it on ollama. We tried GGUF version directly with llama.cpp, where it was loading the template file correctly.
Will test with ollama and revert, but meanwhile, please try using with llama.cpp.
Hi, I was making an android app, and i am using llm.cpp for it, so I was thinking of using sarvam - m, but it is 25 gb and not good for android platform, so if you guys can share a smaller version, but cutting down the data, like it will be a great help ...
Thank you
