Skip to content
BIASED

Reasoning models and test-time compute

RL for long chains, pass@n and best-of-n, PRMs, and distilling reasoning.

From prompting to trained chains

Chain of thought prompted a fixed model to write steps; Reinforcement learning for language models trained with rewards a program can check. Put them together, let the chain grow as long as the model wants, and reward only the final answer: the model learns chains of thousands of tokens with checks and retries inside. Such reasoning models (OpenAI o1, DeepSeek-R1) turn test-time tokens into a second axis of scaling next to training compute.

On AIME 2024, GPT-4o reached about 9.3%9.3\% with one sample and 13.4%13.4\% with a vote over 64 — accuracy did not scale with inference compute, because nothing in training rewarded using that compute well.

Training to reason

Key idea. Train with RL on checkable problems, reward only the final answer, and leave chain length free. Behaviours that raise accuracy — checking a step, trying another approach, continuing after a wrong first attempt — are reinforced when the model ever does them.

DeepSeek-R1-Zero: GRPO on DeepSeek-V3-Base with rule-based accuracy and format rewards, no SFT first. AIME 2024 pass@1 rose 15.6%→71.0%15.6\%\to71.0\%; response length grew to thousands of tokens with no length reward. R1 adds cold-start SFT, language-consistency reward, rejection sampling into ~800k SFT samples, a second RL stage, and distillation into smaller models.

Caveats: base models already show some self-reflection; RLVR improves small-kk metrics more than pass@kk at large kk (sharpening); some length growth can come from the GRPO length factor.

Parallel test-time compute

Given a model, parallel methods draw nn samples. Coverage is pass@n=1−(1−p)n\mathrm{pass@}n=1-(1-p)^n — the ceiling when a perfect verifier picks any success. Majority vote needs no verifier and converges when the correct answer is the mode. Best-of-nn by a scoring verifier (ORM) is

n p∫fc(s) F(s)n−1 dsn\,p\int f_c(s)\,F(s)^{n-1}\,ds

and is decided by the top tail of scores: a biased verifier that overrates a shared misconception can make best-of-nn fall with nn while the vote still climbs.

Worked example: p=0.35p=0.35, misconception 0.250.25, slips 0.400.40; scores N(1,1)\mathcal N(1,1), N(1.4,1)\mathcal N(1.4,1), N(0,1)\mathcal N(0,1). At n=256n=256, coverage ≈1\approx1, best-of-n≈0.32n\approx0.32, vote ≈0.98\approx0.98.

Sequential revision and allocation

Sequential revision conditions new attempts on earlier ones; reasoning models revise inside one chain. Budget forcing (s1) appends “Wait” to extend thinking: AIME 50%→57%50\%\to57\%.

Compute-optimal allocation (Snell et al.): bin questions by difficulty; revisions help easy ones, search helps medium, hardest need a better model. With perfect verifier and 800 samples over 100 questions of graded pip_i, uniform 8 each solves ≈56.5\approx56.5 expected; allocating by true difficulty ≈63.2\approx63.2.

Process rewards

A process reward model scores every step so search can prune early. On MATH, PRM800K’s PRM selected best of 1,860 samples at 78.2%78.2\% vs ORM 72.4%72.4\% and vote 69.6%69.6\%. Toy: T=8T=8 steps each right with q=0.8q=0.8, so p=q8=0.168p=q^8=0.168; verifier a=0.9a=0.9, b=0.1b=0.1. Ceiling for accepted solutions ≈0.645\approx0.645; for step-level search ≈0.803\approx0.803. DeepSeek-R1 found PRMs useful for re-ranking but not worth their cost as large-scale RL rewards (hackable, hard to define steps).

Distillation and the cost of length

Distilling R1’s traces by SFT into Qwen2.5-32B beat large-scale RL on the same base (72.6%72.6\% vs 47.0%47.0\% AIME). Overthinking: on “2+32+3”, o1-like models used ~20×20\times more tokens; among responses that contained a correct answer, the first solution was already correct in >92%>92\% of cases. Latency is length / decode speed: 10,00010{,}000 tokens at 5050 tok/s takes 200200 s before the answer starts.

Toward agentic episodes

Benchmarks age; faithfulness of long chains is still not guaranteed. Everything so far trains one response. An agent’s episode interleaves tool outputs written by the environment, with reward after dozens of actions. Next: training agents with reinforcement learning.

Check your understanding

The same questions as in Pulse. Answers are shared between modes.

Full notes

Answers are saved on the server and tied to this browser until you sign in.