Scaling Laws & Emergent Abilities

Empirical power laws for how pretraining loss falls with parameters, data and compute, how to split a fixed budget between model size and tokens, and why some abilities seem to appear suddenly.

Intermediate · Undergraduate mathematics · about 18 minutes

Reading map and next steps

Intuition

The idea in plain words, before the symbols.

If you train a family of models the same way (same architecture class, data pipeline and optimizer recipe), a bigger model and more data usually give a predictably lower test loss. Kaplan et al. (2020) found that the loss of language models falls as a power law in parameters, data and compute over several orders of magnitude.

Scaling laws turn that regularity into a planning tool. You fit a curve to small runs, forecast how far a larger run will go, and decide how to spend a fixed compute budget:

  • Should we buy more parameters or more tokens?
  • If we only get one big run, what is the compute-optimal choice?
  • Why do some task behaviours look as if they "appear suddenly"?

A scaling law is an empirical fit, not a theorem. It describes one training recipe on one data distribution, and its fitted exponents can change when either changes. Its main use is deciding how to spend compute.

Study prompts for this section: Intuition
Study prompts

Each button copies a prompt about this section to your clipboard, for an AI assistant you already use. Nothing is sent by this site.

Mathematics

Definitions, assumptions and the derivation.

Power-law loss scaling

A common empirical form for test loss LL is:

L(N,D)≈L∞+a N−α+b D−β,L(N, D) \approx L_\infty + a\,N^{-\alpha} + b\,D^{-\beta},

where:

  • NN is the number of parameters,
  • DD is the number of training tokens, each seen once,
  • α,β>0\alpha,\beta>0 are exponents fitted to data,
  • L∞L_\infty is the loss the fit predicts as NN and DD both grow without bound; Hoffmann et al. (2022) interpret it as the entropy of natural text.

On a log–log plot each term, such as a N−αa\,N^{-\alpha}, is a straight line with slope −α-\alpha. That is why power laws are convenient to fit and to extrapolate, although nothing guarantees that the fit holds far beyond the range of the runs it came from.

Compute-optimal allocation (Chinchilla)

Training a dense transformer costs about six floating-point operations per parameter per token, two for the forward pass and four for the backward pass (Kaplan et al., 2020, §2.1):

C≈6 ND.C \approx 6\,N D.

Substitute D=C/(6N)D = C/(6N) into the loss and set dL/dN=0dL/dN = 0. The minimum is at

N⋆∝Cβ/(α+β),D⋆∝Cα/(α+β),D⋆∝(N⋆)α/β.N^\star \propto C^{\beta/(\alpha+\beta)},\qquad D^\star \propto C^{\alpha/(\alpha+\beta)},\qquad D^\star \propto \left(N^\star\right)^{\alpha/\beta}.

The two exponents add to 1, so a larger budget is split between a larger model and more tokens. When α≈β\alpha\approx\beta both are about 1/21/2: parameters and tokens grow at the same rate. That is Hoffmann et al.'s (2022) central finding. Their three estimation methods gave N⋆∝C0.50N^\star\propto C^{0.50}, C0.49C^{0.49} and C0.46C^{0.46}, against C0.73C^{0.73} from Kaplan et al. (2020). With the published, rounded coefficients of their third method (α=0.34\alpha=0.34, β=0.28\beta=0.28), N⋆∝C0.45N^\star\propto C^{0.45} (their Table 2 reports 0.460.46 for this method) and D⋆∝C0.55D^\star\propto C^{0.55}, so D⋆∝(N⋆)1.21D^\star\propto (N^\star)^{1.21} and the number of tokens per parameter rises slowly with the budget.

What goes wrong otherwise. At a fixed budget, a model that is too large for its number of tokens is undertrained: the same compute spent on a smaller model trained on more tokens reaches a lower loss. Hoffmann et al. trained Chinchilla (70 billion parameters, 1.4 trillion tokens) with the same compute as Gopher (280 billion parameters, 300 billion tokens), about 5.76×10235.76\times10^{23} FLOPs, and Chinchilla outperformed Gopher on a large range of downstream evaluation tasks.

The fit assumes fresh data. DD counts tokens seen once. When unique data runs out, repeating it helps less: Muennighoff et al. (2023) found that up to about four epochs of repeated data were nearly as useful as new data, and that the value of further repetition fell towards zero.

