A small model that thinks longer can beat a model with 14 times more parameters, for the same FLOPs, on questions it already partly solves. On the hardest questions it cannot. There you must change the model: at pretraining, or by training it at test time.
Pick how hard the questions are and how much traffic the model will serve, then watch where the bigger model's star lands. Then we build, piece by piece, the verifier, difficulty bins, beam search, revisions, the FLOPs exchange rate and test-time training.
You need a little Python and what a probability is. We build the rest from zero.
Session 15 of Georgia Tech CS 8803, LLM seminar. It rests on two papers: Snell, Lee, Xu and Kumar, Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters (2024), and Yuksekgonul, Koceja, Li, Bianchi and colleagues, Learning to Discover at Test Time (2026). Every idea is re-taught here in our own words and devices.
Questions
Inference load R (tokens served / tokens pretrained)
The star's position is exact: it uses the paper's FLOPs exchange rate with M = 14 and its three R values, 0.16, 0.79 and 22 (Section 7). The curves and the star's height are a toy, shaped like the paper's Figure 9: test-time compute wins on easy questions and at light use, and loses on hard questions and at heavy traffic.
Chapter 0
See why asking a model many times helps only when a right answer is among the tries
A model solves a hard algebra question one time in twenty. You cannot retrain it today. You can ask it sixteen times. Will it get the question right?
Extra work done on one question, after training, is test-time compute. The weights stay frozen. You pay in extra forward passes, so in latency and dollars. Two things must hold for it to help. A right answer must be among the tries, and something must pick it out.
Start with the first part. Call the chance that one sample is right p, the pass@1 of the question. Call the number of independent samples N. The chance that at least one is right is pass@N, also called coverage.
Pass at N equals one minus the quantity one minus p, to the power N.
Take the chance that one sample misses, 1 − p. Multiply it by itself N times to get the chance that every sample misses. Subtract that from 1.
With made-up numbers: p = 0.05 and N = 16. All miss with chance 0.9516 = 0.44, so pass@16 = 0.56. At N = 64 it is 0.96. A question at p = 0.001 reaches only 0.06 at N = 64.
Each dot is one sample: green is right, red is wrong. Set the pass@1, pick N, and press Draw.
Toy, run live. The slider is on a log scale from 0.1% to 90%. The bar is the exact coverage from the formula above; the dots are one random draw.
Coverage is a ceiling. A real picker misses some right answers, so it lands below the bar. The papers in this session study two ways to raise what you get under that ceiling.
| Lever | What it changes | Example in this lesson |
|---|---|---|
| The proposal | what the model writes next | a revision model that reads its last attempt (Ch 4) |
| The verifier | which written answer you keep | a process reward model plus search (Ch 1, 3) |
Failure. The symptom: accuracy stays flat as you add samples. Measure pass@N with a ground-truth checker on a dev set. If coverage is near zero, no picker can help. Fix: change the model, which is where Chapters 7 to 9 go.
Chapter 1
Train a scorer that rates every step of a solution, using rollouts in place of human labels
A solution drops a minus sign at step 3, so the answer at step 4 is wrong. A judge that sees only the end knows it is wrong, but not where.
The Snell paper names two parts. The proposal distribution is what the model samples. The verifier scores what it sampled. An outcome reward model (ORM) gives one score to a finished answer. A process reward model (PRM) gives a score after every step.
A PRM trained on the human labels of PRM800k was easy to fool, even by plain best-of-N. The authors blame the gap between its GPT-4 solutions and PaLM 2's writing. So they label steps without people, following Wang et al. For each step, they let the base model finish the solution 16 times. The share of finishes that reach the right answer is the step's label.
Pick a step and press Roll: sixteen finishes run from it. Then drag the PRM's guess.
The 16 rollouts per step and the loss are from the paper (Appendix D). The steps and their true values, 0.80 and 0.10, are a toy.
The PRM outputs a number from 0 to 1 at each step. Call the rollout label y and the PRM's guess ŷ. Training lowers the binary cross-entropy loss L.
L equals minus the quantity: y times log y-hat, plus one minus y, times log of one minus y-hat.
Weight log ŷ by y and log(1 − ŷ) by 1 − y. Add, and flip the sign. The loss is smallest when ŷ equals y.
12 of 16 rollouts succeed, so y = 0.75. With ŷ = 0.55: L = −(0.75 × −0.598 + 0.25 × −0.799) = 0.648. With ŷ = 0.75 it falls to 0.562, its minimum. With ŷ = 0.10 it jumps to 1.753.
Because the label is "the chance of finishing right from here", the PRM estimates reward-to-go. To score a whole answer, the authors tried the product of step scores, the minimum, and the last step's score. The last step won (Appendix E). Then best-of-N weighted picks the final answer: add the scores of all samples that reach the same answer, and keep the answer with the largest sum.
The PRM beat an ORM trained on the same model, and the gap grew with N (Appendix F). Last-step scoring uses the PRM like an ORM, so the authors suspect the step labels help mostly as training signal.
Failure. The symptom: the verifier's top pick is wrong more often as N grows. Measure accuracy of best-of-N against N on a dev set. Fix: train the verifier on the same model's own samples, as the authors did.
Chapter 2
Sort questions into five bins by how often this model solves them, and keep the estimate honest
Two strategies tie on average accuracy. One wins on easy questions and loses on hard ones; the other does the reverse. An average hides that. So the paper scores every strategy per difficulty level.
Difficulty here is a property of the model and the question together. The base model answers each test question 2,048 times. Its pass@1 on that question is the share it got right. The 500 MATH test questions are then cut into five equal groups, or bins: bin 1 the easiest fifth, bin 5 the hardest. The authors found these bins predicted which strategy works better than the dataset's own hand-made difficulty labels.
Why 2,048 samples? Because a share measured from few samples is noisy. Call the true pass@1 p and the number of samples n. The typical error of the measured share is its standard error, SE.
S-E equals the square root of p times one minus p, divided by n.
Multiply p by 1 − p. Divide by the number of samples n. Take the square root. That is the usual size of the error.
With a made-up p = 0.20: at n = 8, SE = √(0.16 / 8) = 0.141, so about 14 points of noise. At n = 2,048, SE = 0.0088, under 1 point.
Each tick is one measurement of the same question. The bands are the five bins. Pick a sample count and press Measure.
Toy, run live. We made up the bin edges (0.02, 0.10, 0.30, 0.60); the paper's edges are quantiles of its own 500 questions and are not published.
This oracle difficulty needs the true answer to grade the 2,048 samples. A new user question has no answer key. So the paper also builds model-predicted difficulty: the same bins, made from the PRM's average final score over the 2,048 samples. Its curves largely overlap the oracle ones.
Two honest details. Choosing a strategy and reporting its score on the same questions would flatter it, so the paper uses two-fold cross-validation: choose on one half of each bin, report on the other, then swap. And the 2,048 samples cost compute that the experiments do not charge. The authors call cheaper difficulty estimates future work.
Failure. The symptom: a strategy table tuned on one model fails on another. Measure: recompute the bins for the new model. Fix: bins never transfer, because difficulty belongs to the model.
Chapter 3
Prune bad partial solutions early with beam search, and see when pruning backfires
Best-of-N finishes every sample before it looks at any. If a sample breaks at step 2, you still pay for steps 3 to 10. A PRM scores partial solutions, so you can stop bad ones early.
Beam search uses a budget of N beams and a beam width M. The paper's steps:
It stops when solutions end or after 40 rounds. Best-of-N weighted then picks among the N finished answers. With N = 16 and M = 4, each round keeps 4 and grows them back to 16.
Lookahead search judges a step by rolling it k more steps ahead at temperature 0, and using the PRM score at the end. Beam search is lookahead with k = 0. Each step now costs k + 1 samples, so a budget of N costs N × (k + 1). At N = 256 and k = 3 that is 1,024 samples.
Each column is one round. Warm dots are steps the model sampled; teal rings mark the N / M kept. Press Step. Turn on the exploit to plant a short, wrong answer that the PRM likes.
The procedure and the cost N × (k + 1) are the paper's (Section 5.2 and 5.3). The scores and the planted exploit are a toy; the paper reports exploits of this kind (repetitive closing steps, solutions of 1 or 2 steps) in Appendix M.
The paper's results, on MATH with PaLM 2-S* (Figure 3):
| Where | What happened |
|---|---|
| Small budgets | beam search clearly beats best-of-N |
| Large budgets | the gain fades; beam often falls below best-of-N |
| Lookahead | generally worst at the same budget |
| Bins 1 and 2 | beam gets worse as the budget grows (4, 16, 64, 256) |
| Bins 3 and 4 | beam beats best-of-N at every budget |
| Bin 5 | no method makes much progress |
Why does more search hurt easy questions? The PRM is a learned guess, with quirks. Beam search hunts the highest score, so with enough budget it finds answers the PRM likes but that are wrong. This is over-optimization. On easy questions the PRM is mostly right already, so search only amplifies its errors. On harder ones the right answer is rare, and search helps find it.
Failure. The symptom: accuracy falls as you raise the beam budget. Measure accuracy per bin at budgets 4 to 256. Fix: use best-of-N on easy questions, which Chapter 5 turns into a rule.
Chapter 4
Fine-tune a model to fix its own last attempt, then choose the answer from the whole chain
Search changes which answer you keep. Revision changes what the model writes: it reads its earlier attempts and tries again. Prompting a model to fix its own mistakes mostly fails on reasoning, so the authors fine-tune a revision model, building on Qu et al.
The authors build the training data from parallel samples (Section 6.1, Appendix H):
At test time the model runs longer chains by keeping only the four most recent attempts in context. Pass@1 rises at each step, even past the four it trained on (Figure 6).
There is a catch. The model saw only wrong answers in context during training. At test time a right answer can appear mid-chain, and the model may revise it into a wrong one. About 38% of correct answers flip this way.
So the paper never trusts the last attempt. It picks from the whole chain by majority vote or by a verifier. The verifier is an ORM trained on the revision model's own outputs, because the base PRM transferred badly (Appendix J).
One row is one sample chain: green attempts are right. The curves are exact for this toy. Drag the chain length and the flip rate.
The 38% flip rate is the paper's (Section 6.1). The rest is a toy: the first attempt is right 20% of the time, a wrong attempt becomes right 12% of the time per step, and the verifier finds a right attempt 85% of the time if one exists.
Now compare at a fixed budget N: N revisions in sequence, or N independent samples in parallel. Sequential narrowly wins, with either selection method. The authors read the two as different tools. Parallel samples are a global search over different approaches. Revisions are local refinement of one approach.
So the best split depends on difficulty (Figure 7, budget 128). Easy questions do best with all of it sequential. Harder questions do best with a mix of chains and depth. The paper suggests √N chains of √N steps as a balanced default.
Failure. The symptom: a longer chain scores worse than a shorter one. Measure how often a wrong attempt follows a right one. Fix: select from the chain, never the last link.
Chapter 5
Pick the best strategy for each difficulty bin and budget, and get best-of-N accuracy for a quarter of the samples
Chapters 3 and 4 found the same thing on two levers: the best strategy depends on the bin and the budget. So choose it per bin. That is the paper's compute-optimal strategy.
Call one strategy setting θ: best-of-N or beam, the width M, the lookahead k, or the sequential share. Call the budget N and a bin b. Call the accuracy of θ on bin b at budget N Accb(θ, N).
Theta-star for bin b at budget N equals the argmax over theta of Acc-b of theta and N.
For bin b and budget N, run every setting θ on one fold. Keep the one with the highest accuracy Accb. At test time, find a question's bin and apply that setting.
With the toy numbers below at N = 64: in bin 1, best-of-N scores 88% and beam 80%, so θ* is best-of-N. In bin 3, best-of-N scores 47% and beam 55%, so θ* is beam.
The paper writes this per question, as Equation 1. A per-question choice needs the answer, so the bin is the stand-in: difficulty acts as the one fact you know about a question. The rule is a lookup table filled offline. The model learns nothing new at test time.
Blue is best-of-N, teal is beam search. The ring marks the rule's pick. Change the budget and watch the picks flip in the easy bins.
Illustrative numbers, shaped like the paper's Figure 3 (right) but not read from it: the paper prints no per-bin values. The 16 against 64 comparison in the read-out matches the paper's real headline.
The real results. With PRM search, compute-optimal scaling nearly matches best-of-N at 64 samples using 16 (Figure 4). With revisions, it beats best-of-N at 256 using 64 (Figure 8). Predicted and oracle bins give largely overlapping curves; with search, predicted bins lose some of the gain at high budgets.
Read the headline with care. The paper states it four ways: "more than 4×" in the abstract, "about 4x" in the introduction, "nearly outperform ... using up to 4x less" in Section 5, and "a factor of 2 − 4×" in the discussion. The figures support the careful form: up to 4×, at some budgets.
Failure. The symptom: a tuned lookup table gives no gain on new traffic. Measure: compare the bin mix of the new traffic with the tuning set. Fix: re-measure the table; it fits one model and one benchmark.
Chapter 6
Put pretraining and inference in one currency, FLOPs, and derive how much thinking a bigger model's cost buys
You could spend your extra FLOPs on a model 14 times larger. Or keep the small model and let it think longer. To compare them on equal terms, count both in FLOPs, the floating-point operations a computer does.
Call the parameter count Np, the pretraining tokens Dpre, and the tokens generated over the model's life Dinf. The paper uses two standard counts: pretraining costs 6 FLOPs per parameter per token, and inference costs 2.
X = 6 · Np · Dpre Y = 2 · Np · Dinf
Make the model M times larger, with the same data. Both terms grow M times, to M(X + Y). The bigger model answers with one greedy sample. Now keep the small model and let it generate D′inf tokens instead, so its total matches:
6 Np Dpre + 2 Np D′inf = M (6 Np Dpre + 2 Np Dinf)
Divide by 2Np and by Dinf. Call the inference load R = Dinf / Dpre.
D-prime-inf over D-inf equals M, plus three times M minus one, divided by R.
Start from M. Add the pretraining FLOPs the bigger model wastes, M − 1 times the old amount, turned into inference tokens at 3 to 1 and spread over the served load R.
The paper's M = 14 and R = 0.79: 14 + 3 × 13 / 0.79 = 14 + 49.4 = 63.4. At R = 0.16 it is 257.8; at R = 22 it is 15.8. Light use gives the small model about 16 times more room than heavy traffic.
The top bar is the bigger model's FLOPs; the bottom bar is the small model's at the same total. Drag M and R.
Exact formula from Section 7. The three chips are the paper's R values. R runs on a log scale from 0.05 to 50.
The paper places the 14× model as a star at each FLOP-matched point (Figure 9). If the star sits below the small model's curve, test-time compute wins. On easy and medium questions (bins 1 to 3, sometimes 4), or at low R, it wins. On bins 4 and 5, or at high R, pretraining wins. The authors' summary: the two are not 1-to-1 exchangeable.
The derivation grows parameters with the data fixed, as the LLaMA models did; scaling both together is left to future work.
Failure. The symptom: a deployed small model costs more than the big one would. Measure your real R: lifetime served tokens over pretraining tokens. Fix: at high R, buy parameters, not thinking.
Chapter 7
Keep training the model on the one problem in front of it, because frozen search cannot reach what it never samples
Bin 5 did not move. A frozen model with pass@1 near zero has coverage near zero (Chapter 0). Sampling more, searching better, revising longer: all of them draw from the same distribution. Snell et al. name the remedy as future work: feed what test-time compute finds back into the model.
The second paper, Test-Time Training to Discover (TTT-Discover), takes a related route on one problem. It runs reinforcement learning at test time. The model keeps training on its own attempts at this problem, so its distribution moves. The authors' analogy is a student on a hard assignment who learns from failed tries. Prompting a frozen model, as AlphaEvolve does, is the student who never learns.
The grey line is the reward of each solution x. The shaded curve is the policy. Warm dots are this step's 32 samples. Pick a mode and press Run.
Toy, run live: a one-dimensional problem with a Gaussian policy and 32 samples per step for 50 steps (the paper uses 512 per step for 50 steps). The update weights samples the way Chapter 8 describes. Over 300 seeds, the frozen policy finds the peak about 6% of the time and the learning policy almost always.
The setup is a Markov decision process (Table 1). A state s is a candidate solution: a step function that certifies a math bound, a GPU kernel, or algorithm code. An action a is thinking tokens plus code. Running the code gives the next state. The reward R(s) is a continuous score, such as 1 / runtime, and it is 0 if the state fails a validity check.
A discovery is a state with R(s) above rsota, the best known reward. That goal differs from standard RL in two ways:
| Standard RL | Discovery | |
|---|---|---|
| Goal | high average reward | one state above the best known |
| What you keep | the policy, used again later | the best state; the policy is a means |
The loop, as the paper's Algorithm 1 in Python:
pythondef ttt_discover(d, theta, steps=50): R, T = get_env(d) # reward and transition from the problem text H = [("<empty>", R("<empty>"))] # buffer of states and rewards for i in range(steps): s, c = reuse(H) # pick a start state (Chapter 9) a = sample(theta, d, s, c) # thinking tokens + code s2 = T(a); r = R(s2) # run the code, score the result H.append((s2, r)) theta = train(theta, d, s, c, a, r) # the line frozen search never runs return max(H, key=lambda h: h[1]) # the best state, not the policy
In practice each step samples a batch of 512 rollouts (8 groups of 64) and takes one gradient step on gpt-oss-120b with LoRA rank 32.
Failure. The symptom: a learning run settles on safe, average solutions. Measure the best reward per step, not the mean. Fix: an objective that rewards the best samples (Chapter 8) and reuse that keeps exploring (Chapter 9).
Chapter 8
Weight each rollout exponentially by its reward, and let a KL budget set how hard
In the paper's example the record kernel runs in 2,000 µs, and 1,900 µs would be a breakthrough. Under plain expected reward the two earn nearly the same signal. Naive RL optimizes the average and is blind to the record.
TTT-Discover uses the entropic objective: the log of the average of e to the β times the reward. As β grows, it tends to the maximum reward. In a batch, it becomes a weight per rollout. Say the batch holds N rollouts from one start state, rollout n has reward rn, and β sets how sharp the weighting is.
Q-beta of n equals e to the beta r-n, divided by the sum over m of e to the beta r-m.
Multiply each reward rn by β and take e to that power. Divide by the sum over the batch. A large β hands almost all the weight to the best rollout.
With made-up rewards 0.5, 0.7 and 0.9: at β = 1 the shares are 0.27, 0.33 and 0.40. At β = 10 they are 0.02, 0.12 and 0.87.
The advantage is about N · qβ(n) − 1, so an average rollout gets 0. The update also subtracts a KL penalty against the starting policy.
How large should β be? Too large early makes training unstable; too small late makes the advantages vanish. So the paper sets β per start state with a budget. Call the even share u(n) = 1/N. The KL divergence measures how far qβ has moved from it.
K-L of q-beta from u equals the sum over n of q-beta of n times log of N times q-beta of n, and the paper sets it equal to the natural log of two.
Raise β from 0. At each value, compute the weights qβ and their KL from even. Stop when KL reaches ln 2. The paper finds that β by bisection.
Rewards 0.5, 0.7 and 0.9 reach ln 2 at β = 10.6, with shares 0.01, 0.11 and 0.88. Rewards 0.80, 0.81, 0.82 and 0.83 need β = 145 to reach the same budget.
Eight rollouts from one start state; the dashed line is an even share. Drag the spread, then β.
Live, with the paper's batch estimator (Appendix A.1). The rewards are a toy: seven evenly spread, one standout.
The budget adapts. Close rewards near the optimum allow a large β. One standout rollout forces a small β, so one lucky sample cannot take over. Shifting or scaling all rewards leaves the advantages unchanged, so microseconds and math bounds share one setting.
Failure. The symptom: training collapses early. Measure the top rollout's weight per state. Fix: cap the weighting with a KL budget, not a fixed β.
Chapter 9
Start each attempt from a promising past solution, chosen by a PUCT score, and test each part by removing it
An attempt that starts from an empty file cannot go far. State reuse starts from a past solution in the buffer, so a good kernel improves over many attempts. Always taking the best state kills diversity. TTT-Discover scores each buffered state with a rule inspired by PUCT, the formula AlphaZero uses to pick moves.
For a buffered state s: Q(s) is the best reward among its children (its own reward if never expanded). P(s) is a prior from its rank by reward. n(s) counts expansions of s or its descendants. T is the total expansions so far, c an exploration weight, and scale the reward range in the buffer.
Score of s equals Q of s, plus c times scale times P of s times the square root of one plus T, divided by one plus n of s.
Take the best child reward Q. Add an exploration bonus: the rank prior P, scaled by c and the reward range, grown by √(1 + T), and shrunk by 1 + n(s). Pick the state with the largest total.
With made-up states, T = 10, c = 1 and rewards from 0.40 to 0.90 (scale 0.5): A has Q = 0.92, P = 1/2, n = 8, so 0.92 + 0.092 = 1.012. C has reward 0.55, P = 1/3, n = 0, so 0.55 + 0.553 = 1.103. B has Q = 0.45, P = 1/6, n = 1, so 0.588. Unexplored C wins this round.
The main text omits "scale"; Appendix A.2 includes it, and we follow the appendix. The buffer keeps the top 2 children of each expansion and at most 1,000 states.
Each bar is a real TriMul run on an H100; shorter is faster. Pick a training objective and a reuse rule.
Train
Reuse
All eight runtimes are from Table 8 of the TTT-Discover paper, measured with the authors' own evaluator. Combinations the paper did not run say so. The leaderboard time for the full method is 1,161.2 µs (Table 4).
PUCT reuse alone, with frozen weights, cuts 5,352 µs to 2,061 µs, 2.6 times faster, but still slower than the best human's 1,371 µs. Training without reuse barely moves (5,274 µs). Training plus reuse wins: expected reward 1,986, constant β 1,484, adaptive β 1,203. ε-greedy reuse with adaptive training also beats the human, at 1,329 µs. Only the full method is best.
Failure. The symptom: every group starts from the same state. Measure distinct seed states per step. Fix: a bonus that shrinks with visits, as in PUCT.
Chapter 10
Read the results with their limits, keep the numbers, and take the code
Test-time compute has three settings. Search and revision spend inference on a frozen model; they pay off where the model already half solves the question. Pretraining changes what the model knows. Test-time training changes the model for one problem, at a few hundred dollars a run.
The authors report every problem they tried, with gpt-oss-120b.
| Problem | Best before | TTT-Discover |
|---|---|---|
| Erdős minimum overlap (lower is better) | 0.380924 (AlphaEvolve) | 0.380876, a 600-piece asymmetric step function |
| First autocorrelation inequality (lower) | 1.50314 (ThetaEvolve, refining the prior record) | 1.50287 in Table 2 (1.50286 in the text) |
| Second autocorrelation inequality (higher) | 0.9610 (AlphaEvolve V2) | 0.9591: no discovery |
| TriMul kernel, A100 (µs) | 4,531.5 (best human) | 2,198.2, about 2.06× faster |
| TriMul kernel, H100 (µs) | 1,371.1 (best human) | 1,161.2 |
| MLA-Decode, MI300X (µs) | 1,653.8 to 1,688.6 (best human, by instance) | 1,669.1 to 1,706.1: no significant win |
| AtCoder ahc039 (higher) | 566,997 (best human) | 567,062 |
| AtCoder ahc058 (higher) | 848,373,282 (ALE-Agent; best human 847,674,723) | 848,414,228 |
| Single-cell denoising, PBMC score | 0.64 (MAGIC) | 0.71 |
The Erdős gain over AlphaEvolve, 0.380924 − 0.380876 = 0.000048, is 16 times AlphaEvolve's own gain over the human record, 0.380927 − 0.380924 = 0.000003. With the smaller Qwen3-8B, TTT-Discover beat ThetaEvolve's run without the prior record as a start, on both inequalities (1.50525 against 1.50681; 0.9472 against 0.9468), with a smaller sampling budget.
| Term | Meaning | Number to remember |
|---|---|---|
| pass@N | chance one of N samples is right | p = 0.05: 0.56 at N = 16 |
| PRM | scores every step | labels from 16 rollouts per step |
| Difficulty bin | fifth of questions by the model's pass@1 | 2,048 samples, 5 bins, 500 questions |
| Beam search | keep top N / M steps each round | M = 4 or √N; at most 40 rounds |
| Lookahead cost | samples for k-step lookahead | N × (k + 1) |
| Revision flip | right answers revised to wrong | about 38% |
| Compute-optimal gain | same accuracy, fewer samples | 16 vs 64 (search), 64 vs 256 (revisions) |
| Exchange multiplier | M + 3(M − 1) / R | M = 14: 257.8, 63.4, 15.8 |
| KL budget | sets β per state | γ = ln 2 |
| TTT-Discover run | 50 steps of 512 rollouts, LoRA rank 32 | about $500 on Tinker |
pythonimport math def pass_at_n(p, n): # coverage of n independent samples return 1 - (1 - p) ** n def multiplier(M, R): # FLOP-matched extra inference tokens return M + 3 * (M - 1) / R def entropic_weights(r, gamma=math.log(2)): # r: rewards of one batch, same start state def q(b): e = [math.exp(b * (x - max(r))) for x in r]; s = sum(e) return [v / s for v in e] kl = lambda w: sum(v * math.log(len(r) * v) for v in w if v > 0) lo, hi = 0.0, 1e4 for _ in range(60): # bisection on beta mid = (lo + hi) / 2 lo, hi = (mid, hi) if kl(q(mid)) < gamma else (lo, mid) w = q(lo) return lo, [v * len(r) - 1 for v in w] # beta, advantages (mean 0) print(round(pass_at_n(0.05, 16), 2)) # 0.56 print(round(multiplier(14, 0.79), 1)) # 63.4 print(round(entropic_weights([0.5, 0.7, 0.9])[0], 1)) # 10.6
Credit: Session 15 of Georgia Tech CS 8803, LLM seminar. Papers: Snell, Lee, Xu and Kumar, Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters (arXiv 2408.03314v1, 2024); Yuksekgonul, Koceja, Li, Bianchi, McCaleb, Wang, Kautz, Choi, Zou, Guestrin and Sun, Learning to Discover at Test Time (arXiv 2601.16175v2, 2026). The toy questions, curves and landscapes are ours.
Teach it back: open Present or Teach and explain why beam search hurts easy questions and what the KL budget does. Then go back to the FLOPs dial and predict where the star lands before you press a button.