I checked 1,788 copies of six popular models on Hugging Face. Many carry an old chat layout that can crash some apps or hide the AI's tools. Here's how to check yours.

In a recent development, A note on how I made this: AI tools helped me run these tests and draft this article. The ideas are my own.

If you run AI models on your own computer, you've probably downloaded one from Hugging Face. Search for a popular model like Qwen3-8B and you'll find hundreds of copies, uploaded by different people. Same name, same size. It's natural to assume they're the same thing. (Related: How to train a newly introduced language model from scr...)

They aren't. Each download is a single file that holds two things: the model itself, and a small piece of code that decides how your conversation gets written out for the model to read. (Related: Leveraging Pre-trained Language Model Checkpoints for E...)

Picture a restaurant. The model is the chef. Your app (Ollama, LM Studio, or your own code) is the waiter. The waiter writes every order on a ticket, and the chef can only read tickets in one exact layout. That ticket layout comes printed inside the model file. Engineers call it the chat template.

In a recent development, model makers sometimes improve the ticket layout after release, for example by adding a box for special requests. Copies uploaded before the change keep the old layout forever.

Recent findings suggest that here's what that looks like in practice. Ask Mistral 7B "What's the weather in Adelaide?" and give it a weather tool. With the current layout, the model reads this (simplified):.

With the old layout, which is in the most downloaded copies, it reads this:.

According to recent reports, the tool is simply gone. No error, no warning. The chef never hears about the special request.