Fitted coefficients are fragile. Besiroglu et al. (2024) refitted the third method to data they extracted from Hoffmann et al.'s Figure 4 and obtained L∞=1.82L_\infty=1.82, a=482.01a=482.01, b=2085.43b=2085.43, α=0.348\alpha=0.348, β=0.366\beta=0.366; they also report that the published coefficients fit the extracted data poorly. Their fit implies about 20 tokens per parameter, in line with Hoffmann et al.'s first two methods. The published coefficients used in the figure below imply about 50 tokens per parameter at 102110^{21} FLOPs, and more at larger budgets.

"Emergent abilities" and how they are measured

Wei et al. (2022) call an ability emergent if it is absent in smaller models and present in larger ones, and they document many few-shot tasks where accuracy stays near chance and then rises sharply with scale. Schaeffer et al. (2023) argue that many of these jumps come from the metric rather than the model. Exact-match accuracy on a ten-token answer requires all ten tokens to be right, so if token correctness is independent and each token is right with probability pp, the expected score is p10p^{10}. As pp rises steadily from 0.700.70 to 0.900.90 and then 0.950.95, exact match goes from 0.030.03 to 0.350.35 and then 0.600.60. Scored on the same model outputs with a continuous metric, such as token edit distance, many of the reported jumps become smooth. Whether some abilities are emergent in a stronger sense is still debated.

Study prompts for this section: Mathematics
Study prompts

Each button copies a prompt about this section to your clipboard, for an AI assistant you already use. Nothing is sent by this site.

Code

The same calculation as runnable code, in the notation of the derivation.

import numpy as np

# Hoffmann et al. (2022), Approach 3: L(N, D) = E + A / N**alpha + B / D**beta
# (E, A, B are L_inf, a, b in the equation above)
E, A, B = 1.69, 406.4, 410.7
alpha, beta = 0.34, 0.28

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

C = 1e21                        # training FLOPs, with C ≈ 6 N D
Ns = np.logspace(7, 12, 2001)   # 10 million to 1 trillion parameters
Ds = C / (6 * Ns)               # tokens left for each model size
i = np.argmin(loss(Ns, Ds))
print(f"grid search: N* = {Ns[i]:.3g}, D* = {Ds[i]:.3g}, D*/N* = {Ds[i] / Ns[i]:.1f}")

# Closed form from dL/dN = 0 along D = C / (6N)
G = (alpha * A / (beta * B)) ** (1 / (alpha + beta))
N_opt = G * (C / 6) ** (beta / (alpha + beta))
D_opt = C / (6 * N_opt)
print(f"closed form: N* = {N_opt:.3g}, D* = {D_opt:.3g}, D*/N* = {D_opt / N_opt:.1f}")
print(f"N* ∝ C^{beta / (alpha + beta):.2f}, D* ∝ C^{alpha / (alpha + beta):.2f}, D* ∝ N*^{alpha / beta:.2f}")

The grid search and the closed form agree: about 1.8×1091.8\times10^{9} parameters and 9.1×10109.1\times10^{10} tokens at 102110^{21} FLOPs, the same numbers the figure below shows at its default budget.

Study prompts for this section: Code
Study prompts

Each button copies a prompt about this section to your clipboard, for an AI assistant you already use. Nothing is sent by this site.

Demo

Change an input, predict the result, and see which quantities respond.

ExploreChange one control at a time and name what responds.An optional observation guide follows the demo.

Explore Scaling Laws & Emergent Abilities

Loading the interactive demo…

Observation guide

Optional and ungraded. Opening a guide saves nothing.

Choose what to inspect in Scaling Laws & Emergent Abilities, then open its guide.

The first demo asks which mechanism explains each view before showing it: the loss-scaling view or the emergence view. The figure below it evaluates Hoffmann et al.'s fitted loss along a fixed compute budget. Move the budget and watch the minimum, the optimal model size and the number of tokens per parameter change.

Study prompts for this section: Demo
Study prompts

Each button copies a prompt about this section to your clipboard, for an AI assistant you already use. Nothing is sent by this site.

In focus

Concept: Scaling Laws & Emergent Abilities

What is the smallest example of Scaling Laws & Emergent Abilities you can work through by hand, and what does it show?

BeforeScaled Dot-Product Attention & Transformer LayersNextNeural Tangent Kernel (NTK) & Infinite-Width Limits
DetailsScaling

