ElemedexA pocket encyclopedia of AI architectures

Glossary (TM) › Training and tuning

TM141

Scaling laws

Also: neural scaling laws

In Spanish: Leyes de escalamiento

Empirical regularities by which a language model's loss falls predictably, as a power law, as parameters, data and compute increase.

Kaplan et al. (2020) trained transformers of widely different sizes (from about a thousand to a billion parameters) and found that test loss (the cross-entropy of predicting the next token) depends mainly on three quantities: the number of parameters N, the dataset size D and the compute C. When neither of the other two is a bottleneck, the relationship is a power law, for instance L(N) = (N_c / N)^0.076, and the trends hold across more than seven orders of magnitude (2020, secs. 1.1–1.2). Architectural details such as the ratio of width to depth, by contrast, barely matter.

On a log–log plot that is a straight line, and a straight line invites extrapolation: how much compute the next improvement will take. Kaplan and colleagues concluded that, on a fixed budget, one should train very large models on relatively little data. Chinchilla corrected the recipe: parameters and tokens should grow in equal proportion. Chinchilla, with 70 billion parameters and 1.4 trillion tokens, about 20 tokens per parameter, outperformed models four times larger trained with the same compute (Hoffmann et al., 2022).

Three caveats. First, these are laws in a phenomenological sense, like Zipf's law, not derivations from first principles: they summarize inductions over training runs, and extrapolating them is a bet. Second, they predict loss, not capabilities; whether a specific skill appears suddenly or gradually is another debate (emergent abilities). Third, they fueled a radically empiricist reading of progress, the bitter lesson and the scaling hypothesis, on which more data and compute are all it takes. Buckner (2024) thinks that extreme reading is not the right lesson, even though scaling research is what fuels it (2024, p. 25).

Sources

  • Buckner, C. J. (2024). From deep learning to rational machines: What the history of philosophy can teach us about the future of artificial intelligence. Oxford University Press. https://doi.org/10.1093/oso/9780197653302.001.0001 §
  • Hoffmann, J., Borgeaud, S., Mensch, A., Buchatskaya, E., Cai, T., Rutherford, E., de Las Casas, D., Hendricks, L. A., Welbl, J., Clark, A., Hennigan, T., Noland, E., Millican, K., van den Driessche, G., Damoc, B., Guy, A., Osindero, S., Simonyan, K., Elsen, E., . . . Sifre, L. (2022). Training compute-optimal large language models. In Advances in Neural Information Processing Systems (Vol. 35, pp. 30016–30030). Curran Associates. https://doi.org/10.52202/068431-2176 §
  • Kaplan, J., McCandlish, S., Henighan, T., Brown, T. B., Chess, B., Child, R., Gray, S., Radford, A., Wu, J., & Amodei, D. (2020). Scaling laws for neural language models (arXiv:2001.08361). arXiv. https://doi.org/10.48550/arXiv.2001.08361 §