Mindket

Qwen-Fixed-Chat-Templates

Newversion 1 · updated

Overview

Swaps Qwen's official chat templates for one drop-in Jinja file that fixes rendering errors, cache invalidation, wasted tokens and agent stalls. For people who run Qwen 3.5, 3.6 and 3.8 models locally.

Qwen-Fixed-Chat-Templates is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • A Qwen 3.5, 3.6 or 3.8 model
  • One supported engine such as llama.cpp, LM Studio or vLLM
  • The chat_template.jinja file from this repository
Runs in
  • LM Studio
  • llama.cpp, llama-server and KoboldCPP
  • vLLM and SGLang
  • MLX and oMLX
Start with
pip install -U huggingface_hub
hf download froggeric/Qwen-Fixed-Chat-Templates

Platform

ServerRuns on it

About

What it is

This is a single Jinja chat template, chat_template.jinja, for Qwen 3.5, 3.6 and 3.8 models, including the 3.8 Flash-Next sizes. The author says the official templates break in several ways, such as rendering errors, a KV cache that gets thrown away, wasted tokens, empty think blocks and agents that stall. This version is v22.5.

Who it suits

It suits people who serve Qwen models on their own machines and connect coding agents or chat apps to them.

IndustryWho uses itHow they use itExample
Local AI hobbyEnthusiastsReplace the template in LM Studio for cleaner chatsPasting the file into the prompt template box
Software developmentDevelopersRun coding agents against a local Qwen serverConnecting OpenCode or Claude Code to llama-server
Platform engineeringInference engineersServe Qwen models with vLLM or SGLangSwapping the chat template string in tokenizer_config.json
Model toolingTemplate maintainersCheck which template version a model folder usesRunning the bundled check script

You can skip it if your engine cannot load Hugging Face Jinja templates or you do not use Qwen models.

Where to use it

  • LM Studio
  • llama.cpp, llama-server and KoboldCPP
  • vLLM and SGLang
  • MLX and oMLX
  • Any other engine that reads Hugging Face Jinja templates
Use caseWhoWhat they get back
Agent tool callsAgent usersTool arguments that render without crashes in history
Reasoning controlAPI usersA default of medium effort, with switches for more or none
Cache reuseServer operatorsPrompts that keep the KV cache valid between turns

How to set it up

You need a Qwen model and one of the supported engines. The method depends on the engine you use.

  • A Qwen 3.5, 3.6 or 3.8 model
  • One supported engine such as llama.cpp, LM Studio or vLLM
  • The chat_template.jinja file from this repository
  1. Download the repository files.
  2. For llama.cpp, start llama-server with the template file and the DeepSeek reasoning format.
  3. For LM Studio, open the model, find Prompt Template, replace its contents with the file and save.
  4. For vLLM, replace the chat_template string in tokenizer_config.json with the one-line version, then serve the model with the parsers shown.
pip install -U huggingface_hub
hf download froggeric/Qwen-Fixed-Chat-Templates
llama-server -m your_model.gguf --jinja --chat-template-file chat_template.jinja --reasoning-format deepseek
vllm serve Qwen/Qwen3.8-2.4T-A95B --reasoning-parser qwen3 --tool-call-parser qwen3_xml

How to use it

Once the template is loaded, you chat as normal. Reasoning depth defaults to medium. You can switch it off with enable_thinking set to false or reasoning_effort set to none, or steer it with inline tags typed into the chat.

ToolWhat it does
--chat-template-fileLoads this template into llama-server
--reasoning-format deepseekMoves think blocks into the reasoning_content field of the response
--reasoning-preserveKeeps the prefix KV cache on recent llama.cpp builds
scripts/check_applied.pyInspects model folders and GGUF files for the active template version

Example

You connect a coding agent such as Claude Code to llama-server using the DeepSeek reasoning format. The thinking text goes to its own response field, so it no longer leaks into the text stream and cuts off tool calls.

For newcomers and experts

If you are new to this, a chat template is the recipe that turns your messages into the exact text a model reads. A broken recipe causes odd errors, so a first small try is loading this file in LM Studio.

For people who know the field, the template maps client effort names onto Qwen's levels, so high, max, ultracode and extreme become xhigh, and none or off disables thinking. It also merges consecutive leading system and developer messages and applies two-tier tool error recovery.

  1. Your engine loads chat_template.jinja
  2. Messages and tools are rendered in one format
  3. Reasoning effort is set by default or by a tag
  4. The model replies and thinking is split out

Good to know

The official Qwen 3.8 template defaults to the highest effort, while this one defaults to medium to save tokens and keep the cache stable.

  • License: Apache 2.0
  • Cost to run: none named
  • Data it reaches: only the prompts your engine formats, plus model folders the check script reads
  • Not for: engines that cannot load Hugging Face Jinja templates