After the first pass

Go deeper

Optional material for a second reading. Sources are always shown; the other panels open from their headings or from these links, and closing one keeps what you wrote or revealed.
What to look for in each sectionChoose a section and what you expect to see in it, then read short advice.

Section by section

Choose what to look for in each section

Empirical power laws for how pretraining loss falls with parameters, data and compute, how to split a fixed budget between model size and tokens, and why some abilities seem to appear suddenly.

Choose what to look for (no demo yet)01 / Intuition
Illustration of empirical power-law curves, compute contours, and a highlighted compute-optimal frontier point.
What to look for

Start with the picture, metaphor, or geometric mechanism.

Choose first

Choose what you expect to see in this section of Scaling Laws & Emergent Abilities.

Questions to ask of the pictureChoose a part of the picture and what you expect, then read short advice.

Looking at the picture

Questions to ask of the picture

Empirical power laws for how pretraining loss falls with parameters, data and compute, how to split a fixed budget between model size and tokens, and why some abilities seem to appear suddenly.

4 of 4 sections writtenNo live demo yet
Question

Which part of the picture should you look at first?

Choose first

Pick the part of the picture you expect to explain Scaling Laws & Emergent Abilities.

Sources

References for this page

A reference shows where an idea comes from; it does not vouch for every step on this page.
paper · 2020Scaling Laws for Neural Language ModelsKaplan et al.
Why it is cited

Fits language-model test loss as power laws in parameters, data and compute; §2.1 derives the C ≈ 6ND training-compute estimate, and §6.1 the allocation N ∝ C^0.73 (arXiv preprint).

Open source
paper · 2022Training Compute-Optimal Large Language ModelsHoffmann et al.
Why it is cited

Trains over 400 models and finds that, for a fixed compute budget, parameters and training tokens should grow at about the same rate (Table 2); Appendix D.2 gives the Approach 3 fit used on this page (NeurIPS 2022).

Open source
paper · 2024Chinchilla Scaling: A replication attemptBesiroglu, Erdil, Barnett, and You
Why it is cited

Refits Hoffmann et al.'s Approach 3 to data extracted from their Figure 4; the refit implies about 20 tokens per parameter, consistent with Approaches 1 and 2, whereas the published Approach 3 coefficients imply more (arXiv preprint).

Open source
paper · 2023Scaling Data-Constrained Language ModelsMuennighoff et al.
Why it is cited

Finds that up to about four epochs of repeated data are nearly as useful as unique data, after which the value of more compute decays towards zero (NeurIPS 2023).

Open source
paper · 2022Emergent Abilities of Large Language ModelsWei et al.
Why it is cited

Defines an emergent ability as one absent in smaller models and present in larger ones, and surveys few-shot tasks whose accuracy rises sharply with scale (Transactions on Machine Learning Research, 2022).

Open source
paper · 2023Are Emergent Abilities of Large Language Models a Mirage?Schaeffer, Miranda, and Koyejo
Why it is cited

Argues that many reported emergent abilities follow from nonlinear or discontinuous metrics, and that continuous metrics on the same outputs show smooth improvement (NeurIPS 2023).

Open source
What each claim rests on1 claim, each with its sources, where it appears on this page, and its caveats.

Claims and sources

Empirical power laws for how pretraining loss falls with parameters, data and compute, how to split a fixed budget between model size and tokens, and why some abilities seem to appear suddenly.

Checked against the cited passages

The checks were made by this site, not by an independent reviewer.

Kaplan et al. fit language-model cross-entropy loss with empirical power laws in model size, dataset size, and training compute; Hoffmann et al. find compute-optimal training scales parameters and tokens together under a fixed budget.
What the sources support

Kaplan et al. study language-model cross-entropy loss and report power-law scaling with model size, dataset size, and training compute. Hoffmann et al. train over 400 models and find that compute-optimal tra...

Where to see it on this page
Equation 1
L(N,D)≈L∞+a N−α+b D−β,L(N, D) \approx L_\infty + a\,N^{-\alpha} + b\,D^{-\beta},
Equation 2
C≈6 ND.C \approx 6\,N D.
Caveat

These are empirical fits to pretraining loss. They do not show that the exponents are universal across architectures or datasets, and they say nothing directly about inference-time compute, data quality or b...

StatusChecked against the cited passages.

