Scaling Laws: Chinchilla and Precision

On Gopher's compute budget, a 70B model trained on 1.4 trillion tokens beat the 280B Gopher trained on 300 billion. The rule behind it: grow parameters and tokens together, about 20 tokens per parameter. A second paper adds a third knob: the bits that store each number.

Pick a model, or drag the size. The compute stays fixed at Gopher's budget, so a bigger model sees fewer tokens. Find the bottom of the valley. Then we build, piece by piece, the 6ND rule, three ways to find the optimum, the closed-form frontier, overtraining and precision.

You need a little Python and what a loss curve is. We build the rest from zero.

Session 22 of Georgia Tech CS 8803, LLM seminar. It rests on two papers: Hoffmann, Borgeaud, Mensch and 19 co-authors at DeepMind, Training Compute-Optimal Large Language Models (2022), and Kumar, Ankner, Spector, Bordelon, Muennighoff, Paul, Pehlevan, Ré and Raghunathan, Scaling Laws for Precision (2024). Every idea is re-taught here in our own words and devices.

Split one compute budget

32B

Losses are predicted by the paper's fitted formula L(N, D) = 1.69 + 406.4/N0.34 + 410.7/D0.28 (Section 3.3), not measured. The curve spends 5.76×1023 FLOPs by the 6ND rule. Gopher and Chinchilla sit at their real token counts, so each lies a little off the curve.

Chapter 0

The One-Way Bet

See why the split between model size and data is decided once, before training

A lab reserves a cluster for three months. That fixes the budget: a count of floating-point operations, or FLOPs. Before the run starts, someone picks two numbers: the parameter count and the number of training tokens. A run this large happens once. There is no second try.

From 2020 to 2022 most labs gave the same answer. They kept about 300 billion tokens and spent extra compute on a bigger model. Here are the five largest dense models of early 2022.

Compare six real models

Each bar is one published model. Switch the view. Watch the token column stay flat while the parameter column grows.

Sizes and token counts from the Chinchilla paper, Table 1.

What does a run cost? Call the parameter count N and the number of training tokens D. On each token, the forward pass costs about 2 FLOPs per parameter (a multiply and an add). The backward pass costs about twice that.

Say it aloud

C is about six times N times D.

C
C the training compute, in FLOPs.
6
six FLOPs per parameter per token: 2 on the forward pass, 4 on the backward pass.
N
N the number of parameters in the model.
D
D the number of training tokens the model reads, each once.
In plain words

Multiply the parameter count N by the token count D. Multiply by 6. That is the training compute C.

With numbers

Chinchilla: N = 70 billion, D = 1.4 trillion. C = 6 × 70×109 × 1.4×1012 = 5.88×1023 FLOPs. The paper's own layer-by-layer count for Gopher's budget is 5.76×1023, so the rule is 2% high here.

Many pairs (N, D) cost the same C. This session asks: which pair gives the lowest loss? Gopher sits at 300 / 280 = 1.07 tokens per parameter (D divided by N). The paper's answer is about 20.

Failure. A model too big for its data. Symptom: a smaller model trained with the same FLOPs beats it. Measure: tokens per parameter. Fix: choose N and D together from a fitted law, as Chapters 1 to 4 do.

  1. Fixed-model curves: the lowest loss at each FLOP count, read off whole training runs.
  2. IsoFLOP profiles: fix the budget, find the bottom of the valley. The hero's curve.
  3. The parametric loss: one formula for the loss of any N and D.
  4. The efficient frontier: the best N and D for any budget, and the 20-tokens rule.
  5. Chinchilla against Gopher: the test, on the same compute. The hero's two buttons.
  6. Overtraining: why labs now train far past 20 tokens per parameter.
  7. Precision as a third axis: quantizing after training, and effective parameters.
  8. Compute-optimal precision: how many bits to train in.
  9. Field guide: numbers, code, links and the credit.
