Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Scaling Laws for Neural Language Models

  • Problem Choosing model size, data and training compute for a language model has no quantitative guide when all three grow together.
  • Method Fits power laws to the cross-entropy test loss of decoder-only Transformers trained on WebText2, then uses the fitted relations to divide a fixed compute budget.
  • Results Test loss falls as a power law in non-embedding parameter count, with a fitted exponent of about 0.076 for models trained to convergence.

What the study asks

Recent language models come close to human performance on a number of narrow benchmarks, so the open question is how much the underlying loss improves as models grow. The authors ask how that loss depends on architecture, model size, the compute used for training and the data available for training.

They concentrate on the Transformer and on autoregressive cross-entropy loss measured in nats, over a scale range wide enough to check trends across more than seven orders of magnitude. Model size is counted as non-embedding parameters, so vocabulary and positional embeddings do not enter the size variable.

The study therefore has two parts: how loss depends on model size N, dataset size D and compute C when these vary, and how a fixed budget should be split between model size, batch size and number of training steps.

Models, data and training setup

Each Transformer is set by its number of layers, residual width and feed-forward width, and its non-embedding size is approximated as \( N \approx 12\, n_{layer} d_{model}^{2} \) under the standard choice of attention and feed-forward widths. The authors argue that leaving the embedding matrices and positional embeddings out of N gives cleaner trends.

Compute is estimated as \( C \approx 6NBS \), where B is the batch size and S is the number of parameter updates. The factor of six reflects a forward pass costing about 2N operations per token and a backward pass costing about twice the forward pass.

The models are trained on WebText2, an extended version of WebText built from outbound Reddit links, containing 20.3M documents and 96 GB of text. Text is tokenized with byte-pair encoding to a vocabulary of 50257, and loss is averaged over a 1024-token context.

The learning rate rises linearly over 3000 steps and then follows a cosine decay to zero. In the overfitting study all models use 10% dropout.

Loss against model size, data and compute

The shapes run from (2, 128) up to billion-parameter models such as (6, 4288) and (207, 768), and the models are trained close to convergence on the full WebText2 set. The value of N_c depends on vocabulary size and tokenization and has no fundamental meaning, so the exponent carries the substantive content.

Because of the exponent, doubling the number of parameters reduces the loss by a factor of about 0.95.

For compute, the relevant quantity is Cmin, the compute needed to reach a loss when the batch is much smaller than the critical batch size.

The authors recommend using the Cmin trend for predictions, since the trend with compute at fixed batch size is a different fit with exponent 0.057.

Shape changes at fixed parameter count

To test shape, the authors fix N and vary the number of heads, the number of layers and the feed-forward width separately. When the number of layers changes, the model width changes so that N stays close to 12 n_layer d_model^2.

Across the shapes tested, loss changes only a few percent, and the aspect ratio can vary by a factor of 40 with little effect. The (6, 4288) model lands within 3% of the (48, 1600) model used in prior work [RWC+19]. The authors say that about 22% additional compute compensates for a 1% loss increase.

This conclusion depends on counting N without embeddings, since with embedding parameters included depth appears to matter strongly.

Comparing with LSTMs and recurrent Transformers

LSTMs and Transformers are trained on the same dataset and context length, and their per-token loss is compared as a function of non-embedding parameter count. LSTMs match Transformers for tokens early in the context but cannot match Transformer loss on later tokens. The authors read the growing power-law exponents for larger Transformers as a sign of faster recognition of patterns from little context.

Recurrent Transformers, which reuse parameters, are compared as well. They perform slightly better as a function of N, at the cost of additional compute per parameter.

Overfitting when N and D grow together

Model size and dataset size are varied together to find one function of both that also captures overfitting. The joint form is \( L(N,D) = [ (N_c/N)^{\alpha_N/\alpha_D} + D_c/D ]^{\alpha_D} \), which the authors fit to early-stopped test losses. The left panel of Figure 4 shows the early-stopped loss against dataset size and model size with this fit.

