Who this is for and what you will be able to do
This is for readers who want to understand how Qwen3's thinking mode works, especially developers who want to control whether the model thinks and for how long. After working through it, you will know which situations suit each mode, how a thinking budget limits reasoning length, and how the enable_thinking setting in the template skips or enters the thinking stage.
What thinking mode is in Qwen3
Qwen3 puts both modes in one model. In thinking mode it reasons deliberately first, and in non-thinking mode it answers quickly[1]. You do not need two separate deployments for speed and depth. You choose the mode per task.
Combining the two modes lets Qwen3 control a "thinking budget" fairly steadily. The guide says this lets users give harder tasks more budget and easier tasks less, balancing speed and performance[1]. It also says that scores on its evaluation set rise as the budget increases[1].
How the thinking budget is enforced
On the Qwen Chat web version (chat.qwen.ai), the thinking budget for deep thinking can be adjusted in steps of 1024 tokens, up to 38912 tokens, which is 38 × 1024[1].
The guide shows Qwen3-235B-A22B answering under a 1024-token budget. It used a Markov chain question so the reasoning would run past 1024 tokens. The thinking stops abruptly when it reaches the budget limit[1].
From this, the guide infers that the budget is implemented by counting the tokens after <think>. At the limit, generation is cut off, </think> is appended, and the model moves to the output stage[1]. This is the guide's inference from observed behavior, not an official description of the implementation. If you deploy the model, check the documentation of your inference framework.
A useful way to picture it: the budget is not the model deciding it has thought enough. An outside mechanism counts the tokens and closes the thinking when the limit is reached. A budget that is too small can cut reasoning short, and the answer may then feel rushed.
How the switch works in the chat template
The thinking-mode switch is defined in the chat_template field of tokenizer_config.json. The most important part is the final add_generation_prompt block:
{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n' }}
{%- if enable_thinking is defined and enable_thinking is false %}
{{- '<think>\n\n</think>\n\n' }}
{%- endif %}
{%- endif %}If enable_thinking is passed and set to false, the template appends <think>\n\n</think>\n\n after <|im_start|>assistant\n. The empty think block tells the model that thinking is finished, so it enters the output stage directly[1].
For comparison, the guide also shows QwQ's template. QwQ appends an opening <think> after the generation prompt to force a thinking stage[1]:
{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n<think>\n\n' }}
{%- endif %}The difference is that QwQ controls thinking by opening a think block, while Qwen3 controls it by inserting an empty, already closed think block. Qwen3 does not depend on the model deciding whether to think. Once the template contains a closed think block, the model answers directly[1]. This is why one model can serve both modes: the model itself does not change, only what the template places in the generation prompt does.
Common questions
**Will the model still output <think> when enable_thinking is False?** Following the template, the generation prompt already contains an empty <think>\n\n</think>\n\n, so the model goes straight to the output stage[1].
Why is an answer incomplete after thinking is cut off? The guide's explanation is that the thinking is forcibly cut off when the budget is reached and </think> is added. A small budget can leave the reasoning unfinished, so the answer can be incomplete[1].
What is the granularity of the thinking budget? On the web version, the guide gives 1024 tokens as the step size and 38912 tokens as the maximum[1].
Limits
The guide's explanation rests on two things: the behavior of the web version and the template file, and its own inference about how the budget is implemented. It gives no specific evaluation numbers, so the statement that scores rise with budget describes a trend only. If you depend on these behaviors in production, follow the parameter documentation of your framework and test it yourself.
Next steps
To try the modes yourself, see this site's practice article on serving Qwen3 with vLLM, which demonstrates enable_thinking and --enable-reasoning. For the overall design of Qwen3, see this site's entry on Qwen3.
Adapted from the article "Qwen3 Think 解密" in Datawhale's open-source self-llm project[1], released under the Apache-2.0 License.
Sources
- 1Qwen3 Think 解密Datawhale self-llm (Apache-2.0)
Cite this page: Qwen3 thinking mode explained. TellWorld, https://www.tellworld.net/practice/practice-qwen3-thinking-mode. Updated 2026-11-14