TL;DR
Qwen3 is a family of open-weight language models from 2025, in eight sizes from 0.6 billion to 235 billion parameters. Six are dense models and two are mixture-of-experts (MoE) models. Its main idea is that one model can both reason at length ("thinking" mode) and answer quickly ("non-thinking" mode), and that users can cap how many tokens the model spends thinking. The report also shows that small models can take on reasoning ability from large ones by distillation, which uses about a tenth of the GPU hours of running reinforcement learning on each small model.
Builds on: Mixture of Experts, Grouped-Query Attention, Rotary Position Embedding, Instruction Tuning, Knowledge Distillation, Chain-of-Thought Prompting · Leads to: test-time compute scaling
Why it mattered
The report's weights and code are public, so the design choices can be copied and tested by anyone. Its most reusable ideas are:
- One model, two modes. A team that wanted fast chat and deep reasoning often ran two models. Qwen3 puts both behaviours behind a switch in the chat template: the user adds
/thinkor/no_thinkto a message. - A thinking budget. The report shows that the model can be stopped part-way through its reasoning and still give an answer, so compute can be traded against latency for each request.
- Cheaper small models. In the report's comparison on Qwen3-8B, distillation from a larger teacher beat reinforcement learning from the same starting checkpoint while using about one tenth of the GPU hours. The small models in the family were built this way.
- Wider language coverage. The report says pre-training covers 119 languages and dialects, up from 29 in Qwen2.5, on about 36 trillion tokens.
The problem
The report starts from three limits of the previous generation, Qwen2.5 and its reasoning sibling QwQ.
- Two models for two jobs. A chat model answered quickly but reasoned poorly. A reasoning model reasoned well but was slow and verbose on simple questions. Developers had to pick one and route traffic by hand.
- Expensive small models. Each model size needed its own long, multi-stage post-training. Running reinforcement learning on every small model multiplies the cost.
- Narrow language support and short training context. Qwen2.5 covered 29 languages. The general pre-training stage of Qwen3 itself uses 4,096-token sequences, so the context has to be extended in a later stage.
The report's answer is one architecture shared across sizes, a four-stage post-training recipe for the flagship model, and distillation for the smaller ones.
How it works
The pipeline runs in nine steps, from architecture to inference.
flowchart LR A[Architecture: dense or MoE] --> B[Pre-training: about 36T tokens, 3 stages] B --> C[Stages 1-2: thinking, cold start and reasoning RL] C --> D[Stage 3: Thinking Mode Fusion, /think and /no_think] D --> E[Stage 4: General RL, over 20 tasks] E --> F[Flagship model] F --> G[Strong-to-weak distillation] G --> H[Small models in both modes]
-
Pick the architecture. The dense models follow Qwen2.5: grouped-query attention, SwiGLU feed-forward blocks, rotary position embeddings, and RMSNorm applied before each sub-layer. Two changes are new: the QKV bias that Qwen2 used is removed, and QK-Norm is added to attention for stable training. The MoE models have 128 experts with 8 activated per token. Unlike Qwen2.5-MoE, they have no shared expert, and they use a global-batch load-balancing loss to encourage specialisation. The flagship, Qwen3-235B-A22B, has 94 layers, 64 query heads and 4 key-value heads.
-
Build the pre-training data. The team fine-tunes Qwen2.5-VL to extract text from PDF documents, and generates synthetic data with Qwen2.5-Math and Qwen2.5-Coder. The report says it annotates over 30 trillion tokens for educational value, field, domain and safety, so the data can be filtered and mixed on those labels.
-
Pre-train in three stages. Stage 1 trains on over 30 trillion tokens at a sequence length of 4,096, building general knowledge across 119 languages. Stage 2 adds about 5 trillion tokens with more STEM, coding, reasoning and synthetic data, and decays the learning rate faster. Stage 3 trains on hundreds of billions of tokens at a sequence length of 32,768. For this stage the RoPE base frequency is raised from 10,000 to 1,000,000, so position signals stay distinct over long distances.
-
Stretch the context at inference. For length extrapolation the report uses YaRN with a scaling factor of 4 when it evaluates long inputs on RULER.
-
Teach long reasoning (stages 1 and 2). A cold-start fine-tune on long chain-of-thought answers, generated by QwQ-32B and filtered for correctness and style, gives the model the habit of thinking first. Reinforcement learning with GRPO then runs on 3,995 query-verifier pairs, chosen to be hard but learnable and to cover many sub-domains.
-
Fuse the two modes (stage 3). Continued supervised fine-tuning mixes thinking data, generated by rejection sampling from the stage-2 model, with curated non-thinking data. A user flag selects the mode. Non-thinking answers keep an empty think block, so the format stays the same.
-
Generalise with general RL (stage 4). A reward system with over 20 tasks uses three kinds of reward: rule-based checks, a model that compares the answer with a reference answer, and a reward model trained on preference data.
-
Distil into the small models. The five dense models from 0.6B to 14B and the 30B-A3B MoE model are trained in two phases. First, off-policy distillation trains them on teacher outputs in both modes. Then on-policy distillation has each student generate its own responses, and its logits are aligned with a teacher's (Qwen3-32B or Qwen3-235B-A22B) by minimising the KL divergence.
-
Spend a budget at inference. When the thinking reaches a user-set length, the serving code stops it and inserts a fixed sentence telling the model to answer now from what it has reasoned so far. The report says the model "naturally develops" this ability once Thinking Mode Fusion has taught it both modes.
A small illustration of step 9, with made-up numbers: with a budget of 1,000 tokens, the model writes 1,000 tokens of reasoning, the stop sentence is inserted, and the next tokens are the answer. The report tests budgets up to 32K tokens and leaves longer outputs to future work.
The math
The paper states few formulas. The math below uses its numbers and the one loss it names.
Step 1 in symbols: active parameters
In a MoE layer with experts and active per token, the fraction of expert weights used for each token is . For Qwen3's MoE layers that is . For the whole flagship model, 22 billion of 235 billion parameters are activated:
so about 9.4 percent of the weights run for each token. The report makes the same point in comparison with DeepSeek-V3: Qwen3-235B-A22B uses "about 1/3 the total number of parameters and 2/3 activated parameters" of that model. The fraction is what makes a MoE model cheap to run relative to its size.
Step 3 in symbols: context and position
Sequence length grows from to tokens, a factor of . The RoPE base grows from to , a factor of 100. A larger base slows the rotation of each position angle, so the same range of angles covers much longer sequences.
Step 8 in symbols: distillation
For a student distribution and a teacher distribution over the vocabulary, given the prefix at position , one common per-token form of logit distillation is
The report says only that the student is trained to minimise the KL divergence to the teacher's logits. It does not write the formula or state its direction, so treat this as the standard form, not a quoted equation. The KL divergence itself is explained in Kullback–Leibler Divergence.
The cost ratio
Table 21 lists GPU hours of 17,920 for reinforcement learning on Qwen3-8B and 1,800 for on-policy distillation. The ratio is
which is the "about one tenth" the report states.
Results
All numbers below come from the report's text or tables, with the report's own settings and baselines.
| Comparison | Model | Result (as reported) |
|---|---|---|
| Thinking vs DeepSeek-R1, 23 benchmarks | Qwen3-235B-A22B | better on 17 of 23 |
| Non-thinking vs GPT-4o-2024-11-20, 23 benchmarks | Qwen3-235B-A22B | better on 18 of 23 |
| Thinking vs QwQ-32B, 23 benchmarks | Qwen3-32B | better on 17 of 23 |
| Base vs DeepSeek-V3 Base, 15 benchmarks | Qwen3-235B-A22B | better on 14 of 15 |
| AIME'24, distillation vs RL | Qwen3-8B | 74.4 vs 67.6 |
| AIME'25, distillation vs RL | Qwen3-8B | 65.5 vs 55.5 |
| GPU hours, distillation vs RL | Qwen3-8B | 1,800 vs 17,920 |
| ThinkFollow (mode switching), stage 3 vs stage 4 | Qwen3-32B | 88.7 vs 98.9 |
Three results need care.
- Thinking mode can lose ground on some tasks. In Table 22, Qwen3-32B thinking scores 83.8 on AIME'24 after Reasoning RL (stage 2), 81.9 after Thinking Mode Fusion (stage 3), and 81.4 after General RL (stage 4). On LiveCodeBench v5 it goes from 68.4 to 67.2 to 65.7. The report accepts small losses on these benchmarks for the gains in general and instruction-following tasks.
- Long context is a little weaker in thinking mode. On RULER, Qwen3-235B-A22B averages 95.0 in non-thinking mode and 92.2 in thinking mode.
- The thinking-budget curve covers four benchmarks in mathematics, coding and STEM. The report shows smooth gains as the budget grows, and leaves outputs beyond 32K tokens to future work.
The distillation comparison is narrower than it looks. Both methods start from the same off-policy distilled 8B checkpoint, and the report compares only math and code queries. The report also notes that distillation raises pass@64 on AIME'24 and AIME'25, while reinforcement learning does not.
The limits are the report's own. The comparisons use benchmarks the authors chose, some of them in-house (for example CounterFactQA, LengthCtrl, ThinkFollow and ToolUse), and sampling settings are tuned per mode: temperature 0.6 with top-p 0.95 for thinking, and temperature 0.7 with top-p 0.8 for non-thinking. The architecture changes (removing the QKV bias, adding QK-Norm, dropping the shared expert) are stated without a separate ablation table, so the report shows that the whole package works, not what each part contributes.
Reading guide
Read the sections in this order. Each one names the lessons it leans on.
- Section 1, Introduction. Needs Transformer and the idea of a reasoning model trained with reinforcement learning.
- Section 2, Architecture. Needs Mixture of Experts, Grouped-Query Attention, Rotary Position Embedding, RMS Normalization, Load-Balancing Loss and Subword Tokenization.
- Section 3, Pre-training. Needs Neural Scaling Laws for the token-count reasoning and Positional Encoding for the RoPE base change. The base-model tables are long; read the summaries first.
- Section 4.1 to 4.3, thinking. Needs Chain-of-Thought Prompting, Instruction Tuning, Policy Gradient, Group Relative Policy Optimization (GRPO) and Rejection Sampling.
- Section 4.4, General RL. Needs Reinforcement Learning from Human Feedback (RLHF) and Reward Model.
- Section 4.5, Strong-to-weak distillation. Needs Knowledge Distillation and Kullback–Leibler Divergence.
- Section 4.7, Discussion, and the long-context evaluation. Needs Scaling LLM Test-Time Compute Optimally for why thinking budgets matter, and RULER: What's the Real Context Size of Your Long-Context Language Models? for the long-context benchmark.
- Related. DeepSeek-R1: Incentivizing Reasoning in LLMs through Reinforcement Learning and DeepSeek-V3 Technical Report are the main baselines the report compares against.