Gopher has 280B parameters and read 300B tokens. Why is it wrong to say a smaller model beat it because Gopher had a worse architecture?

Chapter 1

Fixed-Model Curves

Read the best model for each FLOP count off the lower edge of many training runs

The paper finds the optimum three separate ways, and trusts it because all three agree. It trains over 400 models, from 70 million to over 16 billion parameters. Approach 1 reuses whole training curves:

  1. Take model sizes from 70 million to over 10 billion parameters.
  2. Train each size 4 times. In each run the learning rate decays 10× by the end. The 4 run lengths span a factor of 16.
  3. Smooth each loss curve. Plot it against the FLOPs spent so far.
  4. At each of 1,500 FLOP values, keep the run with the lowest loss. These points form the lower envelope.
  5. Fit a power law to the winning N and D.

Trace the lower envelope

Each grey line is one model size trained longer and longer. The teal line is the lowest loss at each FLOP count. Drag the budget and see which size wins.

10²⁰

Illustrative: the curves come from the paper's fitted formula of Chapter 3, with D = C / 6N, for 7 sizes from 70M to 10B. Real runs are noisy and the paper smooths them before taking the minimum.

How does the winner grow with the budget? Call the compute-optimal parameter count Nopt. Assume it grows as a power of the budget C, with an exponent a.

Say it aloud

N-opt is proportional to C to the a.

Nopt
N-opt the parameter count with the lowest loss for budget C.
∝
is proportional to equal up to a fixed constant factor.
C
C the training budget in FLOPs.
a
a the exponent: how fast model size should grow with compute. The tokens grow with their own exponent b.
In plain words

Multiply the budget C by some factor. Then Nopt grows by that factor raised to the power a. The rest of the compute goes to tokens.

With numbers

Approach 1 finds a = 0.50 (Table 2). Grow C ten times: Nopt grows 100.50 = 3.16 times, say from 1B to 3.16B, and the tokens also grow 3.16 times. Kaplan et al. (2020) had a = 0.73: the model grows 100.73 = 5.4 times and the tokens only 100.27 = 1.9 times.

Sourcea (Nopt ∝ Ca)b (Dopt ∝ Cb)
Approach 1, fixed-model curves0.50 (0.488 to 0.502)0.50 (0.501 to 0.512)
Kaplan et al. (2020)0.730.27

Table 2 of the paper. Brackets: 10th to 90th percentile over 100 bootstrap resamples of 80% of the data.

Why did Kaplan's study disagree? Its runs all used one cosine learning-rate schedule set for 130 billion tokens. A run read off at 10 billion tokens still had a high learning rate. So its loss looked worse than a run that had decayed. That made small-data training look weak and pushed the fit toward bigger models. Chinchilla matched each schedule to its run length, and every envelope point came from the last 15% of a run.

Failure. A schedule longer than the run. Symptom: short runs look bad. Measure: compare against a run whose cosine ends where it stops. Fix: decay the learning rate 10× over about the number of tokens you train on.

Kaplan's runs all used a schedule set for 130B tokens. How did that bias the fit toward bigger models?

Chapter 2

IsoFLOP Profiles

Fix the budget, vary the model size, and find the bottom of the valley

Approach 2 fixes the budget first. Pick a budget C. Train several model sizes, each on D = C / 6N tokens, so every run costs the same. Plot the final loss against model size. "Iso" means equal: every point on an IsoFLOP profile costs the same FLOPs.

The curve has a valley. Too small a model cannot hold what the data teaches. Too big a model runs out of compute before it reads enough tokens. The paper used 9 budgets from 6×1018 to 3×1021 FLOPs, with sizes up to 16B.

Few runs land exactly on the floor. So the paper fits a parabola to each valley and takes its lowest point, the vertex.

Fit the valley from three runs

Three runs, each twice the size of the last. The dashed parabola passes through them. Slide the runs away from the floor and watch the vertex drift.

centred

