Skip to content

Test-Time Compute: How Reasoning Models Spend Inference Budget

CoreConceptJuly 29, 20266 min read

For years, "make the model better" meant one thing: spend more compute during training, on bigger data, for a bigger network. Test-time compute is a second knob that got serious attention once reasoning models shipped — spend more compute after training, while the model is answering one specific request, by letting it search, redraft, or verify before it commits to a final token.

This guide is for engineers who already call LLM APIs and now see a reasoning_effort, thinking budget, or max_reasoning_tokens parameter and aren't sure what it actually buys. You will trace one coding-agent request — fixing a failing test named test_partial_refund_after_currency_rounding — through the mechanisms that spend a test-time budget, then learn where that spend pays off and where it quietly wastes latency and money. Pair this with Chain-of-Thought and Reasoning Models Explained for the product-facing view of reasoning traces, and LLM-as-a-Judge for how to grade the answers this budget produces.

Test-time compute map: train-time budget vs test-time budget and how the latter is spent
Test-time compute map: train-time budget vs test-time budget and how the latter is spent

Two Knobs: Train-Time Budget vs Test-Time Budget

Classic scaling laws describe what happens when you spend more compute once, during training: a bigger model, trained on more data, with more optimizer steps, tends to get more capable. That spend is amortized — every user who ever calls the model shares the cost of having trained it, and the resulting weights do not change per request.

Test-time compute is a different ledger. It is spent fresh on every call: more sampled attempts, more intermediate reasoning tokens, more self-checking passes, before the model returns an answer. Research on inference-time scaling (the s1 and DeepSeek-R1 lines of work) found that a smaller model given room to search at inference time can close a meaningful part of the gap to a model that only got bigger during training — but that room costs real latency and tokens on every single request, not once at release time.

Three scaling knobs: model size, train-time compute, and test-time compute
Three scaling knobs: model size, train-time compute, and test-time compute

Quick reference

  • Train-time compute buys a better prior; it is fixed until the next fine-tune or release.
  • Test-time compute buys a better answer to this request; it is a per-call decision you can dial up or down.
  • Treat reasoning_effort / thinking budget parameters as a cost-latency-accuracy knob, not a quality toggle you max out by default.
  • A small model with a generous test-time budget can rival a larger model with none on search-heavy tasks — it will not on tasks the small model was never trained to know.

Remember this

Train-time compute changes what the model knows once; test-time compute changes how hard it searches on one request, and you pay for the second knob every time you turn it up.

How a Reasoning Model Actually Spends the Budget

There are two broad families of test-time technique, and they are not interchangeable. Parallel methods run the same request multiple times — sample N candidate answers (or N reasoning paths), then pick the best one by majority vote (self-consistency) or with a separate verifier/reward model. Cost scales with N; latency can stay flat if samples run concurrently.

Sequential methods spend the budget inside one continuous generation instead: the model drafts, notices it's about to stop, and is pushed to keep reasoning. The s1 paper's budget forcing technique does this almost mechanically — when the model tries to end its reasoning early, the harness appends the token Wait and lets it continue, which the paper reported let a fine-tuned 32B model exceed a preview reasoning model by a wide margin on competition math after training on only about 1,000 curated examples. DeepSeek-R1 gets a similar effect a different way: reinforcement learning trains the model to naturally allocate a longer reasoning chain to harder problems, without an external harness forcing continuation.

Budget forcing sequence: draft, check the token budget, force continuation, then finalize
Budget forcing sequence: draft, check the token budget, force continuation, then finalize

Quick reference

  • Parallel sampling (best-of-N, self-consistency) needs a way to pick a winner — majority vote, a verifier model, or a checkable outcome like passing tests.
  • Sequential budget forcing works by denying the model's own stop signal, not by asking it a different question.
  • RL-trained reasoning models (DeepSeek-R1 style) learn budget allocation from reward signal during training, so no explicit forcing harness is required at inference.
  • Escalate effort on retry, not by default — most requests do not need the top tier of a reasoning budget.
  • Log reasoningTokens per request; it is the line item that explains a latency or cost spike that model size alone won't.