I wanted to know how many people are downloading old layouts, and whether it actually changes what the AI does. I tested two common ways to run these files: llama.cpp, and Python code (Hugging Face's transformers library and llama-cpp-python). Ollama and LM Studio have their own template handling, and I didn't test them directly.

Industry observers note that in engineering terms: the ticket layout is the chat template, and the model file is a GGUF file, the format most local AI apps use. Here is how the two fit together.

Your app sends a list of messages: a system prompt, a user turn, maybe a tool call and its result. The model never sees that list. It sees one long string, laid out in exactly the format it was trained on, with special tokens like <|im_start|> or [INST] in the right places.

According to recent reports, the chat template is the small Jinja program that builds that string. The model's authors ship it in the base repo, in tokenizer_config.json or chat_template.jinja. When someone converts the model to GGUF, the template gets copied into the file as tokenizer.chat_template. From then on, the GGUF carries its own copy, frozen at the moment of conversion.

Base repos don't stand still. Authors fix templates after release: a crash on some message shape, a tool-calling format, a whitespace bug. The base repo gets the fix. The GGUF copies don't, unless someone re-uploads them.

So the question is simple: how many GGUF downloads carry a template that builds a different prompt from the one the authors ship today?

The Hub API can return the GGUF metadata for every repo in one listing call, template included. For six popular open model families, I pulled every upload tagged as a quantisation of the base model:.

The tag is set by uploaders, and plenty of fine-tunes, merges and uncensored variants use it too. Those are different models, so I kept only pure repacks, the clean copies: repos whose name is the base model's name plus quantisation words and nothing else. Every headline number below uses those 643 uploads, weighted by their downloads over the last 30 days.

Then, for each family, I walked the base repo's commit history and pulled every version of the official template. That matters: an upload that matches an older official template is stale, not edited, and those are very different stories.

Text comparison turned out to be useless on its own. Unsloth's Qwen3-8B template is 737 characters longer than the current base template, but it builds the same prompt. So I rendered every template against 12 test conversations: a plain question, a system prompt, multi-turn chat, tool definitions, a tool call and its result, parallel calls, thinking switched off, earlier reasoning in the history, and a tool call with null content (which is what the OpenAI API returns, and what most agent loops send straight back).

I rendered each template twice, in two engines:.

Industry observers note that to make sure the API wasn't lying to me, I also read the real file header of 20 uploads with HTTP range requests. All 20 matched the API's template exactly.

Here's the overall result before the details. Each bar is one model, and the colours show how many of its downloads build the official prompt in each engine.

Here's the line that breaks. This is from the template Qwen shipped with Qwen3-8B on 28 April 2025:.

When message.content is null, which it is for an assistant turn that only calls a tool, Python can't run in on it. On 19 May 2025, Qwen fixed the base repo:.

Recent findings suggest that the fix never reached Qwen/Qwen3-8B-GGUF, Qwen's own GGUF repo. It still carries the April template, and it's by far the most downloaded Qwen3-8B GGUF: 848,856 downloads in the last 30 days.

Sources indicate that I checked this with the real libraries, not just my own renderer. With the current base template, transformers 5.24.0 renders the conversation fine. With the template inside Qwen's GGUF, it fails:.

llama-cpp-python 0.3.38, which takes its template from the GGUF by default, fails too:.

Industry observers note that the two errors look different because transformers removes the empty content field before it renders, so the template finds no content at all, while llama-cpp-python passes it on as None. It's the same bug: the old template expects every assistant turn to have text.

Across all Qwen3-8B pure repacks, 84% of downloads carry the stale template. In a Python Jinja stack (transformers, llama-cpp-python, or anything built on them), every one of them breaks the first time your agent sends back a tool call with null content, which is exactly what OpenAI-style clients do.

In a recent development, then I ran the same templates through llama.cpp, and every one of them worked. llama.cpp's own Jinja engine detects what a template can and can't handle and fills the gaps itself, so the stale template builds exactly the same prompt as the fixed one. If you run Qwen3-8B in llama-server, or anything else that uses llama.cpp's own template engine, this bug never touches you.

That's the pattern for the whole study: whether a stale template hurts you depends on the engine you run it in.

Sources indicate that the old template isn't going away, either. 17 Qwen3-8B uploads created after the fix still carry it. Since January 2026 a new one has appeared every month or so, the newest on 6 November 2026.

The two grey dots before the fix are Unsloth and ggml-org. ggml-org later updated its file to Qwen's fixed template, and Unsloth's file has its own edits that build the same prompt as the fix.

Mistral's case is worse, because llama.cpp can't save it.

Mistral updated the v0.3 template five times between May and August 2024. The two most downloaded GGUF uploads (MaziyarPanahi with 60,608 downloads, lmstudio-community with 11,100) still carry the very first version from 22 May 2024. Across all pure repacks, 97% of downloads use a stale Mistral template. Only about 3% get the current one.

In Python Jinja, the old template rejects any system prompt:.

It has been revealed that llama.cpp handles that one by folding the system prompt into the first user turn. But the old template predates Mistral's tool format, and that's where it goes quiet. Send a request with tools and llama.cpp builds a prompt with no tools in it at all. No [AVAILABLE_TOOLS] block, no warning, no error. The model never learns the tools exist. Send a conversation that contains a tool result and you get this instead:.

So with the most popular Mistral uploads, tool calling doesn't fail loudly. It just never happens.

Qwen's own Qwen2.5-7B-Instruct-GGUF (786,204 downloads) carries a template from 18 September 2024. The base repo replaced it the next day. The version in the GGUF shows the model a tool-call example with doubled braces:.

Industry observers note that both engines build the prompt with the doubled braces, so this one reaches everyone: 70% of Qwen2.5-7B GGUF downloads. Whether it changes how well the model calls tools is a question for the next section.

OpenAI's template for gpt-oss went through four versions in its first week. The GGUF uploads froze at different points:.

Sources indicate that the differences are small but real. The current official template puts a blank line after the system message and passes a tool's result as an escaped JSON string. Unsloth's passes the raw JSON. lmstudio's and bartowski's add a blank line at the start of the tools block. One upload drops the Reasoning: medium line completely. 62% of gpt-oss-20b downloads build a different prompt from the current official template, in both engines.

Not every family has this problem. Qwen3.8-27B is the most downloaded model in the study, with 13.8 million downloads of its clean copies in 30 days. Every one of those copies that carries a template builds exactly the official prompt: 183 of 188, and the other 5 have no template at all. So do all 88 Phi-4-mini uploads. Phi-4-mini's template never changed. Qwen3.8-27B's was fixed on release day itself, before the wave of uploads, and its one later edit didn't change any prompt I tested.

That's the real lesson. The risk isn't GGUF, and it isn't any one uploader. It's a template that changed after the first wave of uploads. Uploads made in the first week after a release end up with most of the downloads: 99% for Qwen3-8B, Qwen2.5-7B and gpt-oss-20b, 92% for Mistral and 90% for Qwen3.8-27B. That first week is exactly when authors are still fixing their templates.

In a recent development, here's a small sign of how different these "identical" downloads are. I took the ten most downloaded Qwen3-8B files of the same type (Q4_K_M, a common 4-bit compression level) and computed their digital fingerprints (SHA-256 hashes). Ten files, ten different fingerprints.

Industry observers note that A file's fingerprint covers everything in it, so part of that is metadata: the template text, the model name, notes from the uploader. Different fingerprints don't prove different weights. But each uploader can also compress the model in a different way, and llama.cpp builds exactly the same prompt from every clean Qwen3-8B copy, so any difference in the answers comes from the weights. Does it change the answers?

Industry observers note that I ran Qwen's larger Q8_0 file as a reference, plus eight Q4_K_M files from different uploaders, on an RTX 5090 desktop. Same llama.cpp build, same settings with randomness switched off, Qwen's thinking mode off, and the same 300 tasks:.

Every Q4_K_M file scored between 91.0% and 92.3%, and the Q8_0 reference scored 92.7%. None of those gaps is statistically significant with 300 tasks: the smallest p-value against the reference is 0.18, and the usual bar is 0.05.

Sources indicate that the files don't write word-for-word the same answers, though. The runs themselves are repeatable: Qwen's own file, run twice with the same settings, gave identical replies on all 300 tasks. Most pairs of different files gave identical replies on only 23% to 34% of tasks, mostly the short function calls, and each file got 9 to 13 tasks right or wrong differently from the reference. A rerun changes nothing, so those differences come from the compression itself. They go both ways, so the scores barely move. Two uploads, Aldaris and MaziyarPanahi, gave identical replies on all 300 tasks, so their weights are effectively the same, with different metadata around them.

One useful detail: eaddario's file is 11% smaller and about 8% faster than the rest, with the same score.

So for Qwen3-8B, which uploader compressed the model barely matters. Which template you end up with is a different story.

For the three families where llama.cpp builds a different prompt, I kept the file fixed and swapped only the template:.

It has been revealed that mistral: same weights, two different products. With the template inside the file, the model made zero tool calls in 60 function-calling tasks. It answered in prose, or wrote Python that called nothing. All 20 conversations that contained a tool result came back as HTTP 400. With the current official template swapped in, the same file made a tool call in all 60 tasks, 55 of them correct, and used the tool result correctly in all 20 conversations. Over its 100 tasks (60 function calls, 20 tool results and 20 multi-turn chats), the score went from 12% to 87%: 78 tasks went from wrong to right, and 3 the other way. Rule-keeping across multi-turn chats stayed at 60% either way, because llama.cpp patches the system prompt into the old template.

It has been revealed that qwen2.5 and gpt-oss: nothing I could measure. With the doubled braces, Qwen2.5 actually got one more function-calling task right than with the current template (77 of 80 tasks against 76 of 80, p = 1.0). That isn't a significant difference. gpt-oss scored 92 of 100 with both templates, and not one task changed from right to wrong or back. The wording changed on some replies (95% and 65% stayed identical), but whether the answer was right didn't.

Industry observers note that that's the clearest result in the whole study. A template difference in formatting, like whitespace, braces or how a tool result is quoted, didn't change anything I measured. A template difference in capability, like a tool format the template doesn't know, switches the feature off completely. In llama.cpp it does that without an error.

The short version: check what a template can do, not how it looks. A template that differs by a blank line is probably fine. A template that predates tools, or crashes on null content, isn't.

It has been revealed that if you run GGUF models in Python (llama-cpp-python, or your own Jinja), assume the template in the file can be stale. Pass the base model's template explicitly instead of trusting the file. In llama-cpp-python:.

In a recent development, if you run llama.cpp, you're protected from crashes, not from differences. For tool calling, pass the base template with --chat-template-file, and check the prompt it builds for one of your real requests:.

Industry observers note that if you use Ollama or LM Studio, I didn't test them, because they handle templates their own way. A quick check still works: give the model a tool, ask a question that needs it, and see whether it calls the tool. If it never does, compare its template with the base repo's.

Before you pick an upload, check its template against the base repo's. I turned my scripts into a one-command checker that does this for any GGUF repo on Hugging Face, or a file you already have:.

It tells you if the template is up to date, out of date (and since when) or edited, and indicates which kinds of conversation break. Add --save chat_template.jinja and it writes the current official template, ready for --chat-template-file.

If you upload GGUFs, re-check your template when the base repo changes it. It's a metadata edit, not a re-quantisation.

According to recent reports, and one suggestion for the Hub: it already parses the template out of every GGUF. A small "template differs from base model" note on the model page would catch every case in this article.

Everything is on GitHub at github.com/vanshaj1999/gguf-template-check: the checker, the Hub scan, the renderer, the llama.cpp check, the header check, the benchmark harness and every raw result.

→ Read original article