On this page
You have a fixed training budget of FLOPs. One plan trains a 200B-parameter model on modest data; another trains a 30B model on nearly seven times as many tokens. Both burn the exact same cluster bill, yet one can finish with higher loss or cost four times as much to serve.
Scaling laws resolve that choice before you rent a cluster by fitting empirical power laws to cross-entropy loss over three quantities: parameters () (check whether embedding/output heads are counted), training token presentations () (total subword presentations, distinct from unique corpus size), and compute () (useful training FLOPs, distinct from wall-clock time or dollars). Kaplan et al. scaled parameters much faster than tokens,[1] Hoffmann et al.'s Chinchilla study scaled both equally,[2] and later work reconciled their disagreement and added lifetime inference cost.[3][4]
Why scale beats hand-crafted heuristics: the Bitter Lesson
In The Bitter Lesson, Rich Sutton summarized seventy years of AI history: as compute grows by orders of magnitude, general learning and search overtake hand-crafted human heuristics.[5] Deep Blue and AlphaZero discarded human chess heuristics for search and self-play,[6] and neural networks overtook hand-engineered SIFT/HOG vision features as datasets and GPUs grew.[7] Hand-crafted rules win on day one under tight compute, then hit an irreducible ceiling; general learners turn every 10x jump in FLOPs into a better curve.
Where the 6ND shortcut comes from
For a dense linear layer with , each multiply-add takes 2 FLOPs per weight, giving FLOPs per token. Backpropagation runs two equally sized matrix multiplications: activation gradients () and weight gradients (). Summing forward and backward across tokens yields:
Two variations shift that constant immediately: full activation checkpointing recomputes one extra forward pass during backprop, raising training compute to ; inference has no backward pass, dropping dense per-token arithmetic to . (Long contexts or huge vocabularies add quadratic attention and output-head costs that need exact FLOP accounting.[3]) For a 1B model on 20B tokens, FLOPs.
Double parameters, double data, or both
Start from a 1B model on 10B tokens under a fixed tokenizer and validation split (cross-entropy is measured in nats per token, so changing tokenizers breaks loss comparisons):
| Experiment | Relative compute () | Loss (nats) | ||
|---|---|---|---|---|
| Baseline | 1B | 10B | 1x | 2.80 |
| Double parameters | 2B | 10B | 2x | 2.60 |
| Double data | 1B | 20B | 2x | 2.55 |
| Double both | 2B | 20B | 4x | 2.35 |
Both middle runs burn compute, yet more tokens beat more parameters by 0.05 nats; doubling both relieves both bottlenecks. Under a power law with irreducible entropy floor , equal multiplicative compute jumps produce steadily shrinking absolute loss drops.

With Kaplan's parameter exponent , a 2x parameter jump cuts the power-law term by 5.1%, a 10x jump cuts it by 16.1%, and a 100x jump cuts it by 29.5%.
Kaplan scaling laws (2020)
Kaplan et al.[1] swept non-embedding parameters, fresh tokens, and compute while holding other axes abundant: , , and . Jointly optimizing and at fixed compute produced a heavily parameter-biased rule:
That recipe drove GPT-3 (175B on 300B tokens, 1.7:1)[8] and Gopher (280B on 300B tokens, 1.07:1).
| Compute multiplier | Kaplan () | Chinchilla () |
|---|---|---|
| 10x | ||
| 100x |

