gguf-template-check
Checks a GGUF model's embedded chat template against the official template history for its base model on the Hugging Face Hub, fetching template versions and optionally saving the current official template.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
gguf-template-check
Is the GGUF model you downloaded still using its official chat template? This checks it in one command.
Every GGUF file carries its own copy of the model's chat template, frozen on the day the file was made. Model authors keep fixing their templates after release, and the copies on Hugging Face don't update. I looked at 1,788 GGUF uploads of six popular models, and for four of them most downloads get a template that differs from the official one today. Sometimes that's harmless. Sometimes it crashes your app the first time the model calls a tool, or quietly drops the tools from the prompt.
The full write-up is on Medium: Your AI Model Isn't Broken. The File You Downloaded Is Out of Date.
Check your model
You need uv. Nothing else to install.
git clone https://github.com/vanshaj1999/gguf-template-check
cd gguf-template-check
# a repo on Hugging Face (the base model is found automatically)
uv run check_template.py bartowski/Qwen_Qwen3-8B-GGUF
# or a file you already have
uv run check_template.py ~/models/Qwen3-8B-Q4_K_M.gguf --base Qwen/Qwen3-8BYou can also skip the clone and run it from PyPI:
uvx gguf-template-check bartowski/Qwen_Qwen3-8B-GGUFThis is what it says about Qwen's own Qwen3-8B GGUF, the most downloaded one:
Checking Qwen/Qwen3-8B-GGUF
Base Qwen/Qwen3-8B
Official 2 template version(s), the current one from 2025-05-19
Result OUT OF DATE. It matches the official template from 2025-04-28.
Qwen/Qwen3-8B has changed it since then (latest change 2025-05-19).
Test conversation This file vs current official
plain question same
system prompt same
...
tool call with null content FAILS: TypeError: argument of type 'NoneType' is not iterable
...It pulls every version of the template from the base model's history and renders each one, plus the one in your file, over 12 test conversations: plain chat, system prompts, tools, tool results, a tool call with null content (what OpenAI-style clients send back), parallel calls and a few reasoning cases. Then it tells you if your file is up to date, out of date (and since when), or edited by the uploader.
If it's out of date, --save chat_template.jinja writes the current official template, and you can hand that to llama.cpp:
llama-server -m model.gguf --jinja --chat-template-file chat_template.jinja--json prints the whole result as JSON, for scripts and agents. --list-local lists the GGUF files in your LM Studio, llama.cpp and Hugging Face cache folders, or in a folder you name (--list-local ~/models).
Use it from your AI agent
The whole checker is also an MCP server. In Claude Code:
claude mcp add gguf-template-check -- uvx --from gguf-template-check gguf-template-check-mcpFor any other MCP client, add this to its config:
{
"mcpServers": {
"gguf-template-check": {
"command": "uvx",
"args": ["--from", "gguf-template-check", "gguf-template-check-mcp"]
}
}
}It exposes five tools: check_gguf_template, check_llama_server, find_local_gguf_models, get_official_template and show_prompt_diff.
Or grab just the skill (it tells the agent when to run the check and how to fix what it finds):
npx skills add vanshaj1999/gguf-template-checkOr install the Claude Code plugin, which bundles the MCP server and the skill:
claude plugin marketplace add vanshaj1999/gguf-template-check
claude plugin install gguf-template-check@vanshaj1999Check a running llama-server
If you already run llama-server, point the checker at it:
uv run check_template.py --server http://127.0.0.1:8080
# needs the base model only when it can't be detected:
uv run check_template.py --server http://127.0.0.1:8080 --base Qwen/Qwen3-0.6BIt reads the server's template from /props, checks that text the same way as above, then POSTs all 12 test conversations to /apply-template and compares the prompts the server really builds.
Two rows usually come back different on purpose: llama.cpp rewrites tool calls whose arguments arrive as a string (what OpenAI-style clients send) and handles the reasoning_content field itself. Those print as different (llama.cpp rewrites this input, expected) and are not a problem. When every row matches, the server needs no fix, even if the template inside the file is old (the checker still tells you, because Python apps reading that file would break). If the tools rows say TOOLS DROPPED, or the tool chats fail, start the server with --jinja.
A few things to know:
It renders templates with Python Jinja, the same way
transformersandllama-cpp-pythondo. llama.cpp has its own template engine and papers over some gaps, so a template that fails here can still work there. Its/apply-templateendpoint shows you the exact prompt it builds, and--serverdoes that comparison for you.I still haven't tested how LM Studio applies templates at runtime.
--list-localfinds its files and the check works on them, and if one is out of date you can paste the official template into that model's Prompt Template setting. Ollama isn't covered at all: it stores its own template and ignores the one inside the GGUF.Gated base models (Llama, Gemma) need a Hugging Face token in
HF_TOKEN.It exits with 1 when the template isn't up to date, so you can drop it into a script. Exit 2 means the check itself failed (bad repo id, missing file, unreachable server).
Related MCP server: nodegrove VRAM: can I run it?
Privacy
The checker has no telemetry and no account. It only talks to:
the Hugging Face Hub, to read the model and template history you ask about (with your
HF_TOKENif you set one)a llama-server, only at the URL you give
--server
It reads the header of local .gguf files, keeps downloaded templates in ~/.cache/gguf-template-check (delete it any time), and writes a file only where you ask it to save a template.
What I found
Share of the last 30 days' downloads (23 Nov 2026, clean repacks only) whose template doesn't build the official prompt, either because the prompt is different or because the template fails:
Model | Python (transformers) | llama.cpp | What goes wrong |
Mistral-7B-Instruct v0.3 | 97% | 97% | Python rejects system prompts. llama.cpp drops tool definitions without a warning and returns HTTP 400 on tool results. |
Qwen3-8B | 84% | 0% | Python crashes on a tool call with |
Qwen2.5-7B-Instruct | 70% | 70% | Doubled braces in the tool-call example. No measurable effect. |
gpt-oss-20b | 62% | 62% | Small formatting differences. No measurable effect. |
Phi-4-mini-instruct | 0% | 0% | |
Qwen3.8-27B | 0% | 0% |