Checked the arXiv abstracts: Kaplan et al. support power laws for cross-entropy loss in model size, dataset size and training compute; Hoffmann et al. support scaling model size and training tokens equally for compute-optimal training at a fixed budget. The page's equations, code and figure apply only this pretraining-loss view and the split of a fixed budget between parameters N and tokens D.

Explain it without the pageWrite your own explanation before asking for feedback. Your draft and any hints stay while this page is open.

Practice · Scaling Laws & Emergent Abilities

Try the idea in your own words

Empirical power laws for how pretraining loss falls with parameters, data and compute, how to split a fixed budget between model size and tokens, and why some abilities seem to appear suddenly.

Concept · Selected for practice

Scaling Laws & Emergent Abilities

What it rests on: Sources: Scaling Laws for Neural Language Models; Training Compute-Optimal Large Language Models; Chinchilla Scaling: A replication attempt

Context and links
Choose a task

Explain the mechanism

For Scaling Laws & Emergent Abilities: What is the smallest example of Scaling Laws & Emergent Abilities you can work through by hand, and what does it show? Explain your answer, including what changes, why, and which assumption matters.

No answer yet

A rough first thought is enough. Your draft stays when you change tasks.

Your draft stays on this page and is cleared when you leave or reload.

A little help · Explain

Open one hint at a time. These are suggestions, not your answer or a grade.

0 of 3 hints shown for this question.

    Clearing your answer keeps this help record. Outside help is your own report; this page cannot check it.

    Where am I stuck? (optional)
    Your own description, not an automatic diagnosis

    Choose one, or leave this unspecified. Select it again to clear it.

    Take your draft to a feedback conversation

    No AI feedback runs here. You can copy a prompt to use elsewhere; nothing is sent automatically. Review the text before sharing, and leave out private information.

    Write an attempt before copying a feedback prompt.

    A draft, or an AI reply to it, is not a test of what you have learned. To check that, try a different case later without help.

    Ask about this pagePick one item on this page and copy a prompt about it into an AI assistant you already use. Notes you write here stay in this browser.
    Ask about this pageClose
    ConceptScaling Laws & Emergent AbilitiesSources: Scaling Laws for Neural Language Models; Training Compute-Optimal Large Language Models; Chinchilla Scaling: A replication attemptE, A, B = 1.69, 406.4, 410.7

    Your question

    Choose what your question is about

    Pick the idea, equation, source, code, claim, misconception or demo state you want to ask about. The prompt you copy includes it, so the answer can stay on that item.
    Next local actionNo local draft saved yet

    Open the draft below to save one note and next action in this browser.

    conceptScaling

    Scaling Laws & Emergent Abilities

    Starting question

    What is the smallest example of Scaling Laws & Emergent Abilities you can work through by hand, and what does it show?

    SourcesCheck the 6 cited sources listed under Sources.Notes can be saved for this item
    Points of view on this item

    Fixed prompts generated from this item. They are not comments from people or independent reviews.

    Learner’s first stepAsk what would make "Scaling Laws & Emergent Abilities" feel predictable rather than familiar.
    Assumption

    The 6 cited sources must support this exact item, not just the surrounding topic.

    Source-checking summary

    Connect the definition to one equation, piece of code or demo before widening the discussion.

    Proposed experiment

    Change one input, then check that the same relationship holds in the mathematics, the code and the demo.

    Next action

    You can state the mechanism in your own words

    Evidence4 checks
    ObservationChecking for a saved observation
    ActionReady for one action
    PromptLearner prompt ready to copy
    Go to this item
    01ObservationChecking what this browser has saved
    02EvidenceChecking for a saved observation
    03SourcesCheck the 6 cited sources listed under Sources.
    04Next stepSave one next action
    Local action draftNo local draft saved yetOpen when you are ready to write one next action
    Local action draft

    This draft stays in this browser and is attached to this item only.

    No local draft saved.
    Evidence to inspect
    • What the 6 cited sources say about this exact item
    • The definition, its prerequisites, and a contrasting concept
    • The equation or code that makes the concept concrete
    • One demo state that shows what stays the same as the inputs change
    What would resolve this
    • You can state the mechanism in your own words
    • You can name the prerequisite that would clear up the confusion
    • You can predict how the result changes when one input changes
    Reference idconcept/concept-notebook/scaling/scaling-laws concept:scaling/scaling-laws