AAI Agentic Handbook
LLM Foundations

Scaling laws

Mid levelReviewed Oct 2026In 1 post

Empirical power laws: loss falls predictably as parameters, data and compute grow, with diminishing returns per extra 10× of compute.

In plain English

Scaling laws are patterns researchers measured: give a model more Parameters & weights, more Training data and more computing power, and its error goes down in a smooth, predictable way.

The catch is diminishing returns: each equal improvement costs many times more than the last. Labs use these curves to decide how big a model to build and how much data to feed it for a given budget.

Analogy

Studying for an exam: the first 10 hours lift your score a lot, the next 100 hours lift it less, and the next 1,000 hours lift it a little more. The improvement is real and predictable, but each step costs far more.

Common pitfall

Reading scaling laws as 'bigger is always better for my product'. They describe average loss for the trainer; your task may already be saturated by a smaller, cheaper model. Measure on your own evals.

How it actually works

Kaplan et al. (2020) fit loss as power laws in parameters N, data D and compute C over seven orders of magnitude. Hoffmann et al. (2022, Chinchilla) refit with a parametric form L(N, D) = E + A/N^0.34 + B/D^0.28 (E ≈ 1.69, A ≈ 406, B ≈ 411) and showed that for a fixed training budget N and D should grow together: about 20 tokens per parameter.

Production labs now train far past that ratio — Llama 3 8B saw ~1,900 tokens per parameter — because lifetime cost = training (6·N·D) + serving (2·N per token × every token ever served), and a smaller over-trained model is cheaper to serve. Since 2024 a second axis matters: test-time compute, where Reasoning models & extended thinking trade more thinking tokens at Inference for accuracy (Snell et al., 2024). Caveats: the laws predict average loss, not your task's accuracy; downstream skills can jump abruptly; and high-quality data, not FLOPs, is increasingly the binding constraint.

What I'd ship on day one

For product decisions, ignore the training curve and run your own scaling sweep: 2–3 model sizes × 2–3 reasoning efforts on your Golden set, plotted as accuracy vs cost per 1k requests. Choose the cheapest point within 1 point of the best.

Worked example

Same training budget, two choices. 7.2e23 FLOPs buys Llama-3-8B-style over-training (8B on 15T tokens) or a compute-optimal ~77B model on ~1.5T tokens (6 × 77e9 × 1.55e12 ≈ 7.2e23). The 77B has slightly lower loss but costs ~10× more per served token. At 50B tokens served per day, that is the difference between ~2 and ~20 H100-class GPUs running continuously for the life of the model.

In the interview

When asked 'bigger model or more thinking?', say there are two axes, both log-linear: training scale (bought once, paid back in serving) and test-time compute (paid per request). Recommend measuring the accuracy-vs-cost curve on your own eval for 2–3 model sizes and 2–3 reasoning efforts, then picking the cheapest point that meets the bar. Expect: 'what breaks the law?' — data exhaustion, contamination, and the gap between loss and task metrics.

1003001,0003,00010,0001.922.12.2Chinchilla-optimal 70BTraining tokens (billions, log) (log scale) →Predicted loss →
8B params70B params
Chinchilla parametric fit (Approach 3): loss keeps falling with data, but each 10× buys less; extrapolated beyond the fitted range.
ModelParamsTokensTokens/param
Chinchilla70B1.4T20
Llama 3 70B70B15T~214
Llama 3 8B8B15T~1,900
Production models train far past compute-optimal to make serving cheaper.

Numbers worth knowing

Compute-optimal ratio
~20 tokens per parameterChinchilla, fixed training budget
Chinchilla exponents
α ≈ 0.34 (params), β ≈ 0.28 (data)Approach 3 fit
Llama 3 8B
~1,900 tokens/paramdeliberately over-trained for cheap serving

How to decide

WhenDo this
Your eval saturates on a small modelShip the small model; bigger buys nothing measurable.
Hard multi-step tasks fail on all sizesTry more test-time compute (Reasoning models & extended thinking) before a larger base model.
You train your own model with heavy expected trafficOver-train a smaller model past 20 tokens/param; serving dominates lifetime cost.

Cost maths

Lifetime FLOPs = 6·N·D (train) + 2·N·T (serve T tokens). For N = 8B, D = 15T: train 7.2e23; serving 50B tokens/day for a year (T = 1.8e13) adds 2.9e23. A 77B compute-optimal alternative: same train cost, but serving becomes 2.8e24 — total 3.5e24 vs 1.0e24. Whenever the 8B meets the quality bar it wins, and the gap grows linearly with every token served.

Operating it

Time to scale up when…
  • Golden-set accuracy improves < 1 point per 2× model cost → stop scaling the model
  • Cost per task is dominated by reasoning tokens → tune effort, not model size
  • Domain loss still falling steeply with more domain data → collect data before buying compute
What to monitor
  • Accuracy per $1k spend by route — alert if a model change lowers it > 10%
  • Golden-set delta after any model upgrade < 1 point while cost rises > 50% → flag for review
  • Share of traffic routed to the largest tier > target (e.g. 10%)

When it goes wrong

What users saw

A team moved a document-classification route from a small model to a frontier model 'because bigger is better'; the bill rose 6× with no visible change.

How it was caught

Monthly cost review plus a re-run of the 500-item golden set: 94.1% vs 94.4%, inside the noise.

Root cause

The task was saturated; scaling-law intuition about average loss was applied to a narrow classification task.

Fix

Reverted to the small model, added a cost-vs-accuracy sweep as a required artifact for any model upgrade, and routed only the 3% of low-confidence items to the large model.

Sources

  1. Scaling Laws for Neural Language Models — Kaplan et al., 2020paper
  2. Training Compute-Optimal Large Language Models — Hoffmann et al., 2022paper
  3. Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters — Snell et al., 2024paper

Check yourself

Three questions. Every option is explained once you answer.

1ConceptWhy do labs train small models far past the ~20 tokens/parameter Chinchilla ratio?
2ScenarioMoving a classification route to a larger model raised cost 6× with golden-set accuracy 94.1% → 94.4%. What do you do?
3CalculationCompute-optimally, about how many training tokens does a 10B-parameter model want?