You need: what one forward pass computes and why decoding keeps a KV cache (The transformer from zero, sections 3 and 9); sampling at a temperature above zero (Sampling and Decoding); for section 8, what a policy-gradient update is (RL for LLMs: RLHF, GRPO, RLVR). Which lab ships which control, and how the labs compare: the root's Topic: llm-landscape section 2.
Serial: one chain written longer, which can re-read and revise its own working (section 1, 2). Parallel: several independent chains and a selector, a checker, a vote or a reward model, that picks one answer (sections 3 to 5). Latent: the same layers looped inside the network, depth that never becomes text (section 9). Underneath: how long to think (section 6), what the tokens cost (section 7), and how a model learns to use any of it (section 8).
The intuition is scratch paper. A model that must answer in its first token gets one forward pass of computation, however hard the question. A model allowed to write its working first gets one forward pass per token written, can look back at what it wrote, and can cross it out. A transformer forward pass has fixed depth, so the serial computation available to produce one next-token distribution is bounded by the layer count; a chain of thought removes that bound, and the context window acts as an external working memory persisting across the steps.
Three capabilities follow. Decomposition: a problem needing more serial steps than the model has layers becomes reachable. Externalised state: intermediate results are written down instead of held in activations discarded at every token. Revision: the model can read what it wrote, notice a contradiction and start again, which no single forward pass can do. A reasoning model is trained, typically by large-scale reinforcement learning on tasks whose answers can be checked mechanically (mathematics with a reference answer, code with unit tests), to plan, verify, backtrack and self-correct in that working rather than to emit a plausible-looking derivation (section 8).
The working memory is not free: every generated token leaves keys and values in the KV cache for every later token to attend to. The formula (2 × layers × key-value heads × head dimension × bytes per number, per token) and a calculator for 45 real models are on Long context (its KV-cache calculator), with T counting the prompt as well as the thinking; the serving techniques that make long traces affordable (paged attention, cache quantisation, multi-query and latent attention) are on Batching, KV cache and scheduling in depth.
What test-time compute does not buy. It adds no knowledge that is not in the weights or retrievable by a tool. It does not make a problem solvable if the model cannot make any correct partial progress on it, since there is nothing for later steps to build on. And the returns are shaped badly for economics (sections 3 and 7).
Transformer decoders allowed a number of decoding steps logarithmic in the input length gain "only slightly" over a single pass, while a linear number of steps lets them recognise all regular languages and a polynomial number lets them recognise exactly the problems solvable in polynomial time, under standard complexity conjectures and a mild generalisation of pre-norm in the normalisation layers (Merrill and Sabharwal, 2023). That is the whole mechanism: each emitted token is another full forward pass conditioned on everything written so far, so serial steps become unbounded.
Predict first: what does dragging T to 1 cost, and what does it save? An illustrative 60-layer model with 8 KV heads of dimension 128 in BF16, decoding at 50 tokens a second. Answering directly in one token allows 60 × 1 = 60 serial layer applications; thinking for 10,000 tokens first allows 60 × 10,000 = 600,000, four orders of magnitude more from the same weights. One token costs 2 × 60 × 8 × 128 × 2 = 245,760 bytes (240 KiB) of cache, so the default 32,768-token trace costs 7.5 GiB for a single request (defaults reproduce these by construction). derived
Sequential and parallel share one budget in different shapes. Sequential costs irreducible latency (10,000 thinking tokens at an illustrative 50 a second is 200 seconds before the answer starts), a KV cache growing linearly with the trajectory, and attention over an ever-longer scratchpad getting more expensive per token. Parallel need not add wall-clock time given the hardware, but total tokens scale with the sample count and it lives or dies on the selector. Predict before it plays: which shape spends less wall-clock time, and which one can fix its own mistake?
Illustrative throughout: the problem, the traces and the answers are invented to show the mechanism, on section 1's illustrative model (240 KiB of KV cache a token, 50 tokens a second). The vote and verifier probabilities are computed from section 3's formulas at p = 0.6 per chain (0.683, 0.835 and 0.990).
What it shows. The same 10,000 tokens and the same total KV memory, five times faster in parallel. The single chain can notice its own error and repair it; the five chains can only be outvoted or rejected, so the result is only as good as the selector. They compose: "heavy" tiers sample several long sequential traces in parallel and aggregate them, which the root compares lab by lab (Topic: llm-landscape section 2).
Parallel sampling is the one way of spending test-time compute whose returns can be written down exactly, and the formulas explain most of the folklore about it. Three selectors, three formulas, one chart.
If one sample solves a problem with probability p, and samples are independent:
With p = 0.2: one sample succeeds 20% of the time; five give 1 − 0.85 = 1 − 0.32768 = 0.672; ten give 1 − 0.810 = 1 − 0.107 = 0.893. A verifier that recognises a correct answer turns this directly into accuracy, which is why best-of-n against unit tests or a proof checker is the strongest form of parallel scaling. It also shows the ceiling: a problem with p = 0 stays unsolved at any k.
Self-consistency needs no verifier, only answers that can be compared. In the simplest case, one correct answer against one competing wrong answer, with n odd:
With p = 0.6 and n = 5: 10 × 0.63 × 0.42 + 5 × 0.64 × 0.4 + 0.65 = 0.3456 + 0.2592 + 0.0778 = 0.683, up from 0.6. With p = 0.4 the same vote gives 0.317, down from 0.4, and more samples make it worse: voting amplifies whichever answer is most likely, right or wrong. Real wrong answers usually scatter, which is why voting works as well as it does: with p = 0.4 and the remaining 0.6 spread evenly over four different wrong answers (0.15 each), the correct answer is the most likely single answer, and a plurality vote is right 54.9% of the time over 5 samples and 78.0% over 15.
The stage runs the scattered case at p = 0.4 on fifteen samples, then lets the wrong answers agree.
The original self-consistency paper sampled 40 reasoning paths and reported gains over single-sample chain-of-thought prompting of 17.9 points on GSM8K (60.1% to 78.0% with code-davinci-002), 11.0 on SVAMP, 12.2 on AQuA, 6.4 on StrategyQA and 3.9 on ARC-challenge (Wang et al., 2022, Tables 2 and 3). The gap between voting and a verifier is the part people forget: on MATH with Llama-3-8B-Instruct, the chance that some sample is right rose from 82.9% at 100 samples to 98.44% at 10,000, while majority voting or a reward model rose only from 40.50% to 41.41% over the same range (Brown et al., 2024).
Over a whole benchmark the curves change shape: problems have different p, so coverage follows a power law in k and a vote saturates at the share of problems whose right answer is the most likely one. The Benchmark sampling lab tab computes both exactly and recomputes Brown et al.'s coverage fits.
Predict: set p = 0.4 with one wrong answer. Does a vote over 63 samples beat one sample?
The plurality curve is computed exactly by enumerating how the wrong samples split among the wrong answers, ties broken at random (checked by brute force in src/recompute.py). At p = 0.4 with four wrong answers it gives 54.9% at n = 5 and 78.0% at n = 15; with one wrong answer at p = 0.6, 68.3% at n = 5 and at p = 0.4, 31.7%.
A perfect verifier (the coverage ceiling) is only available where answers can be checked; voting and learned scorers recover part of the gap, and how much depends on the task. Compare within a model, never across: benchmarks, models and dates differ. Sources: o1 on AIME 2024, "74% (11.1/15) with a single sample per problem, 83% (12.5/15) with consensus among 64 samples, and 93% (13.9/15) when re-ranking 1000 samples with a learned scoring function" (OpenAI, September 2024). DeepSeek-R1 on AIME 2024: pass@1 79.8%, majority voting 86.7%, pass@64 90.0% (arXiv v2, January 2026). Llama-3-8B-Instruct on MATH at 10,000 samples (Brown et al.). code-davinci-002 on GSM8K: chain-of-thought 60.1%, self-consistency over 40 paths 78.0% (Wang et al., Table 2). published
With a learned reward model as the selector, a larger n is a stronger optimisation of the proxy, and the true quality first rises and then falls. Gao, Schulman and Hilton (2022) measured this against a much larger "gold" reward model standing in for the true objective, and fitted:
The KL grows only logarithmically in n, so the peak arrives late but it arrives: past it the proxy score keeps rising while true quality falls, and nothing in the proxy signals it. The general over-optimisation picture is on Reward Hacking.
Defaults reproduce the worked numbers by construction: with n = 16, KL = ln 16 − 15/16 = 2.773 − 0.938 = 1.835 and d = 1.355; with illustrative coefficients α = 1 and β = 0.25 (not the paper's fitted values), R = 1.355 × (1 − 0.25 × 1.355) = 0.896; the peak is at d* = α/(2β) = 2, reached near n = 147, and by n = 4,096 the gold reward has fallen back to 0.876. A larger reward model behaves like a smaller β: the peak moves out, which is why a larger reward model beats a larger n.
In evaluation, pass@k is estimated from n ≥ k samples of which c are correct, with the unbiased estimator of Chen et al. (2021), who drew n = 200 samples per problem for k ≤ 100 and showed that the naive 1 − (1 − c/n)k is biased:
Defaults: C(8, 5) = 56 and C(10, 5) = 252, so the estimate is 1 − 56/252 = 0.778.
How far the naive estimate falls below the true value, and how the gap closes as n grows, is drawn with both estimators side by side on Coding benchmarks, which owns pass@k as benchmarks report it.
For RL against the same proxy Gao et al. fit a different form, RRL(d) = d(αRL − βRL ln d), which declines more slowly than best-of-n's.
Where no program can check an answer, the selector is learned, and where it looks matters. An outcome reward model (ORM) reads a finished solution and predicts whether it is right. A process reward model (PRM) predicts, for each intermediate step, whether the solution so far is on track. That buys two things: an error is caught at the step where it happens rather than diluted over a long answer, and search can prune a bad partial solution before paying to finish it.
Lightman et al. (2023), "Let's Verify Step by Step", compared the two on MATH: "process supervision significantly outperforms outcome supervision", and their process-supervised model "solves 78% of problems from a representative subset of the MATH test set"; they released PRM800K, "800,000 step-level human feedback labels". Human step labels are expensive, so later work labels steps automatically: Snell et al. (2024) found a PRM trained on PRM800K "easy to exploit" with their PaLM 2 models (a distribution shift from its GPT-4 samples) and instead estimated each step's correctness from Monte Carlo rollouts continued from it, so the PRM's per-step prediction is a value estimate of reward-to-go; their PRM "consistently outperforms the ORM".
Snell et al.'s procedure (Section 5.2) with N = 4 beams and beam width M = 2: sample N first steps, score them with the PRM, keep the top N/M, sample M continuations of each, repeat to the end (at most 40 rounds in the paper), then pick the answer by best-of-N weighted, summing the PRM's scores over solutions with the same final answer. A solution's score is the PRM's prediction at its last step, which they found worked better than the product or minimum of the step scores. The scores and answers here are illustrative.
Search against a verifier is still optimisation against a learned model, with section 3's failure. Snell et al. found beam search best at low generation budgets and on harder questions, while "on the easier problems (bins 1 and 2), beam search shows signs of over-optimization with higher budgets, whereas best-of-N does not". Where answers can be checked by a program, prefer the program: it cannot be over-optimised on the property it checks (only gamed around it, section 8).
Which way to spend a fixed budget depends on how hard the question is for this model. Snell et al. (2024) binned questions by the base model's own success rate and compared, per bin and per budget, sequential revisions (the model rewrites its previous answer) against parallel samples, and beam search against a PRM against best-of-N.
Choosing the setting per question, "compute-optimal" allocation, improved "the efficiency of test-time compute scaling by more than 4× compared to a best-of-N baseline", and "on problems where a smaller base model attains somewhat non-trivial success rates, test-time compute can be used to outperform a 14× larger model" in a FLOPs-matched evaluation. The qualifier is the point: on problems the small model cannot make progress on, pretraining scale still wins. In practice the difficulty is not known in advance, so it is estimated (by the verifier, by a router, or by the model itself deciding how long to think), which is where section 6 begins.
Read from the paper's takeaways (Sections 5 and 6) and its FLOPs-matched comparison (Section 7), PaLM 2-S* on MATH. published
Once a model reasons, the control problem is how much. There are three levers, from the bluntest to the most adaptive: a token budget the caller sets, an effort level within which the model decides, and a router that picks a model or mode per request. Which lab ships which, and the five production mechanisms side by side, is the root's comparison (Topic: llm-landscape section 2, "Who decides how much it thinks"); here is how each works.
Budgets. Anthropic's budget_tokens (introduced with Claude 3.7 Sonnet, "think for no more than N tokens, for any value of N up to its output limit of 128K tokens", Anthropic, February 2025, and the only mode on the Claude 4 and 4.5 models) and Gemini 2.5's original thinking budget are the token-count form. A budget is the tightest bound on cost, but a fixed allowance whatever the difficulty, and truncation can leave a derivation with no conclusion. The better version conditions the model on the budget during training, so it learns to compress and land a conclusion inside the allowance. A training cap the model is not told about does something cruder: it becomes a learned test-time limit. On three small models (Qwen3.5-4B, Gemma4-E2B, Nemotron-3-Nano-4B) trained with GRPO on math under a fixed rollout cap (three seeds for the main comparison), AIME accuracy at the cap rose 10.9 to 42.4 points over the base model while accuracy at the largest budget tested fell 13.1 to 30.2 points below it; none of the tested fixes (single runs on Qwen3.5-4B) kept both (Budget Internalization, JetBrains Research, November 2026). So a reasoning model's accuracy means little until it is reported at several budgets, not only the one it was trained at.
Effort levels and routers move the decision to the model or to a classifier: an effort level is soft guidance within which the model may skip thinking on easy queries, and a router picks a fast or a deep model per request; research systems now train the decision per step and report cutting reasoning tokens by roughly half at little cost in success (details closed below).
Overthinking is real and measurable. On some inputs, longer chains reduce accuracy: the model revisits a correct answer and argues itself out of it, or drifts towards distractors. Gema et al. (2025) built tasks where "extending the reasoning length of Large Reasoning Models (LRMs) deteriorates performance", with five failure modes across model families: Claude models increasingly distracted by irrelevant information, o-series models overfitting to problem framings, a shift from reasonable priors to spurious correlations, loss of focus on long deductions, and amplified concerning behaviour. This is the failure mode adaptive-depth work exists to fix, and it means "always think harder" is not a safe default.
Effort levels. Anthropic replaced the budget with adaptive thinking and an effort setting: manual budgets are deprecated on the 4.6 models, and Claude 4.7 and later "reject requests that use it, returning a 400 error" (Anthropic docs). Effort is "soft guidance for how willing Claude should be to think and how deeply", and at low effort the model may skip thinking on simple queries (Anthropic: steering thinking). Gemini models "engage in dynamic thinking by default", controlled by thinking_level; the accepted levels (minimal, low, medium, high) and the default vary by model, and the Gemini API now uses it for the 2.5 models too (Gemini docs).
Routers. GPT-5 shipped as "a smart, efficient model", "a deeper reasoning model" and "a real-time router that quickly decides which to use based on conversation type, complexity, tool needs, and your explicit intent" (OpenAI, August 2025). Research systems now train the decision per step: CogRouter reports an 82.3% success rate with "62% fewer tokens" than its baselines (Yang et al., February 2026), and Ares cuts reasoning tokens "by up to 52.7% compared to fixed high-effort reasoning, while introducing minimal degradation in task success rates" (Yang et al., March 2026).
Anthropic's budget must be at least 1,024 tokens and below max_tokens, and it "sets a target" rather than a strict cap; with interleaved thinking it can exceed max_tokens because "the budget spans all thinking blocks within one assistant turn" (Anthropic docs). So max_tokens, not the budget, is the hard ceiling on a single response.
s1's control, the simplest that works (Muennighoff et al., 2025): end the thinking forcibly when the budget is spent, or append "Wait" when the model tries to stop early, which makes it re-examine its answer; this took s1-32B "from 50% to 57% on AIME24". The traces are illustrative.
Thinking is paid for three times. Money: thinking tokens are billed as output tokens, the expensive side of the price sheet; Claude 3.7 Sonnet cost "$3 per million input tokens and $15 per million output tokens", which "includes thinking tokens" (Anthropic, February 2025). Time: the answer cannot start until the thinking ends (section 2). Memory: every thinking token holds cache for the rest of the request (section 1). And the bill is for the thinking the model did, not the thinking you see: "You are billed for the full thinking process, not the thinking content visible in the response" when the API returns a summary; usage.output_tokens_details.thinking_tokens reports how many billed output tokens were reasoning, 312 of 348 in Anthropic's own example (Anthropic: steering thinking).
This is why the economics of test-time compute are unfavourable by construction: cost and latency grow linearly with thinking tokens while accuracy grows roughly with their logarithm over a useful range and then flattens, so each point costs more than the last; and why launches now lead with "same score, fewer tokens". Cost per task across the labs, with each one's prices and token counts, is the root's section 6.
One run gives the whole cost curve. Cut a run's transcript at a budget of X thinking tokens per question: questions answered within X count as solved, the rest score the chance of guessing. Sweeping X traces the model's score at every lower budget from its per-question token counts, without paying for new runs (the method of CAISI's evaluation of DeepSeek models, p. 66); in Epoch AI's use of it, telling models their budget gave about the same curves as lower effort settings (The plunging price of thought). It assumes a model would think the same way under a cap, which is the assumption the budget comparison tests.
One request with a 1,000-token prompt and a 500-token visible answer at $3 and $15 per million. At the default 10,000 thinking tokens: $0.003 for input plus 10,500 × $15 per million = $0.1575 for output, $0.1605 in all, 93.5% of it thinking; the same request answered without thinking costs $0.0105. Five parallel chains of 2,000 thinking tokens spend the same thinking but pay the prompt and the answer five times: $0.2025. derived from the list prices above.
How a model learns to use a scratchpad well has two answers, and current practice uses both. The algorithms (PPO, GRPO and its fixes) are on RL for LLMs: RLHF, GRPO, RLVR; this section is about what each recipe produces.
Supervised fine-tuning on reasoning traces. Collect problems, generate or obtain long chains of thought, keep the ones whose final answers are correct (rejection sampling, the STaR idea), and train on them as ordinary next-token prediction. Cheap, stable, no rollout infrastructure, and how a small model inherits a large one's reasoning style: DeepSeek's distilled R1 variants from 1.5B to 70B were produced exactly this way, from 800,000 R1-curated samples, "only SFT" and no RL stage (DeepSeek-R1; the R1 paper page). Small curated sets go further than expected: s1 fine-tuned Qwen2.5-32B-Instruct on s1K, "1,000 questions paired with reasoning traces" (Muennighoff et al., 2025). Its limits are structural. The student is bounded by the teacher. It imitates the surface form of deliberation, including steps it could not have derived itself, so it learns what reasoning looks like rather than a policy it can execute reliably. And because the training set is filtered for success, it contains almost no genuine errors and so teaches almost nothing about recovering from one.
RL with verifiable rewards (RLVR). Let the model generate its own trajectories and score the final answer with a program: string or numeric match against a reference for mathematics, a test suite for code, a checker for formal proofs. Two properties follow. First, the reward is not a learned model, so the usual reward-hacking channel (exploiting a reward model's misgeneralisation) is closed; what remains is gaming the checker itself, for example code that special-cases the visible tests. Second, and more important, the trajectories are the model's own, so credit assignment is on-policy: what gets reinforced is behaviour this model can actually produce. That is why long traces, self-checking and backtracking emerge under RLVR rather than having to be demonstrated.
R1-Zero was the clean demonstration: pure RL on a strong base model (DeepSeek-V3-Base), no supervised reasoning data at all, produced spontaneous re-derivation and reflection, and its responses grew over training "from hundreds to thousands" of reasoning tokens purely because longer thinking earned more reward, while AIME 2024 pass@1 rose from 15.6% to 77.9% (86.7% with self-consistency) in the expanded version (Nature, 2025; the January 2025 arXiv v1 reported 71.0%, and 86.7% with majority voting over 64 samples). The model learned to spend test-time compute because spending it was rewarded. The production recipe combines the two in a specific order, and R1's is the openly documented version:
RLVR's binding constraint is that it needs a verifier, so it covers mathematics, code and formal domains cleanly and writing, analysis and judgement poorly. Extending it means reintroducing a learned reward model or model-graded rubrics, which reopens exactly the reward-hacking channel that made RLVR attractive; length penalties and process reward models (section 4) only partially fix the verbosity and hacking that follow. The optimiser behind most reasoning RL is GRPO (Group Relative Policy Optimization, from DeepSeekMath): per prompt it samples a group of G completions, scores each with the verifier, and gives every token of a completion the same advantage, its reward minus the group mean over the group standard deviation, with no critic network. For test-time compute this means an RL run's bottleneck becomes generation throughput, since every prompt needs G long rollouts, which is why RL stacks run vLLM or SGLang inside the training loop and treat rollout and training weight synchronisation as a first-order engineering concern.
A group where all G completions are correct, or all wrong, has every advantage zero and contributes nothing but its sampling cost; a prompt the model solves with probability p gives such a group with probability pG + (1 − p)G, so on easy or impossible problems that is most of the batch. Every token of a failed trajectory is penalised equally, including correct early steps, because no critic remains to tell them apart. The worked example (rewards 1, 0, 0, 0 give +1.732 and −0.577), the PPO comparison, the KL term and the fixes most 2026 recipes use in place of textbook GRPO (Dr. GRPO, DAPO's higher upper clip, dynamic sampling of degenerate groups) are on RL for LLMs.
Each square is one completion with its advantage (green: verifier accepted). The zero-signal share is derived: with G = 4 a prompt solved 5% of the time wastes 81% of its groups; with G = 16, 44%.
RLVR-trained models beat their base models at small k such as pass@1, but the base models reach a higher pass@k when k is large: the RL model concentrates probability on solutions the base model could already sample rather than acquiring new ones. In pass@k terms, RL raises p on problems where it was already above zero and can drive it to zero where it was small, and 1 − (1 − p)k rewards breadth at large k. Pretraining quality still bounds the ceiling, which is the most important thing to hold before assuming an RL stage will fix a capability gap.
Yue et al. (2025) trained Qwen2.5-7B with GRPO and measured both ends of the pass@k curve at each checkpoint (their Tables 3 and 4), plotted as published. On Omni-MATH-Train pass@1 rises from 9.9% to 42.5% while pass@256 falls from the base model's 67.2% to 64.3%. published Whether newer, longer RL runs escape the pattern is debated on RL for LLMs, and agentic post-training shows the same trade on Sharpening Tax in Post-Training.
Ten illustrative problems with base-model p from 0.6 down to 0.005. After RL, p becomes 1 − (1 − p)s on the problems it kept and 0 on the ones it dropped. pass@k is the mean of 1 − (1 − p)k over the ten. With nothing dropped there is no crossover: sharpening alone costs no coverage, which is why the crossover Yue et al. measured is evidence that RL narrows what the model samples.
The latent way spends the budget in activations rather than in tokens. A looped transformer reuses the same layers several times per token, so serial depth grows without adding parameters and without writing anything down. The idea goes back to the Universal Transformer (Dehghani et al., 2018), which applied one block repeatedly with a learned halting rule. The clearest modern form is Huginn (Geiping et al., 2025): a prelude that embeds the token, a recurrent core iterated r times with the input re-injected each time, and a coda that decodes. Its 3.5-billion-parameter proof of concept, trained on 800 billion tokens with layers (2, 4, 2) and a mean of 32 iterations, improved on reasoning benchmarks "up to a computation load equivalent to 50 billion parameters".
Huginn at its training mean: 2 + 4 × 32 + 2 = 132 layer applications per token from 8 distinct layers. The stage runs the same 8 layers of weights three ways, to scale: an ordinary model buying 32 layers of depth by writing four tokens, Huginn's shape buying the same 32 in one token by looping its core, and RLT carrying a state from token to token.
Shapes are scaled down so they fit: 8 layers instead of a frontier model's dozens, 7 loops instead of Huginn's 32 (2 + 4 × 7 + 2 = 32), RLT's 4+4 split from its experiments rather than the report's 48+48 illustration. Layer counts, loop structure and the carried state follow Geiping et al. and the RLT project page; the tokens are placeholders.
Compute without the token bill and without the latency of emitting the reasoning; serial depth without parameters.
Everything downstream of the transcript: a monitor cannot read deliberation that was never written, an evaluation harness cannot reconstruct the working state, and a serving stack has to persist the recurrent state between requests or recompute it.
A looped block halves the block parameters to hold in memory, but costs about the same compute and the same KV cache as the unlooped depth it replaces: 22 blocks run twice need the cache of 44 distinct blocks (Raschka). Unless a later pass reuses what an earlier one chose: Zhipu's GLM-5.4 (about 750B, 28 layers looped twice) lets the second pass reuse the first pass's sparse KV selections and adds only a sliding window of new cache (Zhipu: GLM).
Which keys each pass reads decides how deep a hidden chain can get. With a cache per pass, block d of a later token reads keys that earlier tokens wrote at the same depth, so nothing comes back down to a shallower block unless it is written as a token: a hidden chain is bounded by layers × passes per token (22 × 2 = 44 block applications in Nanbeige4.2-3B, as in a 44-block model), the bound behind the argument that the written chain is the only route from later layers back to earlier ones. A recurrent cache, where early passes of a token read keys the last pass of earlier tokens wrote, removes the bound: each token adds 22 × (passes − 1), so a two-pass, 1,000-token answer can hide a chain of 22,022 block applications, and the written tokens could be filler. Huginn's own cache sharing does this, by its authors' account "a computation that is deeper than the current number of recurrence steps" (Geiping et al., section 6.3), and NVIDIA's Dory 4B runs in this mode (our reading of Raschka's looped-transformers article, which draws both arrangements from Nanbeige's config).
Other members of the family: Ouro (Zhu et al., 2025) pre-trains looped models on 7.7 trillion tokens with a learned depth allocation and reports 1.4B and 2.6B models matching up to 12B ones; Nanbeige4.2-3B runs its 22-layer stack twice, which its report found kept about 75% of a standard model's token efficiency, while sharing one KV cache between the passes halved the cache and lost quality, and Mixture-of-Recursions adds a router deciding per token how many passes it gets (both as summarised by Raschka). Looping reached production models in November 2026: Thinking Machines' Inkling 2 Mini runs its middle layers three times, and GLM-5.4 its 28 middle layers twice. The Mixture-of-Loops Transformer paper (ByteDance Seed) attacks the cache and the serial training instead, restarting each loop from the embeddings and reading the previous loop's keys and values as memory. The chain of thought was never a faithful window (models can reach an answer for reasons their stated reasoning does not reflect); recurrent depth is the sharper version, no window at all.
The Recurrent Looped Transformer (Yifan Zhang, Jichen Feng and Shihan Qin, September 2026) closes a different loop. In a standard decoder-only model nothing computed at the last layer of token t reaches the first layer of token t + 1; RLT pairs a causal encoder, which supplies token representations and a global key-value memory, with a decoder that feeds the previous token's final decoder state into the current token's input through a gated merge and keeps local sliding-window attention caches, in chunks that continue across prompt, response and message boundaries with no reset. That gives unbounded temporal depth at fixed per-token compute. The report illustrates a tied 48+48 layout, weights shared between encoder and decoder, so 96 logical blocks per token, and after t tokens the state path has traversed 48t decoder blocks. Its experiments use untied eight- and sixteen-layer models on six algorithmic tasks against a decoder-only transformer, three seeds each: the 5+3 and 7+1 splits keep 100% accuracy on 256-bit parity, and on permutation tracking at length 512 the 4+4 split reaches 55.70% ± 25.78 final-state accuracy against the transformer's 0.85% ± 0.30. The gains depend on the task and the split (addition accuracy falls beyond the trained operand widths), and the report "explicitly reports no measured efficiency, reasoning quality, or scaling results" and trains no language model (MarkTechPost), so for frontier models it is vocabulary rather than evidence.
OpenAI released GPT-6 Astra in September 2026, and reports that it uses this technique ("opaque recurrence", looping activations back through its layers so part of the deliberation never becomes text) came from press coverage rather than from OpenAI's announcement, which does not describe the architecture (OpenAI; TechCrunch). TechCrunch called Astra's use of it "reportedly limited", and OpenAI's chief scientist Jakub Pachocki wrote that "OpenAI has worked to preserve and utilize chain-of-thought monitoring since our very first reasoning models". The system card finds Astra's chain-of-thought controllability "substantially higher than that of GPT-5.6 Sol and GPT-5.5 Thinking", and that told a monitor is present it can shorten its chain of thought enough to "occasionally evade CoT-only monitors", while saying OpenAI is "quite confident that changes in CoT controllability are not differentially due to any architectural changes" (system card). Astra's product side is on OpenAI: GPT family.
Buck Shlegeris (Redwood Research) warned that if OpenAI pushes it further, "they'll have the option to massively increase the recurrence and totally destroys CoT monitorability" (TechCrunch). Ryan Greenblatt wrote that Astra "appears to be a massive jump in opaque reasoning ability", able to solve hard competition problems "entirely in its head", guessed the jump is downstream of architectural changes with more serial depth (with a normal pretraining scale-up a plausible alternative), and said that if later generations move to "full-on opaque reasoning architectures with extreme depth", chain of thought "would no longer be a meaningful oversight tool" (Greenblatt); a later post he co-authored argues the same at length (Finnveden et al.). Sebastian Raschka is the sceptical counterweight: the gains are "likely primarily due to other reasons, namely improved training recipes and training data" (Raschka's survey), reusing layers "does not by itself suppress visible chain of thought", and fewer reasoning tokens from more passes is the same effect as scaling up the model (Raschka on Astra). His reading of the system card rests on shorter traces and leaves out what else it measured: chain-of-thought controllability of 60.9% against GPT-5.6 Sol's 16.1% (UK AISI: 93% against 48%) and a no-CoT maths time horizon of 30.9 minutes against 3.6 (UK AISI); it also treats the KV cache as a memory cost rather than asking which pass reads which keys (our reading).
The first test on an open looped model: on NVIDIA's Dory 4B, going from 1 to 8 loops raised a no-CoT reasoning index by about 18 points while a general-ability index moved at most about 1.5, and in recurrent-cache mode, trained with RL against a chain-of-thought monitor, the model learned to solve tasks behind almost all-filler chains. One small model, single seeds and no matched non-looped control; a comment finds most of the jump in 2 of 19 task domains (Westover and Kuhn, 12 November 2026).
Before any model was trained to think, the cheapest way to spend inference compute on a task was to put the task in the prompt. In-context learning (ICL): the model picks up a task from text in its context window, inside the forward passes that read it, with frozen weights. No gradient step happens; what changes is the input, and every demonstration adds prompt tokens that each layer must process (prefill compute and KV cache, section 1), so it is test-time compute spent on reading rather than on writing.
It grows with scale. GPT-3's own measurement: averaged over 41 accuracy tasks, few-shot minus zero-shot widens from 1.8 points at 125M parameters to 14.8 at 175B, so larger models use the examples better (the paper page owns the numbers task by task). Many-shot: with long context windows the same protocol scales to hundreds or thousands of demonstrations; Agarwal et al. (Many-Shot In-Context Learning, 2024) report consistent gains over few-shot across many tasks, that many demonstrations can override pretraining biases, and that inference cost grows linearly with the number of examples.
Learning or recognising? GPT-3 left open whether the model learns the task "from scratch" in context or recognises one learned in pretraining. Min et al. (Rethinking the Role of Demonstrations, 2022) found that "ground truth demonstrations are in fact not required": replacing the labels with random ones barely hurts on classification and multiple-choice tasks across 12 models including GPT-3, because the demonstrations mostly convey the label space, the distribution of the input text and the format. A candidate mechanism is the induction head, an attention circuit that completes [A][B] ... [A] with [B]; Olsson et al. (In-context Learning and Induction Heads, 2022) find that induction heads form at the same point in training as a sharp jump in in-context learning, with causal evidence in small attention-only models and correlational evidence in larger ones (The transformer from zero builds the circuit).
The protocol is fragile, so it is part of every score. Zhao et al. (Calibrate Before Use, 2021) show that the prompt format, the choice of demonstrations and even their order can move accuracy from near chance to near state of the art (on GPT-3 2.7B, the order of the same four examples moves SST-2 from 54.3% to 93.4%), because the model favours certain answers; estimating that bias from a content-free input and correcting for it raised GPT-3 and GPT-2 accuracy by up to 30 points. That is why a benchmark score names its shot count ("5-shot MMLU") and why scores with different K, formats or example draws are not comparable (Topic: benchmarks).
From demonstrations to thinking. Chain-of-thought prompting began as a few-shot protocol: Wei et al. (2022) put worked reasoning in the demonstrations, and "just eight chain of thought exemplars" took a 540B-parameter model to the state of the art on GSM8K. Kojima et al. (2022) then removed the demonstrations: appending "Let's think step by step" to a zero-shot prompt raised text-davinci-002 from 17.7% to 78.7% on MultiArith and from 10.4% to 40.7% on GSM8K. Reasoning models internalise that move: they are trained to write the working themselves (section 8), so they are usually prompted zero-shot, and the test-time compute moves from reading demonstrations to writing a chain (section 1).
Most convenient; sometimes "unfairly hard" because the format is ambiguous.
The way a person is usually shown a task.
K as many as fit the window: typically 10 to 100 in GPT-3's 2,048 tokens.
The protocol GPT-3 named (its Figure 2.1 example; Language Models are Few-Shot Learners (GPT-3) animates the same example against fine-tuning, token by token). A demonstration is one solved example placed in the prompt; the highlighted line is the query the model completes.
The comparison-level mistakes (comparing scores without budget and harness, reading the chain of thought as an explanation, expecting thinking to add knowledge, treating a budget as a hard cap) are on the root; these are the ones this page's formulas catch.
Reading a pass@1 gain from RL as new capability. RLVR reliably converts pass@k into pass@1. Measure pass@k at large k against the base model before claiming the model can now solve problems it could not (section 8).
Assuming majority voting always helps. It amplifies the most likely answer. Where a systematic wrong answer is more likely than the right one, more votes lower accuracy (set p below the wrong answer's share in section 3's selector chart).
Scaling best-of-n against a reward model without limit. Past the peak the proxy score keeps rising while true quality falls, and nothing in the proxy signals it (section 3).
Forgetting that sequential tokens are serial. Doubling the thinking budget doubles the time to the first answer token; no amount of hardware parallelism removes it (section 2).
The formulas in the Reading tab's section 3 are for one problem with one success probability p. A benchmark is many problems with different p, and that changes the shape of every curve. Here p varies across problems as a Beta(α, β) distribution, an illustrative choice you can move; wrong answers on each problem split evenly over m values. Everything is computed exactly except the optional simulated benchmark.
On one problem the failure rate (1 − p)k falls exponentially, a curve that bends down on log-log axes. Averaged over a benchmark it falls as a straight line, a power law, because the few problems with tiny p dominate the average at large k. Schaeffer et al. (2025) showed this explains the power laws of Brown et al.: per-problem exponential scaling "can be made consistent with aggregate polynomial scaling if the distribution of single-attempt success probabilities is heavy tailed". For a Beta distribution it is exact:
Draw 200 problems from the distribution, sample 64 answers for each, and score them the way an evaluation would: pass@k with the unbiased estimator from all 64, the vote from the first k. The dots should sit on the exact curves, within sampling noise.
The "fitted to Brown et al." preset reproduces their stated MATH coverage by construction (α and β were solved from those two numbers, Llama-3-8B-Instruct: 82.9% at 100 samples, 98.44% at 10,000; Brown et al.): α = 0.5239 and β = 3.786 give 82.9% and 98.44%. It does not reproduce what they measured for voting: the paper reports 40.50% at 100 samples and 41.41% at 10,000 for majority voting or a reward model, a plateau the Beta model can match only through m, which the paper does not report. The preset's implied one-sample accuracy, α/(α + β) = 12.2%, is derived, not measured. The other presets are illustrative. On the default heavy-tail preset (α = 0.3, β = 1.5) the exact failure curve's slope between 1,000 and 10,000 samples is −0.300, equal to −α as the power law predicts.
The fit is the authors'; the numbers they state in the text are an independent check on it. Compare shapes within one model and task, never numbers across them.
Brown et al. (2024) sampled up to 10,000 times per problem and found that coverage (the fraction of problems some sample solves, pass@k with a perfect verifier) follows an exponentiated power law in the number of samples k:
The fits reproduce Brown et al.'s stated coverage within 2 points, independently (the fits come from the curves, the stated numbers are separate measurements): 17.6% and 57.9% against 15.9% and 56% on SWE-bench Lite; 83.2% and 97.5% against 82.9% and 98.44% on MATH. Gemma-2B on CodeContests does not reproduce at the far end: the fit gives 9.5% at 10,000 samples against the stated 7.1%. The dashed line is the paper's point: voting and reward models plateau near 41% while coverage climbs past 98%. Recomputed in src/recompute.py.
This page's tabs, the parent and the pages that own the neighbouring subjects, and the papers behind every claim, each with an approximate time. Links checked on 2026-10-24.
Why writing adds compute, one chain against many, the three selectors, process reward models, compute-optimal allocation, how long to think, what it costs, how RLVR trains it, recurrent depth. 26 min, plus 7 in closed details
A benchmark whose problems differ in difficulty: exact pass@k and vote curves, why coverage follows a power law, a simulated benchmark as a check, and Brown et al.'s coverage fits against their stated numbers. a tool: 4 min to read
Section 2 compares how the labs spend test-time compute (the four designs stepper, the three ways and five controls tables); section 6 is cost per task across labs. 25 min, plus 5 in closed details
The algorithms this page's section 8 only names: PPO, GRPO and its fixes, verifiable rewards and their failures, pass@1 against pass@k. 53 min, plus 13 in closed details
The KV-cache formula and a calculator for 45 models: what a long thinking trace holds in memory. 28 min, plus 13 in closed details
Paged attention, cache quantisation and scheduling: how servers afford long traces. 37 min, plus 21 in closed details
Temperature and the samplers that make parallel chains differ. 22 min, plus 4 in closed details
The general over-optimisation curve behind best-of-n against a reward model. 33 min, plus 12 in closed details
Reasoning distillation, how R1's small variants were made. 25 min, plus 8 in closed details
Each lab's own dial: Anthropic: Claude family (effort, preserved thinking), Google DeepMind: Gemini and Gemma (thinking levels, Deep Think), OpenAI: GPT family (router, efforts, Astra), xAI / SpaceXAI: Grok (Heavy), Alibaba: Qwen (two modes in one checkpoint). 17 to 27 min each
RLVR from a base model, the four-stage recipe, distillation; a tiny R1-Zero you can train. about 34 min
Where GRPO comes from. about 25 min
Post-training trades pass@K coverage for pass@1 on agentic tasks. about 26 min
PRM search against revisions, by difficulty; the 4× and 14× results. 60 min
Process against outcome supervision; PRM800K. 40 min
Coverage to 10,000 samples and the voting plateau. 40 min
Why per-problem exponentials average to a power law. 30 min
Majority voting over sampled chains. 30 min
Reward-model over-optimisation laws for best-of-n and RL. 40 min
1,000 traces and budget forcing. 25 min
Does RL really incentivise reasoning beyond the base model? pass@k at large k. 40 min
Tasks where longer reasoning lowers accuracy. 30 min
A recurrent-depth language model at 3.5B. 40 min
The expressive power of transformers with chain of thought. 45 min