Losses from the paper's fitted formula of Chapter 3, so the true minimum is known. Budgets are the low, middle and high end of the paper's 9.

Where is the vertex? Space three sizes evenly on a log scale, a step h apart. Call their final losses y1, y2 and y3. The vertex sits a distance Δx from the middle size.

Say it aloud

Delta x equals minus h times y-three minus y-one, over two times y-three minus two y-two plus y-one.

Δx
delta x how far the vertex is from the middle size, in powers of ten.
h
h the step between sizes in powers of ten. 0.3 means each size is twice the last.
y3 − y1
y-three minus y-one the slope: how much the loss changes across the three runs.
y3 − 2y2 + y1
y-three minus two y-two plus y-one the curvature: how sharply the valley bends.
In plain words

Subtract the outer losses to get the slope. Combine all three to get the curvature. Divide the slope by twice the curvature, multiply by h, and flip the sign. Move that far from the middle size.

With numbers

At C = 1020 FLOPs, sizes 501M, 1B and 2B (h = 0.3) give y = 2.60262, 2.60813, 2.65442 from the fitted formula. Slope 0.05181, curvature 0.04078. Δx = −0.3 × 0.05181 / 0.08155 = −0.19. The vertex is at 109 − 0.19 = 645M parameters. A fine scan of the formula also finds 645M.

Fitting Nopt ∝ Ca to the 9 vertices gives a = 0.49 (0.462 to 0.534) and b = 0.51 (0.483 to 0.529). That matches Approach 1, from different runs and a different way of reading them.

Failure. Runs that miss the floor. Symptom: all three losses slope the same way. With sizes 2B, 4B and 8B at 1020, the same recipe says 701M, 9% too high. Fix: train sizes on both sides of the dip. The paper checked that every budget showed a clear minimum.

Why does loss have a minimum when you vary model size at fixed compute?

Chapter 3

The Parametric Loss

Write one formula for the loss of any model size and data size, and fit it to every run

Approach 3 writes one formula for the final loss of any (N, D). It fits that formula to every final loss from Approaches 1 and 2. The formula follows a split of the loss into three parts:

  1. The entropy of text: the loss of the best possible predictor. No model goes below it.
  2. The size gap: a model with N parameters, trained forever, still falls short of that best predictor.
  3. The data gap: training on only D tokens falls short of training forever.

Call the floor E. Give the size gap a scale A and an exponent α. Give the data gap a scale B and an exponent β.

Say it aloud

L of N and D equals E, plus A over N to the alpha, plus B over D to the beta.

L(N, D)
L of N and D the predicted training loss, in nats per token.
E
E the entropy floor. Fitted: 1.69.
A / Nα
A over N to the alpha the size gap. Fitted: A = 406.4, alpha = 0.34.
B / Dβ
B over D to the beta the data gap. Fitted: B = 410.7, beta = 0.28.
In plain words

Shrink A by N to the power alpha. Shrink B by D to the power beta. Add both gaps to the floor E. The sum is the predicted loss.

With numbers

Chinchilla, N = 70B and D = 1.4T: size gap 0.0835, data gap 0.1632, so L = 1.69 + 0.0835 + 0.1632 = 1.937. Gopher, N = 280B and D = 300B: 0.0521 and 0.2511, so L = 1.993. Gopher's extra size cut the size gap by 0.03, but its short data left a data gap 0.09 bigger.

Split a loss into three parts

Grey is the floor, warm is the size gap, purple is the data gap. Drag N and D, or pick a real model. See which gap is larger.

280B
300B

The paper's fitted constants (Section 3.3 and Appendix D.2). The small-model preset (400M on 8B tokens) is a row of Table 3.

The fit minimises a Huber loss between the predicted and observed log loss, with L-BFGS started from a grid of guesses. Huber counts a small miss as its square and a large miss in a straight line, so a few bad runs cannot drag the fit. The paper uses δ = 10−3. Larger δ overfit the cheap runs and predicted the large held-out runs badly.

