What did Andrej Karpathy say about scaling laws in large language models?

Andrej Karpathy said that large language models follow remarkably smooth scaling laws: performance can be predicted surprisingly well from just the number of parameters and the amount of training text. He argued that bigger models trained on more data reliably improve next-word prediction, and that this improvement tends to carry over to many real evaluations people care about. In his view, scaling provides a very strong, mostly guaranteed path to better models.

“The first very important thing to understand about the large language model space are what we call scaling laws. It turns out that the performance of these large language models in terms of the accuracy of the next word prediction task is a remarkably smooth, well-behaved, and predictable function of only two variables. You need to know N, the number of parameters in the network, and D, the amount of text that you're going to train on. Given only these two numbers, we can predict, to a remarkable accuracy and with remarkable confidence, what accuracy you're going to achieve on your next word prediction task. And what's remarkable about this is that these trends do not seem to show signs of sort of topping out.”
— Andrej Karpathy, Intro to Large Language Models, YouTube interview, 2024 · at 25:37
Andrej Karpathy: Andrej Karpathy on Large Language Models: from pretraining to agents

Key takeaways

  • Scale up parameters and data if you want predictable gains.
  • Next-word prediction is a useful proxy for broader performance.
  • Algorithmic progress helps, but scaling is the main reliable lever.

Context

In his 2024 YouTube intro to LLMs, Karpathy was explaining why the field’s progress has been so rapid and predictable. The quote above is taken word for word from the recording's transcript.

In the transcript

…good enough. And so currently I would say the open-source ecosystem is trying to boost performance and sort of chase the proprietary AI ecosystems, and that's roughly the dynamic that you see today in the industry. Okay, so now I'm going to switch gears and we're going to talk about the

The first very important thing to understand about the large language model space are what we call scaling laws. It turns out that the performance of these large language models in terms of the accuracy of the next word prediction task is a remarkably smooth, well-behaved, and predictable function of only two variables. You need to know N, the number of parameters in the network, and D, the amount of text that you're going to train on. Given only these two numbers, we can predict, to a remarkable accuracy and with remarkable confidence, what accuracy you're going to achieve on your next word prediction task. And what's remarkable about this is that these trends do not seem to show signs of sort of topping out.

Bigger model on more text. We have a lot of confidence that the next word prediction task will improve. So, algorithmic progress is not necessary. It's a very nice bonus, but we can sort of get more powerful models for free because we can just get a bigger computer, which we can say with some confidence we're going to get, and we can just train a bigger model for longer,…

Read the full transcript of Intro to Large Language Models, YouTube interview, 2024

Topics

More questions about Andrej Karpathy

All Andrej Karpathy answers · All Andrej Karpathy recordings

How this answer was made: the quote is checked word for word against the transcript of the recording and confirmed as the speaker's own words; the summary above it was drafted with AI from that transcript and quality-checked. Methodology and corrections.

Search every transcript
Open the full search page →