Then I ran the files on an RTX 5090 to see what the differences actually do:
Same file, different template. With the template inside it, lmstudio-community's Mistral 7B file didn't make a single tool call in 60 function-calling tasks, and over its 100 tasks it scored 12%. With the current official template swapped in, the same file called a tool in all 60, got 55 right, and scored 87%. The Qwen2.5 and gpt-oss template differences changed the wording of the replies but not a single right or wrong answer.
Same label, different uploaders. Eight Qwen3-8B Q4_K_M files from different uploaders scored between 91.0% and 92.3% over 300 tasks, against 92.7% for Qwen's Q8_0. None of those gaps is statistically significant. Who made the file barely matters. Which template it carries can matter a lot.

The short version: a difference in formatting (whitespace, braces, quoting) didn't change anything I measured. A difference in capability (a template that predates tool calling) switched the feature off completely.
Reproduce it
Everything I ran is in harness/. In the code, the scan is Test A, the uploader comparison is Test B and the template swap is Test C.
# the scan: every GGUF upload of the six models, about 1,800 Hub requests at roughly one a second
uv run harness/scan.py
python3 harness/analyse_scan.py
# the same templates rendered by llama.cpp (I used build b12359)
# needs llama-server on your PATH and models/Qwen3-0.6B-Q8_0.gguf
uv run harness/engine_render.py
python3 harness/analyse_engine.py --diffs
# check the Hub API against real file headers (20 uploads, range requests only)
uv run harness/gguf_header.py
# the Qwen3-8B crash in the real libraries, and the ten file fingerprints
uv run harness/check_libraries.py
uv run harness/file_hashes.py
# the benchmarks: start llama-server --jinja on a GPU machine first
uv run harness/build_tasks.py
python3 harness/bench.py --run qwen3-8b__unsloth__embedded --base http://127.0.0.1:8090
uv run harness/grade.py --ref qwen3-8b__official-q8__embedded
# charts
uv run harness/figs_scan.py
uv run harness/figs_bench.pyBenchmark settings: greedy decoding, fixed seed, thinking off, at most 2,048 tokens per reply, one file at a time. The 300 tasks are 100 GSM8K, 100 IFEval (graded with Google's checker), 60 BFCL simple function calls, 20 multi-turn rule checks and 20 tool-result checks. results/ has every raw reply, so you can regrade without a GPU.
What's in here
Path | What it is |
| The one-command checker (a small |
| The installable package: CLI, core checks, local model discovery, llama-server check, MCP server |
|
|
| Agent skill: when to run the check and the fixes that work |
| Claude Code plugin and marketplace files |
| MCP Registry metadata |
| Small Hub client with a polite gap between requests (0.2 s for a check, 0.8 s in the study scripts); the study scripts point its disk cache at |
| The 12 test conversations and the transformers-style renderer |
| The scan, plus how "out of date" is decided |
| The llama.cpp side, through |
| Benchmark tasks, runner and grader (Wilson intervals, exact McNemar tests) |
| The null-content crash, reproduced in transformers and llama-cpp-python |
| SHA-256 of the ten most downloaded Qwen3-8B Q4_K_M files, from Hub metadata |
| Offline tests for the package: |
| Scan results, every template I found, rendered prompts and all benchmark replies |
| Charts |
How I sorted the uploads:
Clean repack: the repo name is the base model's name plus quantisation words and nothing else. Fine-tunes, merges and uncensored variants are left out. It's a name rule, so it isn't perfect.
Up to date: builds the same prompt as the current official template for all 12 conversations.
Out of date: builds the same prompts as an older official version from the base repo's history.
Edited: matches no official version.
Licence
My code is MIT. harness/instruction_following_eval/ is Google's IFEval checker (Apache 2.0, licence in that folder), with one change marked in instructions_util.py. The task data comes from GSM8K (MIT), IFEval (Apache 2.0) and BFCL (Apache 2.0). The chat templates in results/ belong to their model authors.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Tests a model or prompt change on your own evals and says if it holds, before your agent ships it.
Free MCP contract auditing for AI agents and developers. Check tool schemas, detect potential breaking changes between versions, and get structured compatibility findings before deployment. Static analysis only.
Create, validate and audit llms.txt, incl. the Lighthouse Agentic Browsing check.
Check user prompts for injection/jailbreaks; your own guard learns from your labels. Works keyless.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to inspect local GGUF model files for structural, template-security, companion-file, and runtime-advisory risks before deployment, returning machine-readable verdicts via seven MCP tools.Apache 2.0
- AlicenseAqualityBmaintenanceChecks whether an open-weight LLM fits your GPU: VRAM for weights, KV cache and overhead at each quantisation, a tokens-per-second ceiling, the longest context that fits, and what would work instead when it doesn't. Reads any Hugging Face repo's config.json. Free, read-only, no API key.6MIT
- AlicenseNot gradedqualityBmaintenanceEnables checking OpenAI, Claude, Gemini and other LLM model IDs against a live catalog to identify deprecated or unknown names and suggest newer replacements. Also lets users search current models by provider, price, context size or tool support, and scan files or folders for outdated IDs.67 npmMIT
- AlicenseAqualityBmaintenanceChecks the MCP server you're building the way clients and agents meet its tool list. It flags what agents misread (vague parameters, writes marked read-only), what breaks clients or prompt caches (tools that appear mid-session, schemas that change on every call), and breaking changes between releases with the version bump they need. Same input, same answer: no LLM involved.6912 npm2MIT