You've heard "Scale is All You Need", seen graphs with straight lines going down, others muttering that "AGI is coming".
What exactly are scaling laws? What is being scaled? And why is everyone excited (or scared) about them?
1/18
First, a summary in two tweets:
Scaling laws show that large language models' (LLMs') loss decreases when you increase the model's:
- # parameters,
- training data,
- training compute budget
In a mathematically predictable way.
2/18
Why does this matter?
It means we don't need to make theoretical or architectural advances to significantly power up LLMs.
Just let the GPUs rip, baby!
(There's a second, much more important reason at the end of the thread!)
3/18
Now, the details. First, the form of the law:
With L the test loss,
x = one of compute, dataset size, or model parameters, and *not* bottlenecked by the other two, empirically we find
L = C/x^a
For constants C and a that depend on the scaling type (see below!).
4/18
Alternatively we have log L ~ -log(a)*log(x), so a linear relationship on a log-log scale.
(Hence the straight-line log-log charts.)
5/18
What's the loss L, you ask?
It's the "cross-entropy", which in this case is also equal to the (average) log-likelihood. Formula below!
Intuitively, it's the (scaled, -log) chance that your LLM would actually generate your text dataset. You want this chance to be high.
6/18
Now that you get the basics, here's a puzzle:
The scaling law exponents are between 0.05 and 0.1. These exponents are tiny.
Concretely, if you 1,000x'd your training data, your loss would only go down by a factor of 1/(1,000)^0.1 ~ 50%!
So why care about scaling laws?
7/18
Here comes the kicker - why you should *actually* care about scaling laws, why some say "Scale is All You Need", why others say "AGI is coming":
*Minor* improvements in test loss give *massive* generalization and new capabilities for LLMs.
An example from DeepMind:
8/18
DeepMind trained two LLMs, Gopher and Chinchilla.
Chinchilla was trained more efficiently resulting in a cross-entropy of 1.97, vs. Gopher's 2.05 - only a 4% improvement.
Yet Chinchilla blew Gopher out of the water on a range of high-level tasks like high school math.
9/18
Specifically, Chinchilla performed on average 10x better than Gopher on MMLU, a multitask language understanding dataset ranging from exams in professional medicine to high school chemistry.
Chinchilla beat Gopher by over 30x in college physics, with only 4% lower loss!
10/18
This is *real* reason to care about scaling laws, why some say that "AGI is coming". The reasoning chain is:
1. Scale up data, params, GPUs go brrr --> 2. *Minor* yet predictable decrease in model loss --> 3. *Massive* increase in LLM capabilities.
Be afraid! (perhaps)
11/18
That's a wrap on scaling laws! If you read the thread carefully, you now understand:
1. The mathematical form of scaling laws 2. The cross-entropy loss 3. That scaling laws lead to minor improvements in loss... 4. But massive improvements in LLM capabilities
12/18
This thread was an introduction to scaling laws, and largely a walk-through of OpenAI's 2020 paper that discovered them.
Later this week we'll do Part II on the limits of scaling laws, scaling laws and data, and the 2022 Chinchilla paper!
I help ~25 AI startups recruit top-notch engineers, via the AI Pub Talent Network:
Now helping some with their hiring processes.
ML and software engineers: you're invited to interview. Why do you *not* start the hiring process with a company?
1/2
Some reasons that come to mind:
- Not ready / not the right time to leave current role
- Hiring process is long / a PITA
- Cash or equity comp not transparent
- Comp not high enough
- Product, company, or team isn't compelling
Any others?
2/2
Three others that come to mind:
- Don’t want to relocate
- Company isn’t prestigious enough
- Don’t think they’ll pass the interview or get hired (eg I’m not applying for a job at OpenAI b/c it’d be a waste of time)
3/2
Harvey is an OpenAI-backed GPT-4 startup building AI knowledge workers.
They've signed deals with the largest law firms on earth, and are the fastest-growing LLM startup by revenue I know of.
Everything you need to know about Harvey:
1/10
Harvey's first product is a GPT-4 powered AI knowledge worker.
Harvey can:
- Generate long-form legal documents
- With niche knowledge of the law
- Answer complex legal questions
- Leveraging millions of documents
- Create firm-specific models
2/10
In the last two months, Harvey rolled out multi-million dollar contracts with the largest law firms in the world.
With early access to next-gen text models from OpenAI (😉), Harvey can:
- Answer complex legal questions
- Leveraging millions of documents
- Generate unique work product
- With knowledge of niche law
- Learn from lawyer feedback
- Create firm-specific models