The Chinchilla reallocation (2022)
Hoffmann et al.[2] trained over 400 models (70M to 16B parameters, 5B to 500B tokens) and found GPT-3 and Gopher severely undertrained: parameters and tokens should scale roughly equally.
Why did the two studies disagree ( vs. )? Hoffmann et al. traced part of it to Kaplan reading intermediate checkpoints off one fixed cosine decay schedule. Porian et al.[3] later identified three even larger causes: counting vocabulary head FLOPs, avoiding oversized warmup on small runs, and scaling learning rate, batch size, and AdamW cleanly with size.
Deriving the compute-optimal split
Three independent Chinchilla methods agreed closely: empirical lower envelope (), IsoFLOP slices (), and parametric L-BFGS fit () to:
Substituting and setting balances the marginal log-sensitivities, , giving exact closed-form scaling laws:
Notice that the compute exponents and sum to 1 (notice sits on and sits on ). With Hoffmann et al.'s , and , close to , summarized as ~20 tokens per parameter (). Crucially, equal exponents () fix the growth slope, not the ratio itself: the optimal ratio depends on your tokenizer, architecture, and data mix.[2]
import numpy as np
# Equal exponents (gamma=0.5) fix growth slope, while (B/A)^(1/gamma) sets D/N.
gamma, product = 0.5, 1e6
for a, b in [(1.0, 1.0), (2.0, 8.0)]:
ratio = (b / a) ** (1.0 / gamma)
n = np.sqrt(product / ratio)
print(f"A={a:.0f}, B={b:.0f} -> N={n:.0f}, D={ratio * n:.0f}, optimal D/N={ratio:.0f}:1")
flops, r = 1e24, 20.0
n_opt = np.sqrt(flops / (6.0 * r))
print(f"At 1e24 FLOPs (20:1): N={n_opt / 1e9:.1f}B params, D={r * n_opt / 1e12:.2f}T tokens")A=1, B=1 -> N=1000, D=1000, optimal D/N=1:1
A=2, B=8 -> N=250, D=4000, optimal D/N=16:1
At 1e24 FLOPs (20:1): N=91.3B params, D=1.83T tokens
Chinchilla vs. Gopher: the frontier test
DeepMind tested its prediction by training 70B Chinchilla on 1.4T tokens (, reported budget ) against 280B Gopher on 300B tokens (, reported budget ).[2] Chinchilla beat Gopher across MMLU, BIG-bench, and LAMBADA with fewer weights, cutting weight memory and dense inference FLOPs by . That raised an immediate question: if smaller checkpoints cut serving cost so sharply, why stop at the training-optimal ratio?
Beyond Chinchilla: inference-aware scaling
Chinchilla minimizes loss for fixed training compute (). Under training and inference proxies, cumulative serving FLOPs surpass training as soon as served volume exceeds . Labs therefore overtrain smaller models far beyond 20:1, trading upfront training FLOPs for cheaper serving on every user token.
Sardana et al.[4] minimized total lifetime compute . Comparing a larger model and a smaller overtrained model at equal target quality, the smaller model pays upfront premium and saves per served token, breaking even at:
When training and inference FLOPs have different unit dollar costs (), the financial break-even scales by .
Concrete break-even: 70B/1.4T vs. 30B/4.0T
At equal quality, 30B/4.0T ( FLOPs) costs more training FLOPs than 70B/1.4T () and saves 80B FLOPs per served token, breaking even at 1.65T served tokens ( lifetime FLOPs).

import numpy as np
names = ["70B / 1.4T", "30B / 4.0T"]
params, tokens = np.array([70e9, 30e9]), np.array([1.4e12, 4.0e12])
train_flops = 6.0 * params * tokens
break_even = (train_flops[1] - train_flops[0]) / (2.0 * (params[0] - params[1]))
print(f"Training FLOPs: A={train_flops[0]:.2e}, B={train_flops[1]:.2e} | break-even={break_even:.2e}")
for demand in (1e12, 3e12):
winner = names[int(np.argmin(train_flops + 2.0 * demand * params))]
print(f"At {demand / 1e12:.0f}T served tokens -> cheaper: {winner}")Training FLOPs: A=5.88e+23, B=7.20e+23 | break-even=1.65e+12
At 1T served tokens -> cheaper: 70B / 1.4T
At 3T served tokens -> cheaper: 30B / 4.0TThe Llama lineage reflects this shift directly: LLaMA 1 7B trained at 143:1 (1T tokens),[9] Llama 2 7B at 286:1 (2T),[10] Llama 3 8B at ~1,875:1 (15T+ tokens), and Llama 3 405B at 38.5:1 (15.6T).[11]
Finite public text and test-time compute
Aggressive overtraining meets the finite supply of high-quality public human text: Villalobos et al.[12] projected single-run token demand intersecting the effective public stock ( quality- and repetition-adjusted tokens) around 2028 (2026 to 2032).
At inference, test-time compute brings back search: spend extra compute per hard prompt via longer reasoning chains (DeepSeek-R1[13]) or Best-of- sampling. Snell et al.[14] showed adaptive test-time compute let a smaller model match one ~14x larger on math at equal FLOPs. Sampling candidates of length multiplies dense generation FLOPs linearly: (an 8B model generating 512 tokens across 1, 4, and 16 candidates burns , , and FLOPs). Exact verifiers (tests, compilers) drive pass rates monotonically toward 1.0, whereas maximizing an imperfect proxy reward eventually triggers Goodhart overoptimization, where true accuracy peaks and drops at large .[15][16]
Running a scaling study in practice
Turning scaling laws into a cluster plan takes three steps: width-stable hyperparameter transfer, surface fitting with constraints, and mid-scale verification.
Zero-shot hyperparameter transfer with µP
Standard parametrization diverges or stalls when copying a learning rate from a 100M proxy to a 10B model. Maximal Update Parametrization (P)[17] coordinates init scales and layer learning rates so feature updates stay at every width. On the two-layer model with loss , alternating , and base rate : standard init with both rates yields one-step prediction (blowing up linearly with width), whereas P (, input rate , output rate ) locks the update at at every width:
import numpy as np
def one_step(u, v, input_lr, output_lr):
err = float(u @ v) - 1.0
return float((u - input_lr * err * v) @ (v - output_lr * err * u))
for width in (16, 64, 256):
u = np.where(np.arange(width) % 2 == 0, 1.0, -1.0)
std = one_step(u, np.full(width, 1.0 / np.sqrt(width)), 1.0, 1.0)
mup = one_step(u, np.full(width, 1.0 / width), float(width), 1.0 / width)
print(f"width={width:>3}: standard={std:5.1f}, muP={mup:.1f}")width= 16: standard= 17.0, muP=2.0
width= 64: standard= 65.0, muP=2.0
width=256: standard=257.0, muP=2.0Fitting the surface, optimizing under a data cap, and checking mid-scale
Fit proxy runs on a grid of , verify held-out error, apply data or parameter caps, and gate the full run behind a mid-scale checkpoint:

import numpy as np
def scaling_loss(n, d, e, a, alpha, b, beta):
return e + a / np.power(n, alpha) + b / np.power(d, beta)
E, A, B = 1.10, 2.80, 7.80
runs = np.array([
[1e8, 1e9, 2.895], [1e8, 5e9, 2.745], [1e8, 2e10, 2.634],
[5e8, 1e9, 2.813], [5e8, 5e9, 2.663], [5e8, 2e10, 2.552],
[1e9, 5e9, 2.631], [1e9, 2e10, 2.520], [1e9, 1e11, 2.408],
])
train, held = runs[:-1], runs[-1]
grid = np.arange(40, 121, 2) / 1000.0
ag, bg = np.meshgrid(grid, grid, indexing="ij")
preds = scaling_loss(train[:, 0:1, None], train[:, 1:2, None], E, A, ag[None], B, bg[None])
bi, bj = np.unravel_index(np.argmin(np.sum((preds - train[:, 2][:, None, None]) ** 2, axis=0)), ag.shape)
alpha_fit, beta_fit = float(ag[bi, bj]), float(bg[bi, bj])
C = 6 * 70e9 * 1.4e12
n_opt = float(np.exp((np.log(alpha_fit * A / (beta_fit * B)) + beta_fit * np.log(C / 6)) / (alpha_fit + beta_fit)))
d_opt = C / (6 * n_opt)
n_cap = max(n_opt, C / (6 * 2e12)) # 2T unique-token cap, no repeats
d_cap = C / (6 * n_cap)
hold_pred = scaling_loss(held[0], held[1], E, A, alpha_fit, B, beta_fit)
target_70b = scaling_loss(70e9, 1.4e12, E, A, alpha_fit, B, beta_fit)
mid_pred, mid_obs = scaling_loss(10e9, 100e9, E, A, alpha_fit, B, beta_fit), 2.350
print(f"Fitted: alpha={alpha_fit:.3f}, beta={beta_fit:.3f} | holdout err={hold_pred - held[2]:+.4f}")
print(f"Unconstrained: {n_opt/1e9:.2f}B / {d_opt/1e12:.2f}T (loss={scaling_loss(n_opt, d_opt, E, A, alpha_fit, B, beta_fit):.3f} vs 70B/1.4T={target_70b:.3f})")
print(f"Data-capped (<=2T): {n_cap/1e9:.2f}B / {d_cap/1e12:.2f}T (loss={scaling_loss(n_cap, d_cap, E, A, alpha_fit, B, beta_fit):.3f})")
print(f"Mid-scale 10B/100B: pred={mid_pred:.3f}, obs={mid_obs:.3f} -> {'proceed' if abs(mid_obs - mid_pred) <= 0.02 else 'pause_and_investigate'}")Fitted: alpha=0.070, beta=0.098 | holdout err=+0.0002
Unconstrained: 7.82B / 12.53T (loss=2.074 vs 70B/1.4T=2.091)
Data-capped (<=2T): 49.00B / 2.00T (loss=2.086)
Mid-scale 10B/100B: pred=2.310, obs=2.350 -> pause_and_investigateWhen clean tokens are capped at with no repeats, spending full compute requires , snapping the constrained optimum to the smallest feasible above (here 49B). If both and are capped, maximum spendable work is simply . And the 10B/100B checkpoint catches a 0.040-nat miss against the 0.020 tolerance before committing the full run.
Why sparse measurements hide floor ambiguity
Fitting a 5-parameter surface across too few scales leaves floor and exponent entangled. Two curves can pass exactly through and yet forecast 1.985 () vs 2.222 () at ; that 0.237-nat gap measures model-choice uncertainty, not run-to-run variance.

Where scaling laws break down
Six limits govern production decisions:
- Extreme overtraining bends curves: Fits below 100:1 systematically overstated gains when Sardana et al. trained up to 10,000:1.[4]
- FLOPs are not hardware bills: ignores attention, collectives, and MFU; measure tokens per GPU-second on target hardware.
- Loss is not deployed capability: Cross-entropy tracks next-token fit, not instruction following or safety; budget separately for SFT, RLHF,[18] and task evals.
- Metric artifacts mimic "emergence": Exact-match accuracy on an -token answer with independent per-token probability scales as , turning smooth per-token gains into apparent cliffs on small eval sets.[19][20]
- Non-dense architectures need their own variables: For MoE (lesson), total weights drive VRAM while active experts plus shared layers drive per-token compute; for SSMs, fixed recurrent state changes sequence scaling.
- Inductive bias and exact invariants still matter: Hardware-friendly priors (attention, RoPE, GQA) accelerate scaling without hard-coding answers,[21] and exact invariants (cryptography, SQL schemas, permissions) always belong in deterministic code.