4 Key Changes in Qwen-3's Chat Template
Key point
Qwen-3's new chat template improves model control efficiency through optional reasoning and dynamic context management.
Details
Qwen-3's chat template is more sophisticated than previous models (Qwen-2.5, QwQ), and analysis of the Jinja template reveals four key technical changes as follows.
-
Optional Reasoning: An
enable_thinkingflag has been introduced to allow reasoning to be toggled. When the flag is false, an empty<think></think>tag is inserted, prompting the model to answer immediately without being forced to perform a step-by-step thinking process. -
Dynamic Context Management: A rolling checkpoint system is utilized. By intelligently deleting or preserving previous reasoning blocks based on the most recent user turn, it prevents unnecessary token consumption during tool calls and maintains context efficiently.
-
Better Tool Argument Serialization: To avoid double-escaping when tool call arguments are already JSON strings, the type is checked first, and serialization is performed only when necessary.
-
Removal of Default System Prompt: Unlike previous models, it does not use a fixed default system prompt, increasing flexibility for user customization.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.