A check you can run: A and B enter the formula linearly. Fix E, α and β. Two points, (400M, 8B) and (67B, 1.5T), give two equations in two unknowns. Solving them returns A = 406.4 and B = 410.7. With the losses rounded to four decimals you get 406.0 and 411.0.

Failure. A formula that fits small runs but bends wrong at scale. Measure: hold out the largest runs and predict them. Fix: tune the fit on held-out large runs, as the paper did when it chose δ.

In L = E + A/Nα + B/Dβ, what is E and why can no run go below it?

Chapter 4

The Efficient Frontier

Turn the fitted loss into the best size and data for any budget

With L(N, D) fitted, the best split is calculus. Put D = C / 6N into the loss. Now it depends on N alone. Take the derivative, set it to zero and solve for N.

Call the answer Nopt(C). The paper writes it with a constant G and an exponent a, both built from the fitted α, β, A and B.

Say it aloud

N-opt of C equals G times C over six, to the a. And a equals beta over alpha plus beta.

Nopt(C)
N-opt of C the parameter count with the lowest predicted loss for budget C.
G
G a constant: (alpha A over beta B) to the power 1 over (alpha plus beta). With the fitted values, 1.345.
C / 6
C over six the budget divided by 6 FLOPs per parameter per token: the product N times D you can afford.
a
a the growth exponent. 0.28 / 0.62 = 0.452. The tokens grow with b = α / (α + β) = 0.548.
In plain words

Divide the budget C by 6. Raise it to the power a. Multiply by G. That is Nopt. The tokens are what the budget has left: Dopt = C / 6Nopt.

With numbers

At Gopher's budget, C = 5.76×1023: C / 6 = 9.6×1022. Raised to 0.452 that is 2.39×1010. Times G = 1.345, Nopt = 32 billion parameters, on D = 3.0 trillion tokens. The paper's Figure 4 says 40 billion; Chapter 4's failure explains the gap.

Since a and b are close, D / N barely moves with the budget. Approach 1's own frontier (Table 3) shows it:

