Paper Breakdowns  /  Qwen3
Paper 83~10 min readAlibaba 2025worked math + runnable code
Paper Breakdown

Qwen3,
explained.

"What's 2+2?" doesn't need a model to sit and think — it needs an answer. "Prove this identity" does. Yet most deployments run one fixed policy: either a reasoning model that overthinks trivia, or a chat model that fumbles hard problems. Qwen3's move is to put both in one model and hand you a dial: a thinking budget you can turn up for hard queries and down to zero for easy ones. The interesting question isn't "can it reason?" — it's "when is reasoning worth the tokens?" Here's the arithmetic of spending thought wisely.

Video breakdown
The animated walkthrough is in production.
Read the full breakdown below in the meantime ↓
01

One model, two modes

Reasoning models like DeepSeek-R1 showed that letting a model generate a long chain-of-thought before answering dramatically improves hard problems — at the cost of many extra tokens. That created an awkward split: teams deployed a slow "reasoning" model for math and code, and a fast "chat" model for everything else, and had to route between them.

Qwen3 collapses that split. A single model supports a thinking mode (emit reasoning tokens, then answer) and a non-thinking mode (answer directly), and you choose per request. More than a toggle, it exposes a thinking budget — a cap on reasoning tokens — turning test-time compute into a continuous dial. One set of weights, tuned to be good at both, so you stop paying to host and route between two models.

The one-sentence version

Put thinking and non-thinking in one model with a controllable budget, and spend reasoning tokens only where they help — hard queries — to maximize accuracy per token.

02

The thinking budget

The thinking budget is a cap on how many reasoning tokens the model may spend before it must commit to an answer. It makes the test-time-compute trade-off explicit and tunable: budget 0 is pure direct answering; a large budget lets the model reason at length. Two empirical facts about that curve make the budget powerful.

First, the accuracy gain from thinking saturates — the first reasoning tokens help a lot, later ones little, so past some point more thinking is wasted. Second, thinking helps far more on hard queries than easy ones: an easy question is usually answered correctly with no reasoning at all, leaving almost no headroom for thinking to add. Together these mean the value of a token of thinking depends heavily on which query it's spent on — and that's the opening for a smarter policy than "always" or "never".

03

Spend it wisely

If thinking mostly helps hard queries, the efficient policy is obvious: gate it on difficulty. Estimate how hard a query is, skip thinking when it's easy, and spend the budget when it's hard. That's how a controllable budget beats a fixed one — it moves compute to where the marginal token buys the most accuracy.

Why adaptive budgeting wins
Never thinkCheap, but fails hard queries — no reasoning where it's needed.
Always thinkAccurate, but wastes tokens on the many easy queries.
Gate on difficultySkip easy, think on hard → best accuracy per token.
Budget capBound the reasoning so a hard query can't run away in tokens.

Concretely: on a batch of mixed queries, always-thinking pays the full reasoning cost on every request, including the majority that were easy and gained nothing. Gating on difficulty pays that cost only on the hard subset, keeping essentially the same accuracy for a fraction of the tokens. The saturation point also tells you how much to spend once you do think — enough to catch the steep part of the curve, not so much that you're past diminishing returns.

04

Accuracy per token

Model accuracy as a direct-answer baseline plus a saturating gain from thinking, where the headroom for that gain scales with query difficulty:

A(d, t)  =  (1 − d)  +  d·(1 − e−t/τ)

d = difficulty, t = thinking tokens, τ = saturation scale. At t=0, A=1−d (direct answer). The gain term is scaled by d, so easy queries (small d) have almost no headroom — thinking barely moves them — while hard queries (large d) gain a lot. The (1−e−t/τ) factor saturates: early tokens help most.

Now the policy. Gate thinking on a difficulty threshold, and only spend the budget when the gate fires:

think(d) = [ d ≥ θ ] ;    tokens(d) = B·think(d)   ⟹   a batch spends B only on the hard queries

Easy queries cost 0 reasoning tokens; hard ones cost B. Against always-thinking (B on every query), the gate keeps the accuracy that mattered while spending a fraction of the tokens — the accuracy-per-token win. The runnable version below shows thinking helping hard queries far more, and adaptive budgeting undercutting always-think on tokens.

RUN IT YOURSELF

Budget the thinking

Qwen3's dial is a trade-off you can compute. Accuracy is a direct-answer baseline (1 − difficulty) plus a saturating gain from thinking whose headroom scales with difficulty — so thinking barely helps an easy query but lifts a hard one a lot, and more tokens never hurt. A gate skips thinking on easy queries and spends the budget on hard ones, so a mixed batch pays the reasoning cost only where it matters — fewer tokens than always-thinking for essentially the same accuracy. Change the difficulties, threshold, or budget and watch the spend move.

CPython · WebAssembly
05

What shipped

Qwen3 is a broad open release, and the hybrid mode is its distinctive idea:

FeatureSignificance
Unified thinking / non-thinkingOne model does both, with a controllable budget — no need to host and route between a reasoning model and a chat model.
Dense + MoE variantsA family across sizes, including mixture-of-experts models for cheaper inference at scale.
Strong multilingual coverageBroad language support, extending Qwen's reach beyond English and Chinese.
Open weightsReleased openly, a competitive open alternative for both reasoning and general use.

Training such a model is a balancing act — teaching one set of weights to reason at length and to answer crisply without over-reasoning, so that turning the budget to zero yields a genuinely good direct answerer rather than a crippled reasoner. That the two modes coexist without either degrading is the practical achievement behind the clean user-facing dial.

06

The dial, not the switch

Qwen3 reframed reasoning from a property of the model to a property of the request. The reasoning-model wave asked "is this a thinking model?"; Qwen3 answers "how much should this query think?" — the more useful question once you're paying per token in production. Treating test-time compute as an adjustable budget, rather than baked-in, is now a common design point, and other frontier models have adopted similar controllable-reasoning behavior.

The underlying principle is broader than any one model: reasoning tokens are compute, compute has diminishing returns, and returns depend on the problem — so the right amount of thinking is adaptive, not fixed. Qwen3 packaged that principle into a single deployable model with a knob a developer can actually turn. The frontier isn't only about models that can think harder; it's about models that know when to, and let you decide when they don't.

Worth knowing

The gate is only as good as its difficulty estimate. Misjudge an easy query as hard and you waste the budget; misjudge a hard one as easy and you fail it. In practice difficulty is estimated from the query (and sometimes a quick model pass), so the accuracy-per-token win depends on that estimate being roughly right.

Frequently asked

Quick answers

What is Qwen3?

Alibaba's 2025 open model family that unifies thinking and non-thinking modes in one model with a controllable thinking budget, in dense and MoE variants.

Thinking vs non-thinking?

Thinking emits chain-of-thought before answering (helps hard problems); non-thinking answers directly (fast and enough for easy ones).

What is a thinking budget?

A cap on reasoning tokens before the model must answer — a dial on test-time compute, from zero (direct) to long reasoning.

Why not always think?

Thinking costs tokens and barely helps easy queries, so gating on difficulty spends the budget where it pays and maximizes accuracy per token.

Finished this one? 0 / 101 Paper Breakdowns done

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Paper Breakdowns