README and files

README

Qwen-Fixed-Chat-Templates

Swaps Qwen's official chat templates for one drop-in Jinja file that fixes rendering errors, cache invalidation, wasted tokens and agent stalls. For people who run Qwen 3.5, 3.6 and 3.8 models locally.

Made by froggeric on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

About

What it is: This is a single Jinja chat template, chat_template.jinja, for Qwen 3.5, 3.6 and 3.8 models, including the 3.8 Flash-Next sizes. The author says the official templates break in several ways, such as rendering errors, a KV cache that gets thrown away, wasted tokens, empty think blocks and agents that stall. This version is v22.5.

Who it suits: It suits people who serve Qwen models on their own machines and connect coding agents or chat apps to them.

Industry | Who uses it | How they use it | Example
Local AI hobby | Enthusiasts | Replace the template in LM Studio for cleaner chats | Pasting the file into the prompt template box
Software development | Developers | Run coding agents against a local Qwen server | Connecting OpenCode or Claude Code to llama-server
Platform engineering | Inference engineers | Serve Qwen models with vLLM or SGLang | Swapping the chat template string in tokenizer_config.json
Model tooling | Template maintainers | Check which template version a model folder uses | Running the bundled check script

You can skip it if your engine cannot load Hugging Face Jinja templates or you do not use Qwen models.

Where to use it:

  • LM Studio
  • llama.cpp, llama-server and KoboldCPP
  • vLLM and SGLang
  • MLX and oMLX
  • Any other engine that reads Hugging Face Jinja templates
Use case | Who | What they get back
Agent tool calls | Agent users | Tool arguments that render without crashes in history
Reasoning control | API users | A default of medium effort, with switches for more or none
Cache reuse | Server operators | Prompts that keep the KV cache valid between turns

How to set it up: You need a Qwen model and one of the supported engines. The method depends on the engine you use.

  • A Qwen 3.5, 3.6 or 3.8 model
  • One supported engine such as llama.cpp, LM Studio or vLLM
  • The chat_template.jinja file from this repository
  1. Download the repository files.
  2. For llama.cpp, start llama-server with the template file and the DeepSeek reasoning format.
  3. For LM Studio, open the model, find Prompt Template, replace its contents with the file and save.
  4. For vLLM, replace the chat_template string in tokenizer_config.json with the one-line version, then serve the model with the parsers shown.
pip install -U huggingface_hub
hf download froggeric/Qwen-Fixed-Chat-Templates
llama-server -m your_model.gguf --jinja --chat-template-file chat_template.jinja --reasoning-format deepseek
vllm serve Qwen/Qwen3.8-2.4T-A95B --reasoning-parser qwen3 --tool-call-parser qwen3_xml

How to use it: Once the template is loaded, you chat as normal. Reasoning depth defaults to medium. You can switch it off with enable_thinking set to false or reasoning_effort set to none, or steer it with inline tags typed into the chat.

Tool | What it does
--chat-template-file | Loads this template into llama-server
--reasoning-format deepseek | Moves think blocks into the reasoning_content field of the response
--reasoning-preserve | Keeps the prefix KV cache on recent llama.cpp builds
scripts/check_applied.py | Inspects model folders and GGUF files for the active template version

Example: You connect a coding agent such as Claude Code to llama-server using the DeepSeek reasoning format. The thinking text goes to its own response field, so it no longer leaks into the text stream and cuts off tool calls.

For newcomers and experts: If you are new to this, a chat template is the recipe that turns your messages into the exact text a model reads. A broken recipe causes odd errors, so a first small try is loading this file in LM Studio.

For people who know the field, the template maps client effort names onto Qwen's levels, so high, max, ultracode and extreme become xhigh, and none or off disables thinking. It also merges consecutive leading system and developer messages and applies two-tier tool error recovery.

Your engine loads chat_template.jinja
Messages and tools are rendered in one format
Reasoning effort is set by default or by a tag
The model replies and thinking is split out

Good to know: The official Qwen 3.8 template defaults to the highest effort, while this one defaults to medium to save tokens and keep the cache stable.

  • License: Apache 2.0
  • Cost to run: none named
  • Data it reaches: only the prompts your engine formats, plus model folders the check script reads
  • Not for: engines that cannot load Hugging Face Jinja templates

On Hugging Face, 13 November 2026

  • Library: mlx
  • Downloads in the last 30 days: 0
  • Likes: 1,901
  • License: apache-2.0
  • Fine-tunes: 12
  • Tags: jinja, chat-template, qwen, qwen3.5, qwen3.6, qwen3.8, lm-studio, llama.cpp, vllm, tool-calling, thinking

Links

Get the model

Download its files with Hugging Face's command line:

pip install -U huggingface_hub
hf download froggeric/Qwen-Fixed-Chat-Templates

Then follow the usage in its model card. Nothing in this kit runs by itself.

Files
README.md  5 KB

1 file, 5 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

ProductDownloads, last 30 daysLikesParametersLicenseLast change
Qwen-Fixed-Chat-Templates This page01,901—apache-2.0
Qwen Sharp Chat TemplatesShares chat-template · jinja · lm-studio0502—apache-2.0
Qwen3.6-35B-A3B lododo-Distill-v1.0 (GGUF)Shares qwen3.6 · qwen3.8 · qwen746835.5Bapache-2.0
Qwen3.8-35B-A3B-Distill-GGUFShares qwen3.6 · qwen3.8 · llama.cpp1,337,09727735.5Bapache-2.0
Qwen3.6-35B-A3B-Claude-4.6-Opus-Reasoning-Distilled-GGUFShares qwen3.6 · qwen · llama.cpp17,17929634.7Bapache-2.0
Qwen3.8-27B-NVFP4-DGX-SPARKShares vllm · qwen3.8 · qwen41,3061,12718.2Bapache-2.0
Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

ZetaphorWall Street is growing skeptical of the data center boomAsked my agent to dump this to pastebin from my phone since I won't be home for a while https://pastebin.com/bBXbpDyu Here's the chat template I use: https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templatesdanielwild!! does it include changes and fixes to the chat template too? have seen people trying to consolidate fixes e.g. huggingface.co/froggeric/Qw...3 likessyntaxingCorporate America is getting hooked on open-source AIQwen 3.8 27B is the real deal BUT remember to use froggeric template and/or medium reasoning. https://huggingface.co/froggeric/Qwen-Fixed-Chat-TemplatesSpace Captain Lispegistus 🇪🇺🇧🇬🏴☠️Ok. This makes it actually usable. I don't even need an arc pro, the 9060xt gives me 128k context just on vram. huggingface.co/froggeric/Qw...1 like · 1 replyhadlockShow HN: Running 104GB Qwen3.8-Flash-Next on 48GB Mac with at ~12 tok/sWe are running 35b-A3b with 264k context (the model's default max) using vllm and the "frog" jinja templates: https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates and had good luck. We are mostly running agentic workloads though, rather than coding. 27b has a slightly higher agentic job…Frank Blankhuggingface.co/froggeric/Qw... does a decent job of blunting the qwen thought vomit, but yeaaaah gonna be attempting to run glm 5.3 flash on 280gb of combined memory rigged together on the most unholy setup possible later this week. bottlenecks on bottlenecks on bottlenecks ahead1 replyhadlockGLM-5.3-Flashset thinking to minimal and use these jinja templates: https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates we went from 62% completion to 92% using a claude code harnessdanielas of right now there are also still issues with the official qwen3.8 llama.cpp chat template, to the point that some people provide fixes e.g. huggingface.co/froggeric/Qw...BalinaresQwen 3.8 27B is excellent, but it defaults to overthinking thingsWorth noting that the default GGUF template sets the reasoning to xhigh. You can use the Froggeric template to set reasoning to medium instead: https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates Worth noting as well that the weights come with an MTP layer that seems particularly accurate,…デイリーHuggingFaceトレンド今日のHuggingFaceトレンド froggeric/Qwen-Fixed-Chat-Templates Qwen 3.5および3.6向けの修正済みJinjaチャットテンプレートを提供するリポジトリです。 公式テンプレートで発生するレンダリングエラーやトークンの浪費、エージェント動作時の停止などの問題を解消します。 LM Studio、llama.cpp、vLLM、MLXなど、HuggingFaceのJinjaテンプレートをサポートする各種推論エンジンで利用可能です。pramQwen 3.8 27BThese templates actually fix the effort selection for LM Studio/3.8 https://huggingface.co/froggeric/Qwen-Fixed-Chat-TemplatesAamer Mehaisi821 likes, 0 downloads. A HF repo that just fixes Qwen chat templates is trending higher than most new models. Says everything about OSS inference — the bottleneck isn't architecture, it's getting the prompt format right. https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates

Searched

More from Mindket

See all from Mindket

Bonsai-27B-GGUF

lmstudio-community · Kit

A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…

New

Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…

New

MusicGen Small

facebook · Kit

Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists…

New

Similar in Developer

See all in Developer

Lexnet

alpindale · Kit

Tags every character of C source code for syntax highlighting with a tiny neural network of about 984 weights, run through a small C program. For developers an…

New

FLUX.2 Klein LoRA Studio

prithivMLmods · Kit

Try a set of LoRAs for the FLUX.2 Klein image model in a Gradio app that runs in your browser or on your own computer. Made for people who make or test AI imag…

New

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New