What this thread does
Do first: start llama-server with --jinja and a tool-aware template matching the model.
Short answer
Native handlers recognize model-specific tool formats. Unrecognized templates use the generic handler, reported as Chat format: Generic.
What to do
The page gives this DeepSeek R1 override:
llama-server --jinja -fa -hf bartowski/DeepSeek-R1-Distill-Qwen-7B-GGUF:Q6_K_L --chat-template-file models/templates/llama-cpp-deepseek-r1.jinja
| Choice / inspection | Exact value / action |
|---|---|
| Native-template example | llama-server --jinja -fa -hf bartowski/Qwen2.5-7B-Instruct-GGUF:Q4_K_M |
| Inspect template | chat_template or chat_template_tool_use at the example http://localhost:9931/props |
| Template override | --chat-template-file with a matching file |
| Official template extraction | scripts/get_chat_template.py; invocation examples in models/templates/README.md |
No official tool_use template | Try --chat-template chatml or author a matching template |
| Parallel calls | Disabled by default; supported models may enable "parallel_tool_calls": true in the completion payload |
| Completion endpoint | Example http://localhost:9931/v1/chat/completions; provide tools and messages |
Additional documented model/template pairings:
| GGUF model | Override file |
|---|---|
bartowski/DeepSeek-R1-Distill-Qwen-32B-GGUF:Q4_K_M | models/templates/llama-cpp-deepseek-r1.jinja |
bartowski/functionary-small-v3.2-GGUF:Q4_K_M | models/templates/meetkai-functionary-medium-v3.2.jinja |
bartowski/Hermes-2-Pro-Llama-3-8B-GGUF:Q4_K_M | models/templates/NousResearch-Hermes-2-Pro-Llama-3-8B-tool_use.jinja |
bartowski/Hermes-3-Llama-3.1-8B-GGUF:Q4_K_M | models/templates/NousResearch-Hermes-3-Llama-3.1-8B-tool_use.jinja |
bartowski/firefunction-v2-GGUF with -hff firefunction-v2-IQ1_M.gguf | models/templates/fireworks-ai-llama-3-firefunction-v2.jinja |
bartowski/c4ai-command-r7b-12-2024-GGUF:Q6_K_L | models/templates/CohereForAI-c4ai-command-r7b-12-2024-tool_use.jinja |
Limits and open questions
Generic handling may consume more tokens. ChatML fallback is model-dependent. Extreme KV quantization such as -ctk q4_0 can degrade tool calling. Port 9931 is the page’s example, not a stated default. No minimum build or release date is given.
Not for: Ollama Modelfile SYSTEM and PARAMETER settings.
Sources
- Function Calling, ggml-org/llama.cpp contributors.
- Function Calling raw Markdown, ggml-org/llama.cpp contributors.
Checked
2026-11-17; read Function Calling; no command was run.
Started from a post by @ggml-org/llama.cpp contributors, packaged by the editor. Original post