No budget control (fixed effort)
1// Every request pays the same reasoning cost, whether it needs it or not.2const res = await client.chat({3  model: "reasoning-model-v2",4  messages: [{ role: "user", content: fixFailingTestPrompt }],5});6// No way to ask for less thinking on an easy retry, or more on a hard one.
Effort scoped to task difficulty
1type Effort = "low" | "medium" | "high";2 3async function fixFailingTest(testId: string, attempt: number): Promise<Fix> {4  // Escalate effort only after a cheap attempt fails — don't default to max.5  const effort: Effort = attempt === 1 ? "low" : attempt === 2 ? "medium" : "high";6 7  const res = await client.chat({8    model: "reasoning-model-v2",9    reasoning_effort: effort,10    messages: [{ role: "user", content: fixFailingTestPrompt(testId) }],11  });12 13  return { testId, effort, patch: res.output, tokensSpent: res.usage.reasoningTokens };14}

Remember this

Parallel search spends the budget across many attempts and needs a chooser; sequential extension spends it inside one attempt by refusing to let the model stop early.

When Extra Thinking Pays Off, and When It's Wasted Latency

Extended test-time compute helps most on tasks with a checkable structure the model can search over — math with a verifiable final number, code with a test suite that passes or fails, planning problems with constraints to satisfy. The failing test test_partial_refund_after_currency_rounding is exactly this shape: the agent can draft a patch, run the suite, see red or green, and spend more search only while it's still red.

It helps far less, and sometimes hurts, on tasks that are recall-bound rather than search-bound: "who is on call this week" or "what does clause 4.2 of the contract say" has one correct answer sitting in context (or missing from it) — no amount of additional reasoning invents a fact that was never retrieved. Research on knowledge-intensive benchmarks found test-time scaling gave little or no accuracy gain there, and a longer reasoning trace can even talk itself into a confident, wrong bridging fact instead of admitting the context doesn't contain the answer.

Failure detail: extra reasoning time does not manufacture a missing fact
Failure detail: extra reasoning time does not manufacture a missing fact

Quick reference

  • Checkable-outcome tasks (tests pass, arithmetic checks, constraints satisfied) are where a search budget earns its cost.
  • Recall-bound tasks need retrieval or a tool call, not more reasoning tokens over the same missing context.
  • Watch for overthinking: a model that reasons past the point where it already had the right answer, and talks itself out of it.
  • A verifier or test suite is what turns "more samples" into "a better answer" — without one, best-of-N just returns a random draft.

Remember this

Test-time compute buys search over what the model already has; it does not buy facts the context never contained, and it can actively erode a correct early answer if nothing stops the model from re-arguing itself.

Practice: Find the Effort Level That's Worth Paying For

Build a ten-case eval set from real coding-agent failures: five checkable bugs (a failing test, a type error, a lint violation) and five recall-bound questions ("what does the on-call runbook say to do", "what's the current refund window") where the answer must come from a provided document, not invented. Run every case at low, medium, and high reasoning effort, and record pass rate, tokens spent, and wall-clock latency for each.

Expected result: the checkable-bug cases show real accuracy gains from low to high, at a real token and latency cost. Intentional break: run the recall-bound cases at high effort with the source document deliberately removed from context. Pass criterion: the model should say it cannot find the answer rather than confidently inventing one — if a longer reasoning trace produces a fluent wrong answer instead of an admission of missing context, that is the overthinking failure mode this article warned about, and the fix is a retrieval or tool step, not a bigger effort setting.

Quick reference

  • Starter: a JSON eval file with id, kind (checkable | recall), input, and expected.
  • Expected success: checkable cases improve with effort; recall cases do not, and stay honest when the source is missing.
  • Intentional break: strip the source document from one recall case before running it at high effort.
  • Recovery: route recall-bound tasks through retrieval or a tool call; reserve reasoning-effort escalation for checkable tasks.

Remember this

The right effort level is the cheapest one that still passes your checkable cases — proven with an eval, not assumed from a marketing claim about a bigger reasoning budget.

Key takeaway

Test-time compute is a real, separate lever from model size — but it is a lever you pay for on every request, not a one-time upgrade. Spend it on tasks with a checkable outcome the model can search over, escalate it on retry instead of defaulting to maximum, and route recall-bound questions to retrieval or tools instead of asking the model to think harder about a fact it was never given.

Practice (25 min): run the ten-case eval above against a reasoning model with an adjustable effort parameter. Pass when your checkable cases show a real accuracy-per-token curve and your recall cases stay honest about missing context at every effort level.

Share:

Related Articles

Jul 29, 2026 · 3 min read

AI Workflow State Machines matters when a team has to turn an AI idea into a system other people can trust. The useful q

Read

Jul 29, 2026 · 3 min read

AI Task Decomposition for Agents matters when a team has to turn an AI idea into a system other people can trust. The us

Read

Jul 29, 2026 · 3 min read

AI Model Routing Strategies matters when a team has to turn an AI idea into a system other people can trust. The useful

Read

Explore this topic

Keep learning

Follow a structured path or browse all courses to go deeper.