The authors impose three principles: the form should allow rescaling with vocabulary changes, it should reduce to L(D) as N grows and to L(N) as D grows, and it should be analytic in 1/D at infinite D. The third principle is the speculative one, and the authors tie it to the variance of the dataset and to 1/D corrections.

Overfitting is measured as the relative increase δL of loss over the infinite-data loss, and for all but the largest models no overfitting appears on the full 22B-token WebText2 set.

Critical batch size and the step correction

The critical batch size comes from earlier work on gradient noise: below it the batch can grow with little loss of compute efficiency, and above it returns diminish. The authors use the relation \( (S/S_{min} - 1)(E/E_{min} - 1) = 1 \), with E = BS, and define \( B_{crit}(L) = E_{min}/S_{min} \).

Figure 10 plots the critical batch size against training loss for two model sizes, and the values fall on one curve, so the critical batch size depends on loss rather than model size. The authors chose this form because the critical batch size should diverge as the loss approaches its minimum, which they do not know.

Using the critical batch size, \( S_{min}(S) = S/(1 + B_{crit}(L)/B) \) gives the minimum number of steps for a batch much larger than critical, and \( C_{min}(C) = C/(1 + B/B_{crit}(L)) \) gives the compute for a batch much smaller. These corrections are needed because most runs use one fixed batch size rather than the critical one, so their raw results are not optimal.

The stable Adam-optimized runs are fit with \( L(N,S_{min}) = (N_c/N)^{\alpha_N} + (S_c/S_{min})^{\alpha_S} \). The authors suggest the power law in Smin may reflect the spectrum of the Hessian of the loss, which is an interpretation and was not measured here.

Loss on other text distributions

Models trained only on WebText2 are tested on Books, Wikipedia, Internet Books and Common Crawl. Loss on each of these falls as a power of N with almost the same exponent as on WebText2.

Figure 8 shows that the offset from WebText2 is small and grows only slowly with model size, and the right panel plots loss on the other distributions against loss on the training distribution.

Splitting a fixed compute budget

For each 10x increase in compute, optimal model size rises about 5x, while the number of data examples processed rises about 2x. The authors conclude that most extra compute should go to larger models and larger batches, with a negligible increase in serial steps, and they note the step exponent may even be zero.

Larger models reach a given loss with fewer optimization steps and fewer data points than smaller ones. Under compute-efficient training, data requirements grow as about C^0.27.

Limits of the evidence

The authors do not know which results depend on the structure of natural language and which are universal.

The study measures loss and does not test whether continued loss gains carry into relevant language tasks. The authors note that smooth improvements in loss may hide qualitative changes in capability.

The power-law fits are weaker at small S, where the learning-curve transient dominates, and one-layer models are excluded from the fits. The largest models that did not train fully to convergence are excluded from the L(N) fit.

Regularization such as dropout was not tuned as dataset and model size varied. Experiments with a fixed batch size give empirical compute trends that are not optimal, which is why the adjusted Cmin fits are used for prediction.

Paper info

Authors
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, Dario Amodei
Venue
arXiv · Preprint
First published
2020-1-23
Added
2026-10-20
Updated
2020-1-23
Version
v1
arXiv
2001.08361
Category
cs.LG · stat.ML
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, Dario Amodei (2020). Scaling Laws for Neural Language Models. arXiv:2001.08361v1. https://arxiv.org/abs/2001.08361v1

BibTeX
@misc{kaplan2020scaling,
  title = {{Scaling Laws for Neural Language Models}},
  author = {Jared Kaplan and Sam McCandlish and Tom Henighan and Tom B. Brown and Benjamin Chess and Rewon Child and Scott Gray and Alec Radford and Jeffrey Wu and Dario Amodei},
  year = {2020},
  eprint = {2001.08361},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.08361v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up