ParametersFLOPsTokensTokens per parameter
400 million1.92×10198.0 billion20.0
10 billion1.23×1022205.1 billion20.5
67 billion5.76×1023 (Gopher's)1.5 trillion22.4
175 billion3.85×10243.7 trillion21.1
1 trillion1.27×102621.2 trillion21.2
10 trillion1.30×1028216.2 trillion21.6

Six of the nine rows of Table 3 (Approach 1). Check a row with 6ND: 6 × 10×109 × 205.1×109 = 1.23×1022. The 67B row gives 6.03×1023, 5% above its listed budget, because 67B and 1.5T are rounded.

Move along the frontier

Warm is the best model size, purple the best token count. Drag the budget across ten powers of ten. Switch approach and watch the ratio.

5.8×10²³

Approach 1: both grow as C0.5 through its Gopher-budget point, 67B on 1.5T tokens (Table 3). Approach 3: the closed form above with the printed, rounded constants; the paper's unrounded fit gives 40B at Gopher's budget.

At Gopher's budget the three approaches say: 67B on 1.5T tokens (Approach 1, Table 3), 63B on 1.4T (Approach 2, Figure 3) and 40B (Approach 3, Figure 4). The paper concludes "between 40 and 70 billion parameters" and trained Chinchilla at the top: 70B on 1.4T tokens, exactly 20 tokens per parameter.

Failure. Trusting one rounded constant. The printed α = 0.34 and β = 0.28 have two decimals. Anywhere inside that rounding the same closed form gives 22 to 47 billion at Gopher's budget. Measure: vary each constant within its last digit. Fix: compare methods and build inside the band they share.

Why does Approach 1's tokens per parameter stay near 20 across nine powers of ten of compute?

Chapter 5

Chinchilla Against Gopher

Train the model the law recommends, on the same compute, and compare

A fitted law is a guess until someone trains the model it recommends. DeepMind trained Chinchilla on the same FLOPs as its own Gopher.

ModelLayersHeadsHead sizedmodelTokens
Gopher 280B8012812816,384300 billion
Chinchilla 70B80641288,1921.4 trillion

Table 4 and Table 1 of the paper. Same depth and head size; half the width and half the heads.

Is the compute matched? By 6ND, Gopher costs 6 × 280×109 × 300×109 = 5.04×1023 and Chinchilla 5.88×1023. The paper counts FLOPs layer by layer instead (Appendix F) and states that both models used the same number. Its count for that budget is 5.76×1023. For the sizes in Table A4, the layer count differs from 6ND by 1% to 10%.

Other things changed too, so this is not a one-variable test. Chinchilla used AdamW instead of Adam, a slightly different data mix, and a tokenizer without NFKC normalisation (94.15% of tokens shared). Both computed in bfloat16 with a float32 copy of the weights.

Compare at the same compute

Blue is Gopher, teal is Chinchilla. Pick a benchmark. Both bars cost the same training FLOPs.

MMLU 5-shot (Table 6), BIG-bench average of 62 tasks (Section 4.2.4), RACE-h few-shot (Table 7), TruthfulQA 0-shot (Section 4.2.5), BoolQ 0-shot (Table 8), WikiText-103 perplexity (Section 4.2.1, lower is better).

On MMLU, Chinchilla scored 67.6% against Gopher's 60.0%. That beat the June 2023 forecast of 63.4% made by 73 human forecasters. It was better on 51 of the 57 subjects, the same on 2 and worse on 4. On WikiText-103 the paper warns that 4× more data may leak test text, so it puts more weight on MMLU and BIG-bench.

Chinchilla is also 4× smaller. A forward pass costs about 2N FLOPs per token, so each token it serves costs about a quarter of Gopher's.

Failure. Reading a win with several changes as a pure scaling win. Measure: list every difference between the runs. Fix: ablate them; Appendix G tests the optimiser changes on their own.

Chinchilla and Gopher used the same training compute. What best explains Chinchilla's wins?

Chapter 6

Overtraining

Price in serving, and see why labs train small models far past 20 tokens per parameter

Chinchilla's rule minimises training compute only. A deployed model also pays for every token it serves. A forward pass costs about 2N FLOPs per token, so serving T tokens costs 2NT. Set that equal to the training cost 6ND, and T = 3D. Gopher's serving matches its training cost after 900 billion tokens. Chinchilla's matches after 4.2 trillion.

Past that point, a smaller model wins on total cost. So labs now train small models far past 20 tokens per parameter. The precision paper cites Llama-3-8B at about 2,000 and the Gemma-2 series at over 1,000. Training a model on far more tokens than the compute-optimal count is called overtraining.

What does overtraining give up? Call the tokens per parameter r (r = D / N). Under the 20-tokens rule, a model of size Neq costs 6 × Neq × 20Neq = 120Neq2 FLOPs. Ask which Neq costs the same as your run.

Say it aloud

N-eq over N equals the square root of r over twenty.

Neq
N-eq the size of a model trained at 20 tokens per parameter on the same FLOPs.
N
N your model's actual size.
√
the square root of it appears because the cost 120Neq2 grows with the size squared.
r
r your tokens per parameter, D / N.
20
twenty Chinchilla's tokens per parameter.
In plain words

Divide your tokens per parameter r by 20. Take the square root. That is how many times bigger a model the same compute would buy at the Chinchilla ratio. N cancels, so it holds at any size.

With numbers

Llama-3-8B: N = 8B, r = 2,000, so D = 16T tokens. Its compute is 6 × 8×109 × 16×1012 = 7.68×1023 FLOPs. √(2,000 / 20) = 10, so that compute would train an 80B model at 20 tokens per parameter. The lab chose 8B because serving it costs a tenth as much.

Overtrain an 8B model

Drag the tokens per parameter. Four bars show what changes against a Chinchilla-style run of the same model, on a log scale.

2,000

Our arithmetic from 6ND, 2N FLOPs per served token and the 20-tokens rule. The fragility bar uses the precision paper's fitted exponent γD = 0.5068 (Chapter 7): same model, same bits, more data.

Overtraining also hits a data wall. Table 3's 10-trillion-parameter model needs 216.2 trillion tokens, which the paper calls "far beyond what is currently used". The paper also lists its own limits:

Failure. Overtrain, then quantize for serving. Symptom: the compressed model loses more quality than expected. Measure: loss before and after quantization. Fix: Chapter 7.

Llama-3-8B trained at about 2,000 tokens per parameter. Does that contradict the Chinchilla paper?

Chapter 7

Precision as a Third Axis

Measure what fewer bits cost, after training and during it

The model stores every number in some count of bits: its precision. Fewer bits mean less memory and, on suitable hardware, faster maths. Kumar et al. (2024) ask what bits do to loss. They train 465 OLMo-style models on Dolma, 30M to 220M parameters on 1.5B to 26B tokens, in 3 to 16 bits.

There are two ways to use fewer bits:

First finding. Call the extra loss that PTQ adds δPTQ, and the precision after rounding Ppost. The paper fits a scale CT and three exponents.

Say it aloud

Delta-PTQ equals C-T times D to the gamma-D, over N to the gamma-N, times e to the minus P-post over gamma-post.

δPTQ
delta-PTQ the loss added by rounding the trained weights.
CT
C-T a fitted scale: 0.0598.
DγD
D to the gamma-D more training tokens raise the damage. Fitted gamma-D: 0.5068.
NγN
N to the gamma-N more parameters lower the damage. Fitted gamma-N: 0.3439.
e−Ppost/γpost
e to the minus P-post over gamma-post each extra bit after rounding cuts the damage by the same factor.
In plain words

Raise D to gamma-D and divide by N to gamma-N. Scale by C-T. Shrink by one fixed factor for every bit Ppost. Since gamma-D and gamma-N are close, the damage roughly tracks tokens per parameter.

With numbers

Same 8B model, same bits, 100 times more data: 16T tokens against 160B. N, CT and Ppost cancel in the ratio, so the damage grows 1000.5068 = 10.3 times.

The fit has R2 = 0.97 (Figure 2). Past a critical data size, more pretraining makes the quantized model worse, even while the unquantized loss keeps falling.

Second finding. Low-precision training acts like having fewer parameters. Call the effective parameter count Neff, the training precision P, and a fitted sensitivity γ.

Say it aloud

N-eff equals N times one minus e to the minus P over gamma.

Neff
N-eff the size of a full-precision model with the same loss.
N
N the real parameter count.
1 − e−P/γ
one minus e to the minus P over gamma the share of parameters still useful. It climbs toward 1 as bits grow.
P
P bits of precision during training.
γ
gamma the sensitivity: larger means more bits are needed. For weights, gamma-w = 2.6745.
In plain words

Divide the bits P by gamma. Take e to minus that. Subtract it from one. Multiply N by the result to get Neff.

With numbers

Weights at P = 4 bits, gamma-w = 2.6745: e−1.496 = 0.224, so the share is 0.776. A 70B model trained with 4-bit weights acts like a 54B one. At 8 bits the share is 0.950; at 16 bits, 0.997.

The three parts multiply: Neff = N × (share for weights) × (share for activations) × (share for KV cache). Put Neff in place of N in the Chinchilla formula and the loss follows.

Remove bits, part by part

Each curve is one part of the model; the teal curve is all three multiplied. Drag the bits. Watch which part falls first.

6.0

The paper's fitted γ for each part, with the per-part offset n that Appendix K says the fit adds: share = 1 − e−P/γ + n. That reading of the offset reproduces the paper's 3-bit instability and its 7 to 8 bit optimum (Chapter 8).

Failure. Activations or KV cache at 3 bits. The paper's runs there often diverged, so it does not fit them. Measure: watch the loss for spikes. Fix: keep those parts at 4 bits or more.

A model will be quantized after training. What does the first finding say about training it on more and more data?

Chapter 8

Compute-Optimal Precision

Spend one budget across parameters, tokens and bits, and find the best training precision

Bits cost compute too. The paper scales Chinchilla's cost linearly in the training precision P:

C = (6 / 16) · N · D · P   at P = 16 bits this is 6ND

Now fix P. How do the best N and D move against Chinchilla's full-precision answer, NCh? Call the average of the three sensitivities γ̄ (gamma-bar), 1.9475.

Say it aloud

N-star of P over N-Ch is proportional to one minus e to the minus P over gamma-bar, raised to minus three alpha over alpha plus beta, times P to the minus beta over alpha plus beta.

N*(P) / NCh
N-star of P over N-Ch the best model size at precision P, against Chinchilla's best at full precision, on the same budget.
[1 − e−P/γ̄]
one minus e to the minus P over gamma-bar the useful share of each part at P bits, with gamma-bar the average sensitivity.
−3α/(α+β)
minus three alpha over alpha plus beta three parts, and a negative power: a smaller share means a bigger model. It is −1.5 when alpha equals beta.
P−β/(α+β)
P to the minus beta over alpha plus beta fewer bits make each FLOP cheaper, so there is more compute to spend. It is P−0.5 when alpha equals beta.
In plain words

Lower P shrinks the bracket, and the negative power turns that into a bigger N*. Lower P also frees compute. Both say: if you must train in low precision, add parameters before data.

With numbers

The paper ties alpha = beta = 0.4965. From 16 to 4 bits the bracket goes from 0.99973 to 0.87177. N*(4) / N*(16) = (0.99973 / 0.87177)1.5 × (16 / 4)0.5 = 1.228 × 2 = 2.46. The full fit, with its offsets, is steeper: the device gives 4.6, in line with the paper's warning that below 4 bits models must grow "more than 4x".

Now let P move too. Setting all three derivatives to zero removes C from the equation for the best P. So the compute-optimal precision does not depend on the budget. The paper finds it "around 7-8 bits". If N is fixed in advance, as in a model family with set sizes, the best precision instead grows with log C.

Trade bits for parameters

The curve is the best loss at each training precision for one budget. The pink dot is your precision, the teal ring the best one. Drag the budget in both modes and watch whether the ring moves.

4
10²¹

Computed live from the paper's fitted constants (Appendix K: A = 4,299, B = 18,060, E = 2.7648, α = β = 0.4965, per-part γ and offsets) under C = (6/16)NDP. The constants come from runs of 30M to 220M parameters; the paper says to trust the trends, not the numbers.

Two practical messages follow. Training in 16 bits spends compute on bits the model barely uses. Pushing below 4 bits forces the model to grow faster than the saved FLOPs can pay for. The paper's footnote adds that real speedups are less than linear in bits, because of systems overhead.

Failure. Training in 16 bits out of habit. Symptom: nothing visible; you pay for unused bits. Measure: a small IsoFLOP sweep over precision. Fix: about 7 to 8 bits when N is free; more bits for a fixed-size model that is heavily overtrained.

When N, D and P are all free, the best precision does not depend on the budget. What does that mean in practice?

Chapter 9

Field Guide

Keep the terms, the numbers, the code and the open questions in one place

Chinchilla showed that parameters and tokens should grow together, about 20 tokens per parameter, and proved it by beating Gopher on the same compute. The precision paper treats bits as a third resource: fewer bits shrink the effective parameter count, data makes later rounding hurt more, and 7 to 8 bits is the fitted training optimum. Both papers use one method: fit a small formula to many runs, then minimise it.

TermMeaningNumber to remember
6NDtraining FLOPs for N parameters on D tokensChinchilla: 5.88×1023
Tokens per parameterD / NGopher 1.07; Chinchilla 20
Exponents a, bNopt ∝ Ca, Dopt ∝ Cb0.50 / 0.50 (Approach 1); Kaplan 0.73 / 0.27
Parametric lossE + A/Nα + B/Dβ1.69, 406.4, 410.7, 0.34, 0.28
Gopher's budgetthe best size by method67B, 63B, 40B; built 70B on 1.4T
MMLU5-shot average, 57 subjects60.0% to 67.6%
Overtrainingr far above 20Llama-3-8B about 2,000; Neq/N = √(r/20) = 10
δPTQloss added by rounding after traininggrows as D0.5068: 100× data, 10.3× damage
Neffparameters still useful at P bitsweights at 4 bits: 0.776 (main-text form)
Best training precisionN, D, P all free7 to 8 bits, for any budget

Checklist

  1. Fix the budget C first. Then choose N and D together, never D by default.
  2. Match each run's learning-rate schedule to its token count before you compare runs.
  3. Fit at least two ways (envelope, IsoFLOP, parametric) and build inside the band they share.
  4. Check every scaling table against its own constraint, C = 6ND.
  5. Ask how a fitted exponent's last digit moves the answer before you trust an extrapolation.
  6. If the model will serve heavy traffic, price serving in and expect to overtrain.
  7. If it will be quantized, measure the loss after rounding, not only before.
  8. Train near 7 to 8 bits when N is free; below 4 bits, expect to need a much larger model.
pythonimport math

E, A, B, alpha, beta = 1.69, 406.4, 410.7, 0.34, 0.28     # Chinchilla, Approach 3

def loss(N, D):                                  # nats per token
    return E + A / N**alpha + B / D**beta

def frontier(C):                                 # best N and D for budget C (FLOPs)
    a = beta / (alpha + beta)
    G = (alpha * A / (beta * B)) ** (1 / (alpha + beta))
    N = G * (C / 6) ** a
    return N, C / (6 * N)

def n_eff_share(P, gamma=2.6745):                 # weights, main-text form
    return 1 - math.exp(-P / gamma)

print(loss(70e9, 1.4e12), loss(280e9, 300e9))      # 1.937  1.993
print(frontier(5.76e23))                          # (3.22e10, 2.98e12): 32B on 3.0T
print(math.sqrt(2000 / 20), 100 ** 0.5068)        # 10.0  10.3
print(n_eff_share(4), n_eff_share(8))             # 0.776  0.950

Where it meets the rest of the course

SessionLink to the (N, D, P) frame
01 Pretraining datasupplies the tokens D, and their quality
04 Mixture of expertsseparates total N from compute per token
08 Attention sinksthe same KV cache, under eviction instead of rounding
15 Test-time scalingspends compute at inference, outside 6ND
21 Calibrationtwo models with equal loss can be calibrated differently

What the authors leave open

Chinchilla: only two large runs, a hint that large optima are still too big, and no runs that repeat data. The precision paper: small models (up to 220M fitted, 1.7B validated), integer-type fits checked on floating point, loss only (no downstream tasks), a fixed architecture, and a cost model that real hardware does not reach. Both say the functional forms matter more than the constants.

Keep going

Credit: Session 22 of Georgia Tech CS 8803, LLM seminar. Papers: Training Compute-Optimal Large Language Models (Hoffmann et al., arXiv 2203.15556) and Scaling Laws for Precision (Kumar et al., arXiv 2411.04330). The toy curves and our own arithmetic are labelled where they appear.

The takeaway. Fix the budget, then spend it on every resource the loss depends on: parameters, tokens and bits. Fit a small formula to many cheap runs, minimise it, and test the answer with one real run.

Teach it back: open Present or Teach and explain why Gopher was too big for its compute. Then go back to the valley and find its floor before you press Chinchilla.

CS 8803 LLM Seminar, Session 22: Scaling Laws, Chinchilla and Precision
Chinchilla paper · Precision paper · Back to Gleams