Part XVII — LLM Post-Training: SFT, DPO, GRPO & Reasoning / Test-Time Compute · Chapter 8

Reasoning models & test-time compute scaling

Hook

RLVR and GRPO both spend compute at TRAINING time — sampling groups, verifying them, updating weights. But a model that has already finished training can still trade accuracy for compute at the moment you actually ask it something: think longer before answering, at zero cost to the weights themselves.

Intuition
chain-of-thought length = 0.0 steps → accuracy = 0.200

Drag the chain-of-thought length and watch accuracy climb along the curve — steeply at first, then flattening out. Every extra reasoning step still helps, but each one recovers a shrinking slice of the remaining gap to a perfect score.

Formalize

Accuracy approaches, but never reaches, a ceiling as the chain of thought gets longer — a geometric decay toward 11:

accuracy(L)=1(1a0)dL\text{accuracy}(L) = 1 - (1 - a_0)\,d^{\,L}
  • LL — chain-of-thought length, in reasoning steps, spent before committing to an answer.
  • a0a_0 — the single-shot accuracy at L=0L=0, with no reasoning steps at all.
  • dd — the decay factor: the fraction of the remaining gap to perfect accuracy left AFTER one more step. d<1d < 1 means each step still helps, but by a shrinking amount.
  1. Diminishing, not disappearing, returns

    dL0d^L \to 0 as LL grows, so accuracy keeps climbing forever — but dLd^L shrinks geometrically, so each additional step buys less than the one before it.

  2. Compute cost is a different shape entirely

    Accuracy is concave in LL (bending downward), but the compute spent generating that chain of thought is linear in LL — a straight line, no diminishing anything.

  3. A concave gain against a linear cost has an optimal stopping point

    Net utility (accuracy gained minus compute spent) rises while the marginal accuracy gain still exceeds the constant marginal cost, then falls once it doesn't — that crossing point is the compute-optimal chain-of-thought length.

Play
accuracy = 0.200, compute cost = 0.00, net utility = 0.200

Drag again, but now watch three numbers at once: accuracy climbing, compute cost climbing right alongside it in a straight line, and net utility rising, peaking, then falling. Past the peak, every extra reasoning step is spending more compute than the accuracy it buys is worth.

Worked example

Base accuracy a0=0.2a_0 = 0.2, decay d=0.8d = 0.8, cost 0.020.02 compute units per reasoning step:

  1. Accuracy at a few chain-of-thought lengths
    • L=0L=0: 10.8×0.80=10.8×1=0.21 - 0.8 \times 0.8^0 = 1 - 0.8 \times 1 = 0.2
    • L=1L=1: 10.8×0.81=10.64=0.361 - 0.8 \times 0.8^1 = 1 - 0.64 = 0.36
    • L=4L=4: 0.84=0.40960.8^4 = 0.4096, so 10.8×0.4096=10.327680.6721 - 0.8 \times 0.4096 = 1 - 0.32768 \approx 0.672

    Each step's gain is smaller than the last.

  2. Compute cost grows linearly
    • L=5L=5 costs 0.02×5=0.100.02 \times 5 = 0.10 units.
    • L=10L=10 costs exactly twice that, 0.200.20 units.

    No discount for going further.

  3. Net utility peaks at L=10

    Utility =accuracy(L)0.02L= \text{accuracy}(L) - 0.02L at the three candidate lengths:

    • L=9L=9: 0.890.13420.8^9\approx0.1342, accuracy =10.8×0.13420.8926=1-0.8\times0.1342\approx0.8926, utility 0.89260.02×9=0.89260.18=0.7126\approx0.8926-0.02\times9=0.8926-0.18=0.7126
    • L=10L=10: 0.8100.10740.8^{10}\approx0.1074, accuracy =10.8×0.10740.9141=1-0.8\times0.1074\approx0.9141, utility 0.91410.02×10=0.91410.20=0.7141\approx0.9141-0.02\times10=0.9141-0.20=0.7141
    • L=11L=11: 0.8110.08590.8^{11}\approx0.0859, accuracy =10.8×0.08590.9313=1-0.8\times0.0859\approx0.9313, utility 0.93130.02×11=0.93130.22=0.7113\approx0.9313-0.02\times11=0.9313-0.22=0.7113

    L=10L=10's utility (0.7141\approx0.7141) beats both neighbors — the compute-optimal chain-of-thought length for this cost weight, found by the same search a real inference-time compute budget would run.

Checkpoint

Drag the chain-of-thought length until you find the one that maximizes net utility — accuracy gained minus compute spent.

length = 0.0, net utility = 0.2000
Drag the point to try it
Summary
accuracy(L)=1(1a0)dL\text{accuracy}(L) = 1 - (1 - a_0)\,d^{\,L}

Test-time compute is a second knob, entirely separate from training: the same trained policy can spend more or less inference-time compute per query and trade latency for accuracy on the fly, with no gradient step involved. Diminishing returns mean there's always a compute-optimal chain length past which more reasoning steps cost more than they're worth — exactly the tradeoff a deployed reasoning model has to navigate for every single request.