From GPT to Production
Scaling laws and emergent abilities
What gets better when you make it bigger
Here is the surprise at the heart of modern AI: the test loss of a language model is not a mystery you discover after training - it is a number you can predict in advance from three inputs. Give me the parameter count, the number of training tokens, and the compute budget, and I can tell you roughly how good the model will be, because loss falls as a smooth power law in each of them. And every so often, riding on top of that smooth curve, a brand-new ability appears almost overnight.
The core idea
Cost usually rises with size; here a good thing (low loss) improves with size, and it does so on a schedule. Double the compute and the loss drops by a fixed fraction, not a fixed amount - the signature of a power law. Plotted on ordinary axes it's a swooping curve; plotted on log-log axes it's a ruler-straight line. That line is the map the field navigates by.
Loss is a straight line on log-log
A power law ties a quantity to a resource through an exponent. Writing for loss and for compute, the reducible part of the loss behaves like . There is a floor - the irreducible entropy of language itself, which no amount of compute removes - and everything above it shrinks as a power of the budget:
Take the logarithm of the reducible part and the power law unmasks itself as a straight line - slope , no curvature anywhere:
The Chinchilla loss law (the real fitted form)
Hoffmann et al. fit the loss of a Transformer as a function of parameters and training tokens with two power-law terms over a floor:
Their fitted constants are (nats/token - the floor), for parameters, and for data. One more fact glues it together: training a Transformer costs about floating-point operations. Those four numbers plus that constraint are the entire demo below.
Drag the compute budget along the frontier
The top panel is a log-log plot of the reducible loss (everything above the floor ) against the compute budget . Drag the slider to spend more or less compute. For each budget the plotter places you at the compute-optimal point - the best split of that budget into parameters and tokens - and reads off the predicted loss. The bottom panel tracks one downstream skill's accuracy at the same scale. Watch it: near zero, near zero... then a sudden cliff.
Reducible loss vs compute - a power law (straight on log-log)
An emergent ability - accuracy vs the same compute scale
Same budget, two knobs - spend it wrong and you waste it
Notice the tokens-per-parameter ratio never moves off ~20. That is the Chinchilla headline: for a fixed compute budget, parameters and tokens should grow together, roughly . GPT-3 had 175B parameters but saw only ~300B tokens (~1.7 tokens each) - it sat off this frontier, over-sized and under-trained. Chinchilla used the same compute as its predecessor Gopher but with 70B params and 1.4T tokens, landed on the frontier, and beat it. The compute wasn't the problem; the split was.
Compute-optimal training
Because compute is pinned at , choosing forces . Chinchilla asks: across all valid splits of a fixed , which minimizes the loss law above? The answer is that both grow as roughly the square root of compute:
Kaplan et al. (2020) first drew these lines and - with a different treatment of the learning-rate schedule - leaned toward spending most new compute on parameters. Chinchilla (2022) re-ran the experiment more carefully and found data had been badly under-weighted. Same phenomenon, sharper measurement, a very different prescription. Both papers agree on the shape; they disagree on the slope of the split, and that disagreement reshaped how every frontier model since is trained.
# Chinchilla: pick params & tokens for a fixed compute budget C.
E, A, B = 1.69, 406.4, 410.7 # loss-law constants
alpha, beta = 0.34, 0.28 # the two exponents
def optimal(C): # C in FLOPs
N = (C / 120) ** 0.5 # since C = 6*N*D and D = 20*N
D = 20 * N # ~20 tokens per parameter
loss = E + A / N**alpha + B / D**beta
return N, D, loss # optimal(5.88e23) -> 70B, 1.4T, 1.94When abilities emerge
The loss curve is smooth, yet specific capabilities - three-digit arithmetic, following an instruction, chain-of-thought - can stay pinned near zero for model after model and then jump sharply once scale crosses some threshold, as the bottom panel shows. Wei et al. called these emergent abilities: not present in smaller models, present in larger ones, and not obviously extrapolable from the small-scale trend.
There is an honest caveat worth carrying. Schaeffer et al. argued some emergence is partly a measurement artifact: a harsh all-or-nothing metric like exact-match makes a smoothly improving model look like it snaps on, whereas a softer metric reveals steady gains underneath. So the loss is genuinely smooth; whether a skill looks emergent depends partly on how you score it. Either way, the practical lesson stands - you cannot always predict which skills a bigger model will unlock, only that the loss will keep obeying its law.
Check yourself
A quantity that plots as a perfectly straight line on log-log axes is following a:
For a fixed compute budget, Chinchilla says the compute-optimal move is to:
Recall: what is 'emergent' about an emergent ability, given that the loss curve is smooth?
Test whether you can articulate the disconnect between smooth loss and discontinuous capability. Try to state it, then check.
Lock it in
- Test loss of a Transformer follows a power law in parameters, data, and compute - straight on log-log, predictable in advance.
- The Chinchilla loss law with pins the entire scaling frontier.
- Compute-optimal training scales parameters and tokens together (D ~ 20N); over-sizing the model while under-training it wastes budget.
- Emergent abilities jump sharply at a threshold despite smooth underlying loss; part of the sharpness may be a measurement artifact of harsh metrics.
Primary source
The compute-optimal result and the fitted loss law come from "Training Compute-Optimal Large Language Models" (Hoffmann et al., 2022 - the Chinchilla paper). The original power-law study is "Scaling Laws for Neural Language Models" (Kaplan et al., 2020). Read them side by side to see how a more careful experiment flipped the prescription for how to spend compute.
Ask your teacher
Scaling laws are Big-O's cousin: both describe how a quantity grows with a resource. Big-O asked "how does cost grow with input size ?"; a scaling law asks "how does loss fall with compute ?" - same power-law machinery, pointed at a different pair. That predictability is precisely why "just make it bigger" has driven the field. Want the derivation of the split, or how these laws break down at the extremes? Ask and I'll build the follow-up.