I. From GPT-4 to AGI
I. 从 GPT-4 到 AGI

























**AGI by 2027 is strikingly plausible. GPT-2 to GPT-4 took us from ~preschooler to ~smart high-schooler abilities in 4 years. Tracing trendlines in compute (~0.5 orders of magnitude or OOMs/year), algorithmic efficiencies (~0.5 OOMs/year), and “unhobbling” gains (from chatbot to agent), we should expect another preschooler-to-high-schooler-sized qualitative jump by 2027. **
Look. The models, they just want to learn. You have to understand this. The models, they just want to learn.
*Ilya Sutskever (circa 2015, *via Dario Amodei)
GPT-4’s capabilities came as a shock to many: an AI system that could write code and essays, could reason through difficult math problems, and ace college exams. A few years ago, most thought these were impenetrable walls.
But GPT-4 was merely the continuation of a decade of breakneck progress in deep learning. A decade earlier, models could barely identify simple images of cats and dogs; four years earlier, GPT-2 could barely string together semi-plausible sentences. Now we are rapidly saturating all the benchmarks we can come up with. And yet this dramatic progress has merely been the result of consistent trends in scaling up deep learning.
There have been people who have seen this for far longer. They were scoffed at, but all they did was trust the trendlines. The trendlines are intense, and they were right. The models, they just want to learn; you scale them up, and they learn more.
I make the following claim: it is strikingly plausible that by 2027, models will be able to do the work of an AI researcher/engineer. That doesn’t require believing in sci-fi; it just requires believing in straight lines on a graph.
Rough estimates of past and future scaleup of effective compute (both physical compute and algorithmic efficiencies), based on the public estimates discussed in this piece. As we scale models, they consistently get smarter, and by “counting the OOMs” we get a rough sense of what model intelligence we should expect in the (near) future. (This graph shows only the scaleup in base models; “unhobblings” are not pictured.)
In this piece, I will simply “count the OOMs” (OOM = order of magnitude, 10x = 1 order of magnitude): look at the trends in 1) compute, 2) algorithmic efficiencies (algorithmic progress that we can think of as growing “effective compute”), and 3) ”unhobbling” gains (fixing obvious ways in which models are hobbled by default, unlocking latent capabilities and giving them tools, leading to step-changes in usefulness). We trace the growth in each over four years before GPT-4, and what we should expect in the four years after, through the end of 2027. Given deep learning’s consistent improvements for every OOM of effective compute, we can use this to project future progress.
Publicly, things have been quiet for a year since the GPT-4 release, as the next generation of models has been in the oven—leading some to proclaim stagnation and that deep learning is hitting a wall.1 But by counting the OOMs, we get a peek at what we should actually expect.
The upshot is pretty simple. GPT-2 to GPT-4—from models that were impressive for sometimes managing to string together a few coherent sentences, to models that ace high-school exams—was not a one-time gain. We are racing through the OOMs extremely rapidly, and the numbers indicate we should expect another ~100,000x effective compute scaleup—resulting in another GPT-2-to-GPT-4-sized qualitative jump—over four years. Moreover, and critically, that doesn’t just mean a better chatbot; picking the many obvious low-hanging fruit on “unhobbling” gains should take us from chatbots to agents, from a tool to something that looks more like drop-in remote worker replacements.
While the inference is simple, the implication is striking. Another jump like that very well could take us to AGI, to models as smart as PhDs or experts that can work beside us as coworkers. Perhaps most importantly, if these AI systems could automate AI research itself, that would set in motion intense feedback loops—the topic of the next piece in the series.
Even now, barely anyone is pricing all this in. But situational awareness on AI isn’t actually that hard, once you step back and look at the trends. If you keep being surprised by AI capabilities, just start counting the OOMs.
The last four years
We have machines now that we can basically talk to like humans. It’s a remarkable testament to the human capacity to adjust that this seems normal, that we’ve become inured to the pace of progress. But it’s worth stepping back and looking at the progress of just the last few years.
GPT-2 to GPT-4
Let me remind you of how far we came in just the ~4 (!) years leading up to GPT-4.
GPT-2 (2019) ~ preschooler: “Wow, it can string together a few plausible sentences.” A very-cherry-picked example of a semi-coherent story about unicorns in the Andes it generated was incredibly impressive at the time. And yet GPT-2 could barely count to 5 without getting tripped up;2 when summarizing an article, it just barely outperformed selecting 3 random sentences from the article.3
**Some **examples** of what people found impressive about GPT-2 at the time. Left: GPT-2 does an ok job on extremely basic reading comprehension questions. Right: In a cherry-picked sample (best of 10 tries), GPT-2 can write a semi-coherent paragraph that says some semi-relevant things about the Civil War. **
Comparing AI capabilities with human intelligence is difficult and flawed, but I think it’s informative to consider the analogy here, even if it’s highly imperfect. GPT-2 was shocking for its command of language, and its ability to occasionally generate a semi-cohesive paragraph, or occasionally answer simple factual questions correctly. It’s what would have been impressive for a preschooler.
GPT-3 (2020)4 ~ elementary schooler: “Wow, with just some few-shot examples it can do some simple useful tasks.” It started being cohesive over even multiple paragraphs much more consistently, and could correct grammar and do some very basic arithmetic. For the first time, it was also commercially useful in a few narrow ways: for example, GPT-3 could generate simple copy for SEO and marketing.
**Some examples of what people found impressive about GPT-3 at the time. Top: After a simple instruction, GPT-3 can use a made-up word in a new sentence. Bottom-left: GPT-3 can engage in rich storytelling back-and-forth. Bottom-right: GPT-3 can generate some very simple code. **
Again, the comparison is imperfect, but what impressed people about GPT-3 is perhaps what would have been impressive for an elementary schooler: it wrote some basic poetry, could tell richer and coherent stories, could start to do rudimentary coding, could fairly reliably learn from simple instructions and demonstrations, and so on.
GPT-4 (2023) ~ smart high schooler: “Wow, it can write pretty sophisticated code and iteratively debug, it can write intelligently and sophisticatedly about complicated subjects, it can reason through difficult high-school competition math, it’s beating the vast majority of high schoolers on whatever tests we can give it, etc.” From code to math to Fermi estimates, it can think and reason. GPT-4 is now useful in my daily tasks, from helping write code to revising drafts.
Some of what people found impressive about GPT-4 when it was released, from the “Sparks of AGI” paper. Top: It’s writing very complicated code (producing the plots shown in the middle) and can reason through nontrivial math problems. Bottom-left: Solving an AP math problem. Bottom-right: Solving a fairly complex coding problem. More interesting excerpts from that exploration of GPT-4’s capabilities here.
On everything from AP exams to the SAT, GPT-4 scores better than the vast majority of high schoolers. Of course, even GPT-4 is still somewhat uneven; for some tasks it’s much better than smart high-schoolers, while there are other tasks it can’t yet do. That said, I tend to think most of these limitations come down to obvious ways models are still hobbled, as I’ll discuss in-depth later. The raw intelligence is (mostly) there, even if the models are still artificially constrained; it’ll take extra work to unlock models being able to fully apply that raw intelligence across applications.
**Progress over just four years. Where are you on this line? **
The trends in deep learning
The pace of deep learning progress in the last decade has simply been extraordinary. A mere decade ago it was revolutionary for a deep learning system to identify simple images. Today, we keep trying to come up with novel, ever harder tests, and yet each new benchmark is quickly cracked. It used to take decades to crack widely-used benchmarks; now it feels like mere months.
**Deep learning systems are rapidly reaching or exceeding human-level in many domains. Graphic: **Our World in Data**
We’re literally running out of benchmarks. As an anecdote, my friends Dan and Collin made a benchmark called MMLU a few years ago, in 2020. They hoped to finally make a benchmark that would stand the test of time, equivalent to all the hardest exams we give high school and college students. Just three years later, it’s basically solved: models like GPT-4 and Gemini get ~90%.
More broadly, GPT-4 mostly cracks all the standard high school and college aptitude tests.5 (And even the one year from GPT-3.5 to GPT-4 often took us from well below median human performance to the top of the human range.)
GPT-4 scores on standardized tests. Note also the large jump from GPT-3.5 to GPT-4 in human percentile on these tests, often from well below the median human to the very top of the human range. (And this is GPT-3.5, a fairly recent model released less than a year before GPT-4, not the clunky old elementary-school-level GPT-3 we were talking about earlier!)
*Gray: Professional forecasts, made in August 2021, for June 2022 performance on the MATH benchmark (difficult mathematics problems from high-school math competitions). Red star: actual state-of-the-art performance by June 2022, far exceeding even the upper range forecasters gave. The median ML researcher was **even more pessimistic*.
Or consider the MATH benchmark, a set of difficult mathematics problems from high-school math competitions.6 When the benchmark was released in 2021, the best models only got ~5% of problems right. And the original paper noted: “Moreover, we find that simply increasing budgets and model parameter counts will be impractical for achieving strong mathematical reasoning if scaling trends continue […]. To have more traction on mathematical problem solving we will likely need new algorithmic advancements from the broader research community”—we would need fundamental new breakthroughs to solve MATH, or so they thought. A survey of ML researchers predicted minimal progress over the coming years;7 and yet within just a year (by mid-2022), the best models went from ~5% to 50% accuracy; now, MATH is basically solved, with recent performance over 90%.
Over and over again, year after year, skeptics have claimed “deep learning won’t be able to do X” and have been quickly proven wrong.8If there’s one lesson we’ve learned from the past decade of AI, it’s that you should never bet against deep learning.
Now the hardest unsolved benchmarks are tests like GPQA, a set of PhD-level biology, chemistry, and physics questions. Many of the questions read like gibberish to me, and even PhDs in other scientific fields spending 30+ minutes with Google barely score above random chance. Claude 3 Opus currently gets ~60%,9 compared to in-domain PhDs who get ~80%—and I expect this benchmark to fall as well, in the next generation or two.
Example GPQA questions. Models are already better at this than I am, and we’ll probably crack expert-PhD-level soon…
Counting the OOMs
How did this happen? The magic of deep learning is that it just works—and the trendlines have been astonishingly consistent, despite naysayers at every turn.
*The effects of scaling compute, in the example of **OpenAI Sora*.
With each OOM of effective compute, models predictably, reliably get better.10 If we can count the OOMs, we can (roughly, qualitatively) extrapolate capability improvements.11 That’s how a few prescient individuals saw GPT-4 coming.
We can decompose the progress in the four years from GPT-2 to GPT-4 into three categories of scaleups:
We can “count the OOMs” of improvement along these axes: that is, trace the scaleup for each in units of effective compute. 3x is 0.5 OOMs; 10x is 1 OOM; 30x is 1.5 OOMs; 100x is 2 OOMs; and so on. We can also look at what we should expect on top of GPT-4, from 2023 to 2027.
I’ll go through each one-by-one, but the upshot is clear: we are rapidly racing through the OOMs. There are potential headwinds in the data wall, which I’ll address—but overall, it seems likely that we should expect another GPT-2-to-GPT-4-sized jump, on top of GPT-4, by 2027.
Compute
I’ll start with the most commonly-discussed driver of recent progress: throwing (a lot) more compute at models.
Many people assume that this is simply due to Moore’s Law. But even in the old days when Moore’s Law was in its heyday, it was comparatively glacial—perhaps 1-1.5 OOMs per decade. We are seeing much more rapid scaleups in compute—close to 5x the speed of Moore’s law—instead because of mammoth investment. (Spending even a million dollars on a single model used to be an outrageous thought nobody would entertain, and now that’s pocket change!)
| Model | Estimated compute | Growth |
|---|---|---|
| GPT-2 (2019) | ~4e21 FLOP | |
| GPT-3 (2020) | ~3e23 FLOP | + ~2 OOMs |
| GPT-4 (2023) | 8e24 to 4e25 FLOP | + ~1.5–2 OOMs |
**Estimates of compute for GPT-2 to GPT-4 by **Epoch AI**
We can use public estimates from Epoch AI (a source widely respected for its excellent analysis of AI trends) to trace the compute scaleup from 2019 to 2023. GPT-2 to GPT-3 was a quick scaleup; there was a large overhang of compute, scaling from a smaller experiment to using an entire datacenter to train a large language model. With the scaleup from GPT-3 to GPT-4, we transitioned to the modern regime: having to build an entirely new (much bigger) cluster for the next model. And yet the dramatic growth continued. Overall, Epoch AI estimates suggest that GPT-4 training used ~3,000x-10,000x more raw compute than GPT-2.
In broad strokes, this is just the continuation of a longer-running trend. For the last decade and a half, primarily because of broad scaleups in investment (and specializing chips for AI workloads in the form of GPUs and TPUs), the training compute used for frontier AI systems has grown at roughly ~0.5 OOMs/year.
**Training compute of notable deep learning models over time. Source: **Epoch AI**
The compute scaleup from GPT-2 to GPT-3 in a year was an unusual overhang, but all the indications are that the longer-run trend will continue. The SF-rumor-mill is abuzz with dramatic tales of huge GPU orders. The investments involved will be extraordinary—but they are in motion. I go into this more later in the series, in IIIa. Racing to the Trillion-Dollar Cluster; based on that analysis, an additional 2 OOMs of compute (a cluster in the $10s of billions) seems very likely to happen by the end of 2027; even a cluster closer to +3 OOMs of compute ($100 billion+) seems plausible (and is rumored to be in the works at Microsoft/OpenAI).
Algorithmic efficiencies
While massive investments in compute get all the attention, algorithmic progress is probably a similarly important driver of progress (and has been dramatically underrated).
To see just how big of a deal algorithmic progress can be, consider the following illustration of the drop in price to attain ~50% accuracy on the MATH benchmark (high school competition math) over just two years. (For comparison, a computer science PhD student who didn’t particularly like math scored 40%, so this is already quite good.)* *Inference efficiency improved by nearly 3 OOMs—1,000x—in less than two years.
*Rough estimate on relative inference cost of attaining ~50% MATH performance.12*
Though these are numbers just for inference efficiency (which may or may not correspond to training efficiency improvements, where numbers are harder to infer from public data), they make clear there is an enormous amount of algorithmic progress possible and happening.
In this piece, I’ll separate out two kinds of algorithmic progress. Here, I’ll start by covering “within-paradigm” algorithmic improvements—those that simply result in better base models, and that straightforwardly act as compute efficiencies or compute multipliers. For example, a better algorithm might allow us to achieve the same performance but with 10x less training compute. In turn, that would act as a 10x (1 OOM) increase in effective compute. (Later, I’ll cover “unhobbling,” which you can think of as “paradigm-expanding/application-expanding” algorithmic progress that unlocks capabilities of base models.)
If we step back and look at the long-term trends, we seem to find new algorithmic improvements at a fairly consistent rate. Individual discoveries seem random, and at every turn, there seem insurmountable obstacles—but the long-run trendline is predictable, a straight line on a graph. Trust the trendline.
We have the best data for ImageNet (where algorithmic research has been mostly public and we have data stretching back a decade), for which we have consistently improved compute efficiency by roughly ~0.5 OOMs/year across the 9-year period between 2012 and 2021.
**We can measure algorithmic progress: how much less compute is needed in 2021 compared to 2012 to train a model with the same performance? We see a trend of ~0.5 OOMs/yr of algorithmic efficiency. Source: **Erdil and Besiroglu 2022**. **
That’s a huge deal: that means 4 years later, we can achieve the same performance for ~100x less compute (and concomitantly, much higher performance for the same compute!).
Unfortunately, since labs don’t publish internal data on this, it’s harder to measure algorithmic progress for frontier LLMs over the last four years. EpochAI has new work replicating their results on ImageNet for language modeling, and estimate a similar ~0.5 OOMs/year of algorithmic efficiency trend in LLMs from 2012 to 2023. (This has wider error bars though, and doesn’t capture some more recent gains, since the leading labs have stopped publishing their algorithmic efficiencies.)
**Estimates by Epoch AI of algorithmic efficiencies in language modeling. Their estimates suggest we’ve made ~4 OOMs of efficiency gains in 8 years. **
More directly looking at the last 4 years, GPT-2 to GPT-3 was basically a simple scaleup (according to the paper), but there have been many publicly-known and publicly-inferable gains since GPT-3:
Put together, public information suggests that the GPT-2 to GPT-4 jump included 1-2 OOMs of algorithmic efficiency gains.19
Over the 4 years following GPT-4, we should expect the trend to continue:20 on average 0.5 OOMs/yr of compute efficiency, i.e. ~2 OOMs of gains compared to GPT-4 by 2027. While compute efficiencies will become harder to find as we pick the low-hanging fruit, AI lab investments in money and talent to find new algorithmic improvements are growing rapidly.21 (The publicly-inferable inference cost efficiencies, at least, don’t seem to have slowed down at all.) On the high end, we could even see more fundamental, Transformer-like breakthroughs22 with even bigger gains.
Put together, this suggests we should expect something like 1-3 OOMs of algorithmic efficiency gains (compared to GPT-4) by the end of 2027, maybe with a best guess of ~2 OOMs.
The data wall
There is a potentially important source of variance for all of this: we’re running out of internet data. That could mean that, very soon, the naive approach to pretraining larger language models on more scraped data could start hitting serious bottlenecks.
Frontier models are already trained on much of the internet. Llama 3, for example, was trained on over 15T tokens. Common Crawl, a dump of much of the internet used for LLM training, is >100T tokens raw, though much of that is spam and duplication (e.g., a relatively simple deduplication leads to 30T tokens, implying Llama 3 would already be using basically all the data). Moreover, for more specific domains like code, there are many fewer tokens still, e.g. public github repos are estimated to be in low trillions of tokens.
You can go somewhat further by repeating data, but academic work on this suggests that repetition only gets you so far, finding that after 16 epochs (a 16-fold repetition), returns diminish extremely fast to nil. At some point, even with more (effective) compute, making your models better can become much tougher because of the data constraint. This isn’t to be understated: we’ve been riding the scaling curves, riding the wave of the language-modeling-pretraining-paradigm, and without something new here, this paradigm will (at least naively) run out. Despite the massive investments, we’d plateau. All of the labs are rumored to be making massive research bets on new algorithmic improvements or approaches to get around this. Researchers are purportedly trying many strategies, from synthetic data to self-play and RL approaches. Industry insiders seem to be very bullish: Dario Amodei (CEO of Anthropic) recently said on a podcast: “if you look at it very naively we’re not that far from running out of data […] My guess is that this will not be a blocker […] There’s just many different ways to do it.” Of course, any research results on this are proprietary and not being published these days.
In addition to insider bullishness, I think there’s a strong intuitive case for why it should be possible to find ways to train models with much better sample efficiency (algorithmic improvements that let them learn more from limited data). Consider how you or I would learn from a really dense math textbook:
The old state of the art of training models was simple and naive, but it worked, so nobody really tried hard to crack these approaches to sample efficiency. Now that it may become more of a constraint, we should expect all the labs to invest billions of dollars and their smartest minds into cracking it. A common pattern in deep learning is that it takes a lot of effort (and many failed projects) to get the details right, but eventually some version of the obvious and simple thing just works. Given how deep learning has managed to crash through every supposed wall over the last decade, my base case is that it will be similar here.
Moreover, it actually seems possible that cracking one of these algorithmic bets like synthetic data could dramatically improve models. Here’s an intuition pump. Current frontier models like Llama 3 are trained on the internet—and the internet is mostly crap, like e-commerce or SEO or whatever. Many LLMs spend the vast majority of their training compute on this crap, rather than on really high-quality data (e.g. reasoning chains of people working through difficult science problems). Imagine if you could spend GPT-4-level compute on entirely extremely high-quality data—it could be a much, much more capable model.
A look back at AlphaGo—the first AI system that beat the world champions at the game of Go, decades before it was thought possible—is useful here as well.25
Developing the equivalent of step 2 for LLMs is a key research problem for overcoming the data wall (and, moreover, will ultimately be the key to surpassing human-level intelligence).
All of this is to say that data constraints seem to inject large error bars either way into forecasting the coming years of AI progress. There’s a very real chance things stall out (LLMs might still be as big of a deal as the internet, but we wouldn’t get to truly crazy AGI). But I think it’s reasonable to guess that the labs will crack it, and that doing so will not just keep the scaling curves going, but possibly enable huge gains in model capability.
As an aside, this also means that we should expect more variance between the different labs in coming years compared to today. Up until recently, the state of the art techniques were published, so everyone was basically doing the same thing. (And new upstarts or open source projects could easily compete with the frontier, since the recipe was published.) Now, key algorithmic ideas are becoming increasingly proprietary. I’d expect labs’ approaches to diverge much more, and some to make faster progress than others—even a lab that seems on the frontier now could get stuck on the data wall while others make a breakthrough that lets them race ahead. And open source will have a much harder time competing. It will certainly make things interesting. (And if and when a lab figures it out, their breakthrough will be the key to AGI, key to superintelligence—one of the United States’ most prized secrets.)
Unhobbling
Finally, the hardest to quantify—but no less important—category of improvements: what I’ll call “unhobbling.”
Imagine if when asked to solve a hard math problem, you had to instantly answer with the very first thing that came to mind. It seems obvious that you would have a hard time, except for the simplest problems. But until recently, that’s how we had LLMs solve math problems. Instead, most of us work through the problem step-by-step on a scratchpad, and are able to solve much more difficult problems that way. “Chain-of-thought” prompting unlocked that for LLMs. Despite excellent raw capabilities, they were much worse at math than they could be because they were hobbled in an obvious way, and it took a small algorithmic tweak to unlock much greater capabilities.
We’ve made huge strides in “unhobbling” models over the past few years. These are algorithmic improvements beyond just training better base models—and often only use a fraction of pretraining compute—that unleash model capabilities:
A survey by Epoch AI of some of these techniques, like scaffolding, tool use, and so on, finds that techniques like this can typically result in effective compute gains of 5-30x on many benchmarks. METR (an organization that evaluates models) similarly found very large performance improvements on their set of agentic tasks, via unhobbling from the same GPT-4 base model: from 5% with just the base model, to 20% with the GPT-4 as posttrained on release, to nearly 40% today from better posttraining, tools, and agent scaffolding.
**Performance on METR’s agentic tasks, over time via better unhobbling. Source: **Model Evaluation and Threat Research**
While it’s hard to put these on a unified effective compute scale with compute and algorithmic efficiencies, it’s clear these are huge gains, at least on a roughly similar magnitude as the compute scaleup and algorithmic efficiencies. (It also highlights the central role of algorithmic progress: the 0.5 OOMs/year of compute efficiencies, already significant, are only part of the story, and put together with unhobbling algorithmic progress overall is maybe even a majority of the gains on the current trend.)
“Unhobbling” is what actually enabled these models to become useful—and I’d argue that much of what is holding back many commercial applications today is the need for further “unhobbling” of this sort. Indeed, models today are still incredibly hobbled! For example:
The possibilities here are enormous, and we’re rapidly picking low-hanging fruit here. This is critical: *it’s completely wrong to just imagine “GPT-6 ChatGPT.” * With continued unhobbling progress, the improvements will be step-changes compared to GPT-6 + RLHF. By 2027, rather than a chatbot, you’re going to have something that looks more like an agent, like a coworker.
From chatbot to agent-coworker
What could ambitious unhobbling over the coming years look like? The way I think about it, there are three key ingredients:
1. Solving the “onboarding problem”
GPT-4 has the raw smarts to do a decent chunk of many people’s jobs, but it’s sort of like a smart new hire that just showed up 5 minutes ago: it doesn’t have any relevant context, hasn’t read the company docs or Slack history or had conversations with members of the team, or spent any time understanding the company-internal codebase. A smart new hire isn’t that useful 5 minutes after arriving—but they are quite useful a month in! It seems like it should be possible, for example via very-long-context, to “onboard” models like we would a new human coworker. This alone would be a huge unlock.
2. The test-time compute overhang (reasoning/error correction/system II for longer-horizon problems)
Right now, models can basically only do short tasks: you ask them a question, and they give you an answer. But that’s extremely limiting. Most useful cognitive work humans do is longer horizon—it doesn’t just take 5 minutes, but hours, days, weeks, or months.
A scientist that could only think about a difficult problem for 5 minutes couldn’t make any scientific breakthroughs. A software engineer that could only write skeleton code for a single function when asked wouldn’t be very useful—software engineers are given a larger task, and they then go make a plan, understand relevant parts of the codebase or technical tools, write different modules and test them incrementally, debug errors, search over the space of possible solutions, and eventually submit a large pull request that’s the culmination of weeks of work. And so on.
In essence, there is a large *test-time compute overhang. *Think of each GPT-4 token as a word of internal monologue when you think about a problem. Each GPT-4 token is quite smart, but it can currently only really effectively use on the order of ~hundreds of tokens for chains of thought coherently (effectively as though you could only spend a few minutes of internal monologue/thinking on a problem or project).
What if it could use millions of tokens to think about and work on really hard problems or bigger projects?
| Number of tokens | Equivalent to me working on something for… | |
|---|---|---|
| 100s | A few minutes | ChatGPT (we are here) |
| 1000s | Half an hour | +1 OOMs test-time compute |
| 10,000s | Half a workday | +2 OOMs |
| 100,000s | A workweek | +3 OOMs |
| Millions | Multiple months | +4 OOMs |
Assuming a human thinking at ~100 tokens/minute and working 40 hours/week, translating “how long a model thinks” in tokens to human-time on a given problem/project.
Even if the “per-token” intelligence were the same, it’d be the difference between a smart person spending a few minutes vs. a few months on a problem. I don’t know about you, but there’s much, much, much more I am capable of in a few months vs. a few minutes. If we could unlock “being able to think and work on something for months-equivalent, rather than a few-minutes-equivalent” for models, it would unlock an insane jump in capability. There’s a huge overhang here, many OOMs worth.
Right now, models can’t do this yet. Even with recent advances in long-context, this longer context mostly only works for the consumption of tokens, not the production of tokens—after a while, the model goes off the rails or gets stuck. It’s not yet able to go away for a while to work on a problem or project on its own.29
But unlocking test-time compute might merely be a matter of relatively small “unhobbling” algorithmic wins. Perhaps a small amount of RL helps a model learn to error correct (“hm, that doesn’t look right, let me double check that”), make plans, search over possible solutions, and so on. In a sense, the model already has most of the raw capabilities, it just needs to learn a few extra skills on top to put it all together.
In essence, we just need to teach the model a sort of System II outer loop30 that lets it reason through difficult, long-horizon projects.
If we succeed at teaching this outer loop, instead of a short chatbot answer of a couple paragraphs, imagine a stream of millions of words (coming in more quickly than you can read them) as the model thinks through problems, uses tools, tries different approaches, does research, revises its work, coordinates with others, and completes big projects on its own.
** Trading off test-time and train-time compute in other ML domains
In other domains, like AI systems for board games, it’s been demonstrated that you can use more test-time compute (also called inference-time compute) to substitute for training compute.
Jones (2021): A smaller model can do as well as a much larger model at the game of Hex if you give it more test-time compute (“more time to think”). In this domain, they find that one can spend ~1.2 OOMs more compute at test-time to get performance equivalent to a model with ~1 OOMs more training compute.
If a similar relationship held in our case, if we could unlock + 4 OOMs of test-time compute, that might be equivalent to + 3OOMs of pretraining compute, i.e. very roughly something like the jump between GPT-3 and GPT-4. (I.e., solving this “unhobbling” would be equivalent to a huge OOM scaleup.)
3. Using a computer
This is perhaps the most straightforward of the three. ChatGPT right now is basically like a human that sits in an isolated box that you can text. While early unhobbling improvements teach models to use individual isolated tools, I expect that with multimodal models we will soon be able to do this in one fell swoop: we will simply enable models to use a computer like a human would.
That means joining your Zoom calls, researching things online, messaging and emailing people, reading shared docs, using your apps and dev tooling, and so on. (Of course, for models to make the most use of this in longer-horizon loops, this will go hand-in-hand with unlocking test-time compute.)
By the end of this, I expect us to get something that looks a lot like a drop-in remote worker. An agent that joins your company, is onboarded like a new human hire, messages you and colleagues on Slack and uses your softwares, makes pull requests, and that, given big projects, can do the model-equivalent of a human going away for weeks to independently complete the project. You’ll probably need somewhat better base models than GPT-4 to unlock this, but possibly not even that much better—a lot of juice is in fixing the clear and basic ways models are still hobbled.
*A very early peek at what this might look like is **Devin*, an early prototype of unlocking the “agency-overhang”/”test-time compute overhang” on models on the path to creating a fully automated software engineer. I don’t know how well Devin works in practice, and this demo is still very limited compared to what proper chatbot → agent unhobbling would yield, but it’s a useful teaser of the sort of thing coming soon.
By the way, I expect the centrality of unhobbling to lead to a somewhat interesting “sonic boom” effect in terms of commercial applications. Intermediate models between now and the drop-in remote worker will require tons of schlep to change workflows and build infrastructure to integrate and derive economic value from. The drop-in remote worker will be dramatically easier to integrate—just, well, drop them in to automate all the jobs that could be done remotely. It seems plausible that the schlep will take longer than the unhobbling, that is, by the time the drop-in remote worker is able to automate a large number of jobs, intermediate models won’t yet have been fully harnessed and integrated—so the jump in economic value generated could be somewhat discontinuous.
The next four years
**Summary of the estimates on drivers of progress in the four years preceding GPT-4, and what we should expect in the four years following GPT-4. **
Putting the numbers together, we should (roughly) expect another GPT-2-to-GPT-4-sized jump in the 4 years following GPT-4, by the end of 2027.
To put this in perspective, suppose GPT-4 training took 3 months. In 2027, a leading AI lab will be able to train a GPT-4-level model in a minute.31** **The OOM effective compute scaleup will be dramatic.
Where will that take us?
Summary of counting the OOMs.
GPT-2 to GPT-4 took us from ~preschooler to ~smart high-schooler; from barely being able to output a few cohesive sentences to acing high-school exams and being a useful coding assistant. That was an insane jump. If *this *is the intelligence gap we’ll cover once more, where will that take us?32 We should not be surprised if that takes us very, very far. Likely, it will take us to models that can outperform PhDs and the best experts in a field.
(One neat way to think about this is that the current trend of AI progress is proceeding at roughly 3x the pace of child development. Your 3x-speed-child just graduated high school; it’ll be taking your job before you know it!)
Again, critically, don’t just imagine an incredibly smart ChatGPT: unhobbling gains should mean that this looks more like a drop-in remote worker, an incredibly smart agent that can reason and plan and error-correct and knows everything about you and your company and can work on a problem independently for weeks.
We are on course for AGI by 2027. These AI systems will basically be able to automate basically all cognitive jobs (think: all jobs that could be done remotely).
To be clear—the error bars are large. Progress could stall as we run out of data, if the algorithmic breakthroughs necessary to crash through the data wall prove harder than expected. Maybe unhobbling doesn’t go as far, and we are stuck with merely expert chatbots, rather than expert coworkers. Perhaps the decade-long trendlines break, or scaling deep learning hits a wall for real this time. (Or an algorithmic breakthrough, even simple unhobbling that unleashes the test-time compute overhang, could be a paradigm-shift, accelerating things further and leading to AGI even earlier.)
In any case, we are racing through the OOMs, and it requires no esoteric beliefs, merely trend extrapolation of straight lines, to take the possibility of AGI—true AGI—by 2027 extremely seriously.
It seems like many are in the game of downward-defining AGI these days, as just as really good chatbot or whatever. What I mean is an AI system that could fully automate my or my friends’ job, that could fully do the work of an AI researcher or engineer. Perhaps some areas, like robotics, might take longer to figure out by default. And the societal rollout, e.g. in medical or legal professions, could easily be slowed by societal choices or regulation. But once models can automate AI research itself, that’s enough—enough to kick off intense feedback loops—and we could very quickly make further progress, the automated AI engineers themselves solving all the remaining bottlenecks to fully automating everything. In particular, millions of automated researchers could very plausibly compress a decade of further algorithmic progress into a year or less. AGI will merely be a small taste of the superintelligence soon to follow. (More on that in the next piece.)
In any case, do not expect the vertiginous pace of progress to abate. The trendlines look innocent, but their implications are intense. As with every generation before them, every new generation of models will dumbfound most onlookers; they’ll be incredulous when, very soon, models solve incredibly difficult science problems that would take PhDs days, when they’re whizzing around your computer doing your job, when they’re writing codebases with millions of lines of code from scratch, when every year or two the economic value generated by these models 10xs. Forget scifi, count the OOMs: it’s what we should expect. AGI is no longer a distant fantasy. Scaling up simple deep learning techniques has just worked, the models just want to learn, and we’re about to do another 100,000x+ by the end of 2027. It won’t be long before they’re smarter than us.
**GPT-4 is just the beginning—where will we be four years later? Do not make the mistake of underestimating the rapid pace of deep learning progress (as illustrated by **progress in GANs**). **
Next post in series: ***II. From AGI to Superintelligence: the Intelligence Explosion** ***
Addendum. Racing through the OOMs: It’s this decade or bust
I used to be more skeptical of short timelines to AGI. One reason is that it seemed unreasonable to privilege this decade, concentrating so much AGI-probability-mass on it (it seemed like a classic fallacy to think “oh we’re so special”). I thought we should be uncertain about what it takes to get AGI, which should lead to a much more “smeared-out” probability distribution over when we might get AGI.
However, I’ve changed my mind: critically, our uncertainty over what it takes to get AGI should be over OOMs (of effective compute), rather than over years.
We’re racing through the OOMs this decade. Even at its bygone heyday, Moore’s law was only 1–1.5 OOMs/decade. I estimate that we will do ~5 OOMs in 4 years, and over ~10 this decade overall.
We’ve been racing through the OOMs this decade; after the early 2030s, we will face a slow slog.
In essence, we’re in the middle of a huge scaleup reaping one-time gains this decade, and progress through the OOMs will be multiples slower thereafter. If this scaleup doesn’t get us to AGI in the next 5-10 years, it might be a long way out.
Put together, this means we are racing through many more OOMs in the next decade than we might in multiple decades thereafter. Maybe it’s enough—and we get AGI soon—or we might be in for a long, slow slog. You and I can reasonably disagree on the median time to AGI, depending on how hard we think achieving AGI will be—but given how we’re racing through the OOMs right now, certainly your modal AGI year should sometime later this decade or so.
Matthew Barnett has a nice related visualization of this, considering just compute and biological bounds.
Predictions they’ve made every year for the last decade, and which they’ve been consistently wrong about…↩
From SSC: Janelle Shane asks GPT-2 its ten favorite animals: Prompt: My 10 favorite animals are: 1. My ten favorite animals are: Zebras with a white scar on the back Insiduous spiders and octopus Frog with large leaves, hopefully black Cockatiel with scales Razorbill with wings hanging about 4 inches from one’s face and a heart tattoo on a frog Cockatric interlocking tetrabods that can be blind, cut, and eaten raw: Black and white desert crocodiles living in sunlight Zebra and many other pea bugs↩
From the GPT-2 paper, Section 3.6.↩
I mean clunky old GPT-3 here, not the dramatically-improved GPT-3.5 you might know from ChatGPT.↩
And no, these tests aren’t in the training set. AI labs put real effort into ensuring these evals are uncontaminated, because they need good measurements in order to do good science. A recent analysis on this by ScaleAI confirmed that the leading labs aren’t overfitting to the benchmarks (though some smaller LLM developers might be juicing their numbers).↩
In the original paper, it was noted: “We also evaluated humans on MATH, and found that a computer science PhD student who does not especially like mathematics attained approximately 40% on MATH, while a three-time IMO gold medalist attained 90%, indicating that MATH can be challenging for humans as well.”↩
A coauthor notes: “When our group first released the MATH dataset, at least one [ML researcher colleague] told us that it was a pointless dataset because it was too far outside the range of what ML models could accomplish (indeed, I was somewhat worried about this myself).”↩
Here’s Yann LeCun predicting in 2022 that even GPT-5000 won’t be able to reason about physical interactions with the real world; GPT-4 obviously does it with ease a year later. Here’s Gary Marcus’s walls predicted after GPT-2 being solved by GPT-3, and the walls he predicted after GPT-3 being solved by GPT-4. Here’s Prof. Bryan Caplan losing his first-ever public bet (after previously famously having a perfect public betting track record). In January 2023, after GPT-3.5 got a D on his economics midterm, Prof. Caplan bet Matthew Barnett that no AI would get an A on his economics midterms by *2029. *Just two months later, when GPT-4 came out, it promptly scored an A on his midterm (and it would have been one of the highest scores in his class).↩
On the diamond set, majority voting of the model trying 32 times with chain-of-thought.↩
And it’s worth noting just how consistent these trendlines are. Combining the original scaling laws paper with some of the estimates on compute and compute efficiency scaling since then implies a consistent scaling trend for over 15 orders of magnitude (over 1,000,000,000,000,000x in effective compute)
A common misconception is that scaling only holds for perplexity loss, but we see very clear and consistent scaling behavior on downstream performance on benchmarks as well. It’s usually just a matter of finding the right log-log graph. For example, in the GPT-4 blog post, they show consistent scaling behavior for performance on coding problems over 6 OOMs (1,000,000x) of compute, using MLPR (mean log pass rate). The “Are Emergent Abilities a Mirage?” paper makes a similar point; with the right choice of metric, there is almost always a consistent trend for performance on downstream tasks.
More generally, the “scaling hypothesis” qualitative observation—very clear trends on model capability with scale—predates loss-scaling-curves; the “scaling laws” work was just a formal measurement of this. ↩
- Gemini 1.5 Flash scores 54.9% on MATH, and costs $0.35/$1.05 (input/output) per million tokens. GPT-4 scored 42.5% on MATH prelease and 52.9% on MATH in early 2023, and cost $30/$60 (input/output) per million tokens; that’s 85x/57x (input/output) more expensive per token than Gemini 1.5 Flash. To be conservative, I use an estimate of 30x cost decrease above (accounting for Gemini 1.5 Flash possibly using more tokens to reason through problems). 2. Minerva540B scores 50.3% on MATH, using majority voting among 64 samples. A knowledgeable friend estimates the base model here is probably 2-3x more expensive to inference than GPT-4. However, Minerva seems to use somewhat fewer tokens per answer on a quick spot check. More importantly, Minerva needed 64 samples to achieve that performance, naively implying a 64x multiple on cost if you e.g. naively ran this via an inference API. In practice, prompt tokens can be cached when running an eval; given a few-shot prompt, prompt tokens are likely a majority of the cost, even accounting for output tokens. Supposing output tokens are a third of the cost for getting a single sample, that would imply only a ~20x increase in cost from the maj@64 with caching. To be conservative, I use the rough number of a 20x cost decrease in the above (even if the naive decrease in inference cost from running this via an API would be larger).↩
Though these are inference efficiencies (rather than necessarily training efficiencies), and to some extent will reflect inference-specific optimizations, a) they suggest enormous amounts of algorithmic progress is possible and happening in general, and b) it’s often the case that an algorithmic improvements is both a training efficiency gain and an inference efficiency, for example by reducing the number of parameters necessary.↩
GPT-3: $60/1M tokens, GPT-4: $30/1M input tokens and $60/1M output tokens.↩
Chinchilla scaling laws say that one should scale parameter count and data equally. That is, parameter count grows “half the OOMs” of the OOMs that effective training compute grows. At the same time, parameter count is intuitively roughly proportional to inference costs. All else equal, constant inference costs thus implies that half of the OOMs of effective compute growth were “canceled out” by algorithmic win. That said, to be clear, this is a very naive calculation (just meant for a rough illustration) that is wrong in various ways. There may be inference-specific optimizations (that don’t translate into training efficiency); there may be training efficiencies that don’t reduce parameter count (and thus don’t translate into inference efficiency); and so on.↩
Gemini 1.5 Flash ranks similarly to GPT-4 (higher than original GPT-4, lower than updated versions of GPT-4) on LMSys, a chatbot leaderboard, and has similar performance on MATH and GPQA (evals that measure reasoning) as the original GPT-4, while landing roughly in the middle between GPT-3.5 and GPT-4 on MMLU (an eval that more heavily weights towards measuring knowledge).↩
At ~GPT-3 scale, more than 3x at larger scales.↩
For example, this paper contains a comparison of a GPT-3-style vanilla Transformer to various simple changes to architecture and training recipe published over the years (RMSnorms instead of layernorm, different positional embeddings, SwiGlu activation, AdamW optimizer instead of Adam, etc.), what they call “Transformer++”, implying a 6x gain at least at small scale.↩
If we take the trend of 0.5 OOMs/year, and 4 years between GPT-2 and GPT-4 release, that would be 2 OOMs. However, GPT-2 to GPT-3 was a simple scaleup (after big gains from e.g. Transformers), and OpenAI claims GPT-4 pretraining finished in 2022, which could mean we’re looking at closer to 2 years worth of algorithmic progress that we should be counting here. 1 OOM of algorithmic efficiency seems like a conservative lower bound.↩
At the very least, given over a decade of consistent algorithmic improvements, the burden of proof would be on those who would suggest it will all suddenly come to a halt
The economic returns to a 3x compute efficiency will be measured in the $10s of billions or more, given cluster costs.↩
Very roughly something like a ~10x gain.↩
And just rereading the same textbook over and over again might result in memorization, not understanding. I take it that’s how many wordcels pass math classes
One other way of thinking about it I find interesting: there is a “missing-middle” between pretraining and in-context learning. In-context learning is incredible (and competitive with human sample efficiency). For example, the Gemini 1.5 Pro paper discusses giving the model instructional materials (a textbook, a dictionary) on Kalamang, a language spoken by fewer than 200 people and basically not present on the internet, in context—and the model learns to translate from English to Kalamang at human-level! In context, the model is able to learn from the textbook as well as a human could (and much better than it would learn from just chucking that one textbook into pretraining). When a human learns from a textbook, they’re able to distill their short-term memory/learnings into long-term memory/long-term skills with practice; however, we don’t have an equivalent way to distill in-context learning “back to the weights.” Synthetic data/self-play/RL/etc are trying to fix that: let the model learn by itself, then think about it and practice what it learned, distilling that learning back into the weights.↩
See also Andrej Karpathy’s talk discussing this here.↩
That’s the magic of unsupervised learning, in some sense: to better predict the next token, to make perplexity go down, models learn incredibly rich internal representations, everything from (famously) sentiment to complex world models. But, out of the box, they’re hobbled: they’re using their incredible internal representations merely to predict the next token in random internet text, and rather than applying them in the best way to actually try to solve your problem.↩
See Figure 7 from the updated Gemini 1.5 whitepaper, comparing perplexity vs. context for Gemini 1.5 Pro and Gemini 1.5 Flash (a much cheaper and presumably smaller model).↩
People are working on this though
Which makes sense—why would it have learned the skills for longer-horizon reasoning and error correction? There’s very little data on the internet in the form of “my complete internal monologue, reasoning, all the relevant steps over the course of a month as I work on a project.” Unlocking this capability will require a new kind of training, for it to learn these extra skills. Or as Gwern put it (private correspondence): “‘Brain the size of a galaxy, and what do they ask me to do? Predict the misspelled answers on benchmarks!’ Marvin the depressed neural network moaned."↩
System I vs. System II is a useful way of thinking about current capabilities of LLMs—including their limitations and dumb mistakes—and what might be possible with RL and unhobbling. Think of this way: when you are driving, most of the time you are on autopilot (system I, what models mostly do right now). But when you encounter a complex construction zone or novel intersection, you might ask your passenger-seat-companion to pause your conversation for a moment while you figure out—actually think about—what’s going on and what to do. If you were forced to go about life with only system I (closer to models today), you’d have a lot of trouble. Creating the ability for system II reasoning loops is a central unlock.↩
On the best guess assumptions on physical compute and algorithmic efficiency scaleups described above, and simplifying parallelism considerations (in reality, it might look more like “1440 (60*24) GPT-4-level models in a day” or similar).↩
Of course, any benchmark we have today will be saturated. But that’s not saying much; it’s mostly a reflection on the difficulty of making hard-enough benchmarks.↩
到 2027 年实现 AGI 是惊人地合理的。从 GPT-2 到 GPT-4,我们在 4 年内从约"学龄前儿童"水平进步到约"聪明高中生"水平。沿着算力(每年约 0.5 个数量级,即 OOM(order of magnitude,数量级))、算法效率(每年约 0.5 个 OOM)以及"解除束缚"(unhobbling)带来的增益(从聊天机器人到智能体)这些趋势线推算,我们应当预期到 2027 年会出现又一次学龄前儿童到高中生规模的质性飞跃。
In this piece: 本文内容:
瞧,模型们,它们只是想要学习。你必须明白这一点。模型们,它们只是想要学习。
*Ilya Sutskever(约 2015 年),*转引自 Dario Amodei
GPT-4 的能力让许多人震惊:一个 AI 系统居然能写代码、写文章,能推理解决困难的数学问题,还能在大学考试中拿高分。就在几年前,大多数人还认为这些是难以逾越的高墙。
但 GPT-4 不过是深度学习十年飞速进展的延续。十年前,模型连简单的猫狗图片都难以识别;四年前,GPT-2 勉强能拼出半像样的句子。如今,我们能想出的所有基准测试都在被迅速攻克。然而,这戏剧性的进步,其实只是深度学习规模化中一贯趋势的结果。
有些人很早就看透了这一点。他们曾被嘲笑,但他们所做的不过是相信趋势线。趋势线是强劲的,而他们是对的。模型们,它们只是想要学习;你把它们扩大规模,它们就学到更多。
我提出如下论断:到 2027 年,模型将能够胜任 AI 研究员/工程师的工作——这是惊人地合理的。 这不需要相信科幻,只需要相信图上的一条直线。
基于本文讨论的公开估算,对有效算力(既包括物理算力,也包括算法效率)过去与未来扩展规模的粗略估算。随着我们扩大模型规模,它们持续变得更聪明;而通过"历数 OOM",我们就能大致把握(近)未来应当预期何种水平的模型智能。(此图仅展示了基础模型的扩展;"解除束缚"(unhobbling)的增益未在图中体现。)
在这篇文章里,我将简单"历数 OOM"(OOM = order of magnitude,数量级;10x = 1 个数量级):观察三方面的趋势:1)算力(compute);2)算法效率(algorithmic efficiencies)(可以视为"有效算力"增长的算法进步);3)"解除束缚"(unhobbling)增益(修复模型默认被束缚的明显缺陷、解锁潜在能力并给予它们工具,从而带来实用性上的阶跃式提升)。我们追踪 GPT-4 之前四年里每项的增长情况,以及 GPT-4 之后四年(直到 2027 年底)应当预期的增长。鉴于深度学习在每一 OOM 有效算力下都有一贯的改进,我们可以借此预测未来的进展。
公开层面,自 GPT-4 发布以来一年一直很平静,因为新一代模型尚在酝酿之中——这让一些人宣称停滞,说深度学习正撞上一堵墙。1 但通过历数 OOM,我们可以一窥应当真正期待的图景。
结论其实很简单。从 GPT-2 到 GPT-4——从有时能勉强拼出几句连贯的话而令人惊叹的模型,到能在高中考试中拿高分的模型——并非一次性的收获。我们正以极快的速度穿越 OOM,数字表明,我们应当预期未来四年有效算力再增长约 100,000 倍——从而带来又一次 GPT-2 到 GPT-4 规模的质性飞跃。此外,关键的是,这不仅仅意味着一个更好的聊天机器人;摘取"解除束缚"增益中大量显而易见的低垂果实,应当能把我们从聊天机器人带到智能体,从一种工具带到某种更像"即插即用的远程工人替代品"(drop-in remote worker replacements)的东西。
虽然推理很简单,含义却惊人。又一次这样的飞跃极有可能把我们带到 AGI,带到与博士或专家一样聪明、能像同事一样在我们身边工作的模型。也许最重要的是,如果这些 AI 系统能自动化 AI 研究本身,就会启动激烈的反馈循环——这是本系列下一篇文章的主题。
即使是现在,也几乎没有人把这一切计入预期。但只要你退后一步看看趋势,对 AI 的情境意识(situational awareness)其实没那么难。如果你一直为 AI 的能力感到惊讶,那就开始历数 OOM 吧。
过去四年
我们现在拥有基本可以像对人一样交谈的机器。这居然显得稀松平常,我们居然已经对进步的速度习以为常——这是对人类适应能力的惊人见证。但值得退后一步,看看仅仅过去几年的进展。
GPT-2 到 GPT-4
让我提醒你,在通往 GPT-4 的短短约 4(!)年里我们走了多远。
GPT-2(2019)~ 学龄前儿童:"哇,它能拼出几句像样的话了。"它生成的一个关于安第斯山脉独角兽的半连贯故事——一个被精心挑选出来的例子——在当时令人叹为观止。然而,GPT-2 数数到 5 就会出错;2 在总结一篇文章时,它仅勉强胜过从文章中随机抽取 3 句话。3
当时人们觉得 GPT-2 令人惊叹的一些例子。左:GPT-2 在极其基础的阅读理解问题上表现尚可。右:在一个精心挑选的样本中(10 次尝试里最好的一次),GPT-2 能写出一个半连贯的段落,讲了一些关于美国内战(Civil War)的半相关的内容。
将 AI 能力与人类智能相比是困难且有缺陷的,但我认为这里的类比仍有参考价值,哪怕它很不完美。GPT-2 令人震惊的是它对语言的掌握,以及偶尔生成一个半连贯段落、或偶尔正确回答简单事实问题的能力。这正是一个学龄前儿童会令人惊叹的表现。
GPT-3(2020)4 ~ 小学生:"哇,只要给几个少样本(few-shot)示例,它就能做一些简单的有用任务。"它开始更稳定地在甚至多个段落间保持连贯,还能纠正语法、做一些非常基础的算术。它第一次在几个狭窄的方向上具备商业价值:例如,GPT-3 能为 SEO 和营销生成简单的文案。
当时人们觉得 GPT-3 令人惊叹的一些例子。上:经过一个简单指令,GPT-3 能在一个新句子里使用一个编造的词。左下:GPT-3 能进行你来我往的丰富叙事。右下:GPT-3 能生成一些非常简单的代码。
再说一遍,这种比较并不完美,但 GPT-3 让人印象深刻之处,或许正是一个小学生会令人印象深刻之处:它能写一些基础的诗歌,能讲更丰富、连贯的故事,能开始做初步的编程,能相当可靠地从简单的指令和示范中学习,等等。
GPT-4(2023)~ 聪明的高中生:"哇,它能写相当复杂的代码并迭代调试,能就复杂的主题进行智能而老练的写作,能推理解决困难的高中竞赛数学题,在我们能给出的几乎所有测试中都击败绝大多数高中生,等等。"从代码到数学再到费米估算(Fermi estimates),它都能思考和推理。GPT-4 现在在我的日常任务中很有用,从帮助写代码到修改草稿。
GPT-4 发布时让人惊叹的一些表现,出自"Sparks of AGI"(AGI 的火花)论文。上:它正在编写非常复杂的代码(生成中间所示的图表),并能推理解决不平凡的数学问题。左下:解决一道 AP 数学题。右下:解决一个相当复杂的编程问题。那次对 GPT-4 能力探索的更多有趣摘录见这里。
从 AP 考试到 SAT,GPT-4 的成绩都好于绝大多数高中生。当然,即使是 GPT-4 仍有些参差不齐;在某些任务上它比聪明的高中生好得多,但也有另一些任务它尚不能完成。话虽如此,我倾向于认为这些局限大多可以归结为模型仍被束缚的明显方式,正如我稍后深入讨论的。原始智能(基本)在那里,即使模型仍被人为地约束着;要解锁模型在各个应用中充分发挥这种原始智能,还需要额外的工作。
*仅仅四年的进步。在这条线上,你在哪里?*
深度学习的趋势
过去十年深度学习的进步速度简直非凡。仅仅十年前,深度学习系统能识别简单图像还是革命性的。今天,我们不断尝试提出新颖、更难的测试,但每个新基准测试很快就被攻克。过去攻克广泛使用的基准测试需要几十年;现在感觉只需几个月。
深度学习系统在许多领域正迅速达到或超越人类水平。图:Our World in Data(我们的数据世界)*
我们真的快没有基准测试可用了。讲个轶事:几年前,也就是 2020 年,我的朋友 Dan 和 Collin 制作了一个名为 MMLU 的基准测试。他们希望终于能做出一个经得起时间考验的基准,相当于我们给高中生和大学生出的最难的考试。仅仅三年后,它基本上被攻克了:GPT-4 和 Gemini 等模型能拿到约 90%。
更广泛地说,GPT-4 基本攻克了所有标准的高中和大学能力测试。5 (甚至从 GPT-3.5 到 GPT-4 的短短一年,常常就让我们从远低于人类中位数表现跃升到人类区间的顶端。)
GPT-4 在标准化考试上的成绩。还要注意从 GPT-3.5 到 GPT-4,在人类百分位排名上的巨大跃升,常常从远低于人类中位数到人类区间的最高处。(而这是 GPT-3.5——一个在 GPT-4 发布前不到一年发布的相当新的模型,不是我们前面提到的笨拙的、小学生水平的旧版 GPT-3!)
灰色:专业人士于 2021 年 8 月做出的预测,针对 2022 年 6 月模型在 MATH 基准(来自高中数学竞赛的难题)上的表现。红星:截至 2022 年 6 月的实际最先进表现,远超预测者给出的区间上限。机器学习研究者的中位数预期甚至更为悲观。
或者看看 MATH 基准,它是一组来自高中数学竞赛的难题。6 该基准于 2021 年发布时,最好的模型也只答对约 5% 的题目。原始论文还指出:"此外,我们发现,如果扩展趋势继续下去,仅仅增加预算和模型参数数量对实现强大的数学推理将是不切实际的[…]要在数学问题求解上取得更大进展,我们很可能需要更广泛研究社区提供新的算法进展"——他们认为,要攻克 MATH,我们需要根本性的新突破。一项对机器学习研究者的调查预测,未来几年进展会很小;7 然而仅仅一年内(到 2022 年年中),最好的模型就从约 5% 上升到 50% 的正确率;现在,MATH 基本上已被攻克,近期表现超过 90%。
年复一年,怀疑者们一次又一次地宣称"深度学习做不了 X",然后很快被证明是错的。8 如果说过去十年的 AI 教给了我们什么教训,那就是永远不要押注深度学习不行。
现在最难攻克的未解基准是像 GPQA 这样的测试,它是一组博士水平的生物学、化学和物理学问题。许多问题在我看来像天书,即便是其他科学领域的博士花 30 多分钟外加谷歌搜索,得分也勉强超过随机水平。Claude 3 Opus 目前能拿约 60%,9 而本领域的博士能拿约 80%——我预计这一基准也将在未来一两代模型中被攻克。
GPQA 示例题目。模型在这上面已经比我强了,而且我们很可能很快就会攻克专家博士级别……
历数 OOM
这是怎么发生的?深度学习的魔力在于它就是能行——而且趋势线一直惊人地一致,尽管一路上都有唱反调的人。
扩展算力的效果,以 OpenAI Sora 为例。
每增加一 OOM 有效算力,模型都可预测地、可靠地变得更好。10 如果我们能历数 OOM,就能(大致地、定性地)外推能力的提升。11 几位有先见之明的人正是这样预见到 GPT-4 的到来的。
我们可以把从 GPT-2 到 GPT-4 这四年的进展分解为三类扩展:
- Compute: We’re using much bigger computers to train these models.
- 算力(Compute):我们用大得多的计算机来训练这些模型。
- Algorithmic efficiencies: There’s a continuous trend of algorithmic progress. Many of these act as “compute multipliers,” and we can put them on a unified scale of growing effective compute.
- 算法效率(Algorithmic efficiencies):算法进步有着持续的趋势。其中许多起着"算力乘数"(compute multipliers)的作用,我们可以把它们放在不断增长的有效算力这一统一尺度上。
- ”Unhobbling” gains: By default, models learn a lot of amazing raw capabilities, but they are hobbled in all sorts of dumb ways, limiting their practical value. With simple algorithmic improvements like reinforcement learning from human feedback (RLHF), chain-of-thought (CoT), tools, and scaffolding, we can unlock significant latent capabilities.
- "解除束缚"(unhobbling)增益:默认情况下,模型学到了大量惊人的原始能力,但它们被各种愚蠢的方式束缚着,限制了其实用价值。借助来自人类反馈的强化学习(reinforcement learning from human feedback,RLHF)、思维链(chain-of-thought,CoT)、工具和脚手架(scaffolding)等简单的算法改进,我们可以解锁显著的潜在能力。
我们可以"历数"这些维度上改进的 OOM:也就是以有效算力为单位追踪每一项的扩展规模。3x 是 0.5 OOM;10x 是 1 OOM;30x 是 1.5 OOM;100x 是 2 OOM;以此类推。我们还可以看看从 2023 年到 2027 年,在 GPT-4 之上应当预期什么。
我将逐项展开,但结论是明确的:我们正以极快的速度穿越 OOM。数据墙可能带来逆风,这点我会讨论——但总体而言,到 2027 年,我们似乎很可能应当预期在 GPT-4 之上再来一次 GPT-2 到 GPT-4 规模的跃升。
算力(Compute)
我先谈谈最近进展中最常被讨论的驱动力:向模型投入(大量)更多的算力。
许多人以为这仅仅是摩尔定律(Moore's Law)的功劳。但即使在摩尔定律鼎盛的旧日,它的速度也相对缓慢——大约每十年 1-1.5 个 OOM。我们看到算力扩展速度快得多——接近摩尔定律的 5 倍——这其实是因为巨额的投入。(过去,哪怕在一个模型上花一百万美元都是没人愿意考虑的荒唐念头,而现在这只是零花钱!)
| 模型 | 估算算力 | 增长 |
|---|---|---|
| GPT-2(2019) | ~4e21 FLOP | |
| GPT-3(2020) | ~3e23 FLOP | + ~2 OOMs |
| GPT-4(2023) | 8e24 至 4e25 FLOP | + ~1.5–2 OOMs |
由 Epoch AI 估算的 GPT-2 到 GPT-4 的算力
我们可以用 Epoch AI 的公开估算(这个来源因其对 AI 趋势的出色分析而广受尊重)来追踪 2019 年到 2023 年的算力扩展。GPT-2 到 GPT-3 是一次快速的扩展:存在大量的算力余量(overhang),从较小的实验扩展到动用整个数据中心来训练大型语言模型。从 GPT-3 到 GPT-4 的扩展,我们过渡到了现代模式:必须为下一代模型建造一个全新的(大得多的)集群。然而戏剧性的增长仍在继续。总体而言,Epoch AI 的估算表明,GPT-4 训练使用的原始算力约为 GPT-2 的 ~3,000 倍至 10,000 倍。
大体而言,这只是更长期趋势的延续。在过去十五年里,主要由于投资的大规模增加(以及以 GPU 和 TPU 形式为 AI 工作负载专门化的芯片),前沿 AI 系统所用的训练算力以每年约 ~0.5 OOM 的速度增长。
随时间推移,著名深度学习模型的训练算力。来源:Epoch AI
一年内从 GPT-2 到 GPT-3 的算力扩展是一种不寻常的余量,但种种迹象都表明,更长期的趋势将会继续。旧金山的小道消息传得沸沸扬扬,尽是巨额 GPU 订单的戏剧性故事。相关投资将非同寻常——而且已经在推进。本系列后面我会在 IIIa. 竞逐万亿美元集群中深入探讨;基于那里的分析,到 2027 年底再增加 2 个 OOM 的算力(一个数百亿美元($10s of billions)级别的集群)似乎非常可能发生;即便是接近 +3 个 OOM 算力的集群(1000 亿美元($100 billion+)以上)似乎也有可能(并且有传言说微软/OpenAI 正在筹划)。
算法效率(Algorithmic efficiencies)
虽然算力方面的大规模投入吸引着所有目光,算法进步很可能是同样重要的进展驱动力(并且一直被严重低估)。
要看清算法进步能有多大的影响,请看下面这个例子:在短短两年内,达到 MATH 基准(高中数学竞赛题)约 50% 正确率的成本下降了如此之多。(作为对比,一个不太喜欢数学的计算机科学博士生能得 40%,所以这已经相当不错了。)* *在不到两年的时间里,推理效率提升了近 3 个 OOM——即 1,000 倍。
*对达到约 50% MATH 表现所需相对推理成本的粗略估算。12*
虽然这些只是推理效率的数字(它们可能对应也可能不对应训练效率的改进——后者的数字更难从公开数据推断),但它们清楚地表明,有巨大的算法进步是可能的,而且正在发生。
在这篇文章里,我会区分两类算法进步。这里我先讲"范式内"的算法改进——那些只是带来更好的基础模型、并直接充当算力效率或算力乘数的改进。例如,一个更好的算法可能让我们用少 10 倍的训练算力达到同样的表现。反过来,这就相当于有效算力增加了 10 倍(1 个 OOM)。(稍后我会讲"解除束缚"(unhobbling),你可以把它想成"扩展范式/扩展应用"的算法进步,它解锁基础模型的能力。)
如果我们退后一步看长期趋势,似乎会发现新的算法改进以相当一致的速度出现。单个发现看似随机,而且每一步似乎都有难以逾越的障碍——但长期趋势线是可以预测的,就是图上的一条直线。相信趋势线。
我们数据最充分的是 ImageNet(那里的算法研究大多公开,我们拥有可追溯十年的数据),在 2012 年到 2021 年这 9 年间,我们以每年约 ~0.5 OOM 的速度持续改进算力效率。
我们可以衡量算法进步:与 2012 年相比,2021 年训练一个表现相同的模型需要少多少算力?我们看到了每年约 ~0.5 OOM 算法效率的趋势。来源:Erdil 和 Besiroglu 2022。
这意义重大:这意味着 4 年后,我们可以用少约 ~100 倍的算力达到同样的表现(同时,同样的算力能换来高得多的表现!)。
不幸的是,由于实验室不公布这方面的内部数据,衡量过去四年前沿大语言模型(LLM)的算法进步要困难得多。EpochAI 有新的工作,把他们在 ImageNet 上的结果复现到语言建模上,并估算 LLM 从 2012 年到 2023 年也有类似的约 ~0.5 OOM/年的算法效率趋势。(不过这有更大的误差范围,而且没有涵盖一些较新的增益,因为领先的实验室已停止公布它们的算法效率。)
Epoch AI 对语言建模算法效率的估算。他们的估算表明,我们在 8 年内取得了约 4 个 OOM 的效率增益。
更直接地看过去 4 年:GPT-2 到 GPT-3 基本上是简单的扩展(根据论文),但自 GPT-3 以来有大量公开已知、可公开推断的增益:
- We can infer gains from API costs:13
- 我们可以从 API 成本推断增益:13
- GPT-4, on release, cost ~the same as GPT-3 when it was released, despite the absolutely enormous performance increase.14 (If we do a naive and oversimplified back-of-the-envelope estimate based on scaling laws, this suggests that perhaps roughly half the effective compute increase from GPT-3 to GPT-4 came from algorithmic improvements.15)
- GPT-4 发布时的成本与 GPT-3 发布时大致相同,尽管性能提升绝对是巨大的。14 (如果我们基于缩放定律(scaling laws)做一个天真而过度简化的粗略估算,这表明从 GPT-3 到 GPT-4 的有效算力增长中,大约有一半来自算法改进。15)
- Since the GPT-4 release a year ago, OpenAI prices for GPT-4-level models have fallen another 6x/4x (input/output) with the release of GPT-4o.
- 自一年前 GPT-4 发布以来,随着 GPT-4o 的发布,OpenAI 对 GPT-4 级别模型的定价又下降了 6 倍/4 倍(输入/输出)。
- Gemini 1.5 Flash, recently released, offers between “GPT-3.75-level” and GPT-4-level performance,16 while costing 85x/57x (input/output) less than the original GPT-4 (extraordinary gains!).
- 最近发布的 Gemini 1.5 Flash 提供了介于"GPT-3.75 级"和 GPT-4 级之间的表现,16 而成本比原始 GPT-4 便宜 85x/57x(输入/输出)(非凡的增益!)。
- Chinchilla scaling laws give a 3x+ (0.5 OOMs+) efficiency gain.17
- Chinchilla 缩放定律给出了 3 倍以上(0.5 个以上 OOM)的效率增益。17
- Gemini 1.5 Pro claimed major compute efficiency gains (outperforming Gemini 1.0 Ultra, while using “significantly less” compute), with Mixture of Experts (MoE) as a highlighted architecture change. Other papers also claim a substantial multiple on compute from MoE.
- Gemini 1.5 Pro 声称有重大的算力效率增益(在使用的算力"显著减少"的情况下超越 Gemini 1.0 Ultra),其中混合专家(Mixture of Experts,MoE)被突出强调为架构变化。其他论文也声称 MoE 带来可观的算力倍数。
- There have been many tweaks and gains on architecture, data, training stack, etc., all the time.18
- 在架构、数据、训练栈、等等.方面,一直都有许多微调和增益。18
综合起来,公开信息表明,GPT-2 到 GPT-4 的跃升包含 1-2 个 OOM 的算法效率增益。19
在 GPT-4 之后的 4 年里,我们应当预期这一趋势继续:20 平均每年 0.5 OOM 的算力效率,也就是到 2027 年相比 GPT-4 约 2 个 OOM 的增益。虽然随着我们摘取低垂的果实,算力效率会越来越难找,但 AI 实验室在寻找新算法改进上投入的资金和人才正在快速增长。21 (至少,可公开推断的推理成本效率似乎丝毫没有放缓。)在高端的估计中,我们甚至可能看到更根本的、类似 Transformer 的突破,22 带来更大的增益。
综合来看,这表明到 2027 年底,我们应当预期约 1-3 个 OOM 的算法效率增益(与 GPT-4 相比),最佳猜测大约是 ~2 个 OOM。
数据墙(The data wall)
所有这些存在一个潜在的重要变数来源:我们正在耗尽互联网数据。这可能意味着,很快,在更多抓取的数据上预训练更大语言模型这种朴素方法,可能开始撞上严重的瓶颈。
前沿模型已经在互联网的大部分数据上训练过。例如,Llama 3 是在超过 15T token 上训练的。Common Crawl——一份用于 LLM 训练的、覆盖互联网大部分内容的转储——原始规模超过 100T token,不过其中大部分是垃圾内容和重复内容(例如,一次相对简单的去重就能得到 30T token,这意味着 Llama 3 基本上已经在使用所有这些数据了)。此外,在代码等更专门的领域,token 还要少得多,例如公开的 GitHub 仓库估计只有几万亿 token。
通过重复数据,你可以再往前走一些,但这方面的学术工作表明,重复只能让你走这么远——研究发现,在 16 个 epoch(即重复 16 遍)之后,收益会以极快的速度递减到零。到了某个节点,即便有更多(有效)算力,由于数据约束,让你的模型变得更好也会困难得多。这一点不容低估:我们一直乘着缩放曲线的东风,乘着语言建模预训练范式的浪潮;如果这里没有新的东西,这一范式将(至少从朴素意义上)走到尽头。尽管有大规模投资,我们也会陷入平台期。有传言说,所有实验室都在豪赌新的算法改进或绕过这一瓶颈的方法。据称,研究者们正在尝试许多策略,从合成数据到自我对弈(self-play)和强化学习(RL)方法。业内知情人士似乎非常乐观:Anthropic 的 CEO Dario Amodei 最近在一个播客中说:"如果你非常天真地看这件事,我们离耗尽数据并不远[…] 我的猜测是,这不会成为障碍[…] 只是有很多不同的方法可以做到。"当然,这方面的任何研究结果都是专有的,如今不会公开。
除了业内人士的乐观态度,我认为还有一个强有力的直观理由说明为什么应该能够找到以高得多的样本效率(sample efficiency)训练模型的方法(即让模型从有限数据中学到更多的算法改进)。想想你或我会如何学习一本非常密集的数学教科书:
- What a modern LLM does during training is, essentially, very very quickly skim the textbook, the words just flying by, not spending much brain power on it.
- 现代 LLM 在训练中所做的,本质上就是非常非常快速地翻阅教科书,文字只是一掠而过,并不花费多少脑力。
- Rather, when you or I read that math textbook, we read a couple pages slowly; then have an internal monologue about the material in our heads and talk about it with a few study-buddies; read another page or two; then try some practice problems, fail, try them again in a different way, get some feedback on those problems, try again until we get a problem right; and so on, until eventually the material “clicks.”
- 而当你或我读那本数学教科书时,我们会慢慢地读几页;然后在脑海里对材料进行内心独白,和几个学伴讨论;再读一两页;然后尝试一些练习题,失败了,换一种方式再试,得到一些关于这些题的反馈,再试,直到做对一道题;如此往复,直到最终材料"豁然开朗"。
- You or I also wouldn’t learn much at all from a pass through a dense math textbook if all we could do was breeze through it like LLMs.23
- 如果像 LLM 那样只能走马观花,你我也不会从通读一遍密集的数学教科书中学到多少东西。23
- But perhaps, then, there are ways to incorporate aspects of how humans would digest a dense math textbook to let the models learn much more from limited data. In a simplified sense, this sort of thing—having an internal monologue about material, having a discussion with a study-buddy, trying and failing at problems until it clicks—is what many synthetic data/self-play/RL approaches are trying to do.24
- 但也许,存在一些方法,可以把人类消化一本密集数学教科书的方式融入其中,让模型从有限数据中学到多得多的东西。简而言之,这类事情——对材料进行内心独白、与学伴讨论、在题目上反复试错直到豁然开朗——正是许多合成数据/自我对弈/RL 方法试图做的。24
过去训练模型的最先进方法简单而朴素,但它行之有效,所以没人真的下大力气去攻克这些样本效率的方法。既然它现在可能更多地成为一种约束,我们应当预期所有实验室都会投入数十亿美元和最聪明的头脑去攻克它。深度学习中的一个常见模式是:要弄对细节需要付出大量努力(以及许多失败的项目),但最终某个显而易见而简单的东西的某种版本就是能行。鉴于深度学习在过去十年里闯过了每一堵所谓的高墙,我的基准情形(base case)是这里也会类似。
此外,攻克合成数据这样的算法赌注之一,似乎确实有可能极大地改进模型。这里有一个直觉泵(intuition pump)。目前像 Llama 3 这样的前沿模型是在互联网上训练的——而互联网大部分是垃圾内容,比如电子商务、SEO 之类。许多 LLM 把绝大部分训练算力花在这些垃圾内容上,而不是花在真正高质量的数据上(例如人们攻克困难科学问题的推理链条)。想象一下,如果能把 GPT-4 级别的算力全部花在极其高质量的数据上——它可能会是一个强大得多、多得多的模型。
回顾一下 AlphaGo——第一个在围棋上击败世界冠军的 AI 系统,这比人们认为可能的时代早了几十年——在这里也很有用。25
- In step 1, AlphaGo was trained by imitation learning on expert human Go games. This gave it a foundation.
- 在第一步,AlphaGo 通过在人类专家围棋棋谱上的模仿学习(imitation learning)进行训练。这给了它一个基础。
- In step 2, AlphaGo played millions of games against itself. This let it become superhuman at Go: remember the famous move 37 in the game against Lee Sedol, an extremely unusual but brilliant move a human would never have played.
- 在第二步,AlphaGo 与自己对弈了数百万局。这使它达到了围棋的超越人类水平:还记得对阵李世石(Lee Sedol)时著名的第 37 手吗?那是一手极不寻常但绝妙、人类绝不会下出的棋。
为 LLM 开发相当于第二步的东西,是克服数据墙的关键研究课题(而且,它最终将是超越人类水平智能的关键)。
这一切都是在说,数据约束似乎给未来几年 AI 进展的预测注入了很大的误差范围,无论哪个方向。事情确实有很大可能陷入停滞(LLM 也许仍然会像互联网一样重要,但我们不会到达真正疯狂的 AGI)。但我认为,合理猜测是实验室会攻克它,而且一旦攻克,不仅会让缩放曲线继续下去,还可能带来模型能力的巨大增益。
顺便说一句,这也意味着与今天相比,未来几年不同实验室之间的差异会更大。直到不久前,最先进的技术都会发表,所以每个人基本都在做同样的事。(新的后起之秀或开源项目也能轻易与前沿竞争,因为配方是公开的。)现在,关键的算法思想正变得越来越专有。我预期各实验室的方法会分化得多,有些会比其他的进步更快——即便是现在看起来站在前沿的实验室,也可能卡在数据墙上,而其他实验室取得突破、一骑绝尘。开源想要竞争会困难得多。这肯定会让事情变得有趣。(而且,一旦某个实验室想通了,他们的突破将成为 AGI 的关键、超级智能的关键——美国最珍视的秘密之一。)
解除束缚(Unhobbling)
最后,最难量化——但同样重要——的一类改进:我称之为"解除束缚"(unhobbling)。
想象一下,如果被要求解决一道困难的数学题时,你必须立即用脑子里冒出的第一个念头作答。显然,除非是最简单的题,否则你会很吃力。但直到不久前,我们就是这样让 LLM 解数学题的。而事实上,我们大多数人在草稿纸上一步一步地推演,从而能解决困难得多的题目。"思维链"(chain-of-thought)提示为 LLM 解锁了这一点。尽管原始能力出色,但它们在数学上的表现远低于本可达到的水平,因为它们被以一种明显的方式束缚着,而只需一个小小的算法调整就能解锁大得多的能力。
过去几年,我们在"解除束缚"模型方面取得了巨大进展。这些是超越"训练更好的基础模型"的算法改进——而且往往只用预训练算力的一小部分——却能释放模型的能力:
- Reinforcement learning from human feedback (RLHF). Base models have incredible* latent capabilities,26 *but they’re raw and incredibly hard to work with. While the popular conception of RLHF is that it merely censors swear words, RLHF has been key to making models actually useful and commercially valuable (rather than making models predict random internet text, get them to actually apply their capabilities to try to answer your question!). This was the magic of ChatGPT—well-done RLHF made models usable and useful to real people for the first time. The original InstructGPT paper has a great quantification of this: an RLHF’d small model was equivalent to a non-RLHF’d >100x larger model in terms of human rater preference.
- 来自人类反馈的强化学习(RLHF)。基础模型拥有令人难以置信的潜在能力,26 但它们原始且极难使用。虽然大众对 RLHF 的认知是它不过是在审查脏话,但 RLHF 一直是让模型真正有用、具有商业价值的关键(不是让模型预测随机的互联网文本,而是让它们真正运用自身能力去尝试回答你的问题!)。这就是 ChatGPT 的魔力——做得好的 RLHF 第一次让模型对真实的人可堪使用、确有助益。原始的 InstructGPT 论文对这一点的量化很精彩:经过 RLHF 的小模型,在人类评分者的偏好上等同于未经过 RLHF 的大 100 倍以上的模型。
- Chain of Thought (CoT). As discussed. CoT started being widely used just 2 years ago and can provide the equivalent of a >10x effective compute increase on math/reasoning problems.
- 思维链(Chain of Thought,CoT)。前面已讨论过。CoT 在仅仅 2 年前才开始被广泛使用,在数学/推理问题上可以提供相当于 >10 倍有效算力增加的效果。
- Scaffolding. Think of CoT++: rather than just asking a model to solve a problem, have one model make a plan of attack, have another propose a bunch of possible solutions, have another critique it, and so on. For example, on HumanEval (coding problems), simple scaffolding enables GPT-3.5 to outperform un-scaffolded GPT-4. On SWE-Bench (a benchmark of solving real-world software engineering tasks), GPT-4 can only solve ~2% correctly, while with Devin’s agent scaffolding it jumps to 14-23%. (Unlocking agency is only in its infancy though, as I’ll discuss more later.)
- 脚手架(Scaffolding)。可以把它想成 CoT++:不是只让一个模型解题,而是让一个模型制定进攻计划,让另一个提出一堆可能的方案,再让一个来批判它,以此类推。例如,在 HumanEval(编程题)上,简单的脚手架就能让 GPT-3.5 胜过没有脚手架的 GPT-4。在 SWE-Bench(解决真实世界软件工程任务的基准)上,GPT-4 只能正确解决约 2%,而借助 Devin 的智能体脚手架则跃升到 14-23%。(不过,解锁智能体能力(agency)还处于萌芽阶段,我稍后会多讲一些。)
- *Tools: *Imagine if humans weren’t allowed to use calculators or computers. We’re only at the beginning here, but ChatGPT can now use a web browser, run some code, and so on.
- 工具(Tools):想象一下,如果人类不被允许使用计算器或计算机。我们在这里才刚刚起步,但 ChatGPT 现在可以浏览网页、运行代码等等。
- Context length. Models have gone from 2k token context (GPT-3) to 32k context (GPT-4 release) to 1M+ context (Gemini 1.5 Pro). This is a huge deal. A much smaller base model with, say, 100k tokens of relevant context can outperform a model that is much larger but only has, say, 4k relevant tokens of context—more context is effectively a large compute efficiency gain.27 More generally, context is key to unlocking many applications of these models: for example, many coding applications require understanding large parts of a codebase in order to usefully contribute new code; or, if you’re using a model to help you write a document at work, it really needs the context from lots of related internal docs and conversations. Gemini 1.5 Pro, with its 1M+ token context, was even able to learn a new language (a low-resource language not on the internet) from scratch, just by putting a dictionary and grammar reference materials in context!
- 上下文长度(Context length)。模型的上下文从 2k token(GPT-3)到 32k(GPT-4 发布时)再到 1M+(Gemini 1.5 Pro)。这是重大的事情。一个小得多的基础模型,只要有比如 100k token 的相关上下文,就能胜过大得多但只有 4k 相关上下文 token 的模型——更多上下文实际上就是一种巨大的算力效率增益。27 更一般地说,上下文是解锁这些模型许多应用的关键:例如,许多编程应用需要理解代码库的很大一部分,才能有效贡献新代码;或者,如果你在工作中用模型帮你写文档,它确实需要大量相关内部文档和对话的上下文。Gemini 1.5 Pro 凭借其 1M+ token 的上下文,甚至能够从零学会一门新语言(一种互联网上不存在的低资源语言),方法仅仅是往上下文里放进一本词典和语法参考材料!
- *Posttraining improvements. *The current GPT-4 has substantially improved compared to the original GPT-4 when released, according to John Schulman due to posttraining improvements that unlocked latent model capability: on reasoning evals it’s made substantial gains (e.g., ~50% -> 72% on MATH, ~40% to ~50% on GPQA) and on the LMSys leaderboard, it’s made nearly 100-point elo jump (comparable to the difference in elo between Claude 3 Haiku and the much larger Claude 3 Opus, models that have a ~50x price difference).
- 训练后改进(Posttraining improvements)。据 John Schulman 说,当前的 GPT-4 相比发布时的原始 GPT-4 已经有了实质性改进,这得益于解锁潜在模型能力的训练后改进:在推理评估上取得了实质性的增益(例如,MATH 上约 50% 升至 72%,GPQA 上约 40% 升至约 50%),在 LMSys 排行榜上实现了近 100 分的 elo 跃升(可与 Claude 3 Haiku 和体量大得多的 Claude 3 Opus 之间的 elo 差距相比——这两个模型的价格差约为 50 倍)。
Epoch AI 的一项调查考察了其中一些技术,如脚手架、工具使用等等,发现这类技术通常能在许多基准上带来 5-30 倍的有效算力增益。METR(一个评估模型的组织)同样发现,从同一个 GPT-4 基础模型出发进行解除束缚,在它的一组智能体任务上带来了非常大的性能提升:从仅用基础模型时的 5%,到用发布时训练后(posttrained)的 GPT-4 时的 20%,再到今天凭借更好的训练后处理、工具和智能体脚手架达到近 40%。
随着更完善的解除束缚,METR 智能体任务上的表现随时间的变化。来源:Model Evaluation and Threat Research(METR)(即 METR——一个评估模型的组织)
虽然很难把这些与算力和算法效率放在统一的有效算力尺度上衡量,但很明显这些是巨大的增益,至少与算力扩展和算法效率大致相当的量级。(这还凸显了算法进步的核心作用:每年 0.5 个 OOM 的算力效率虽然已经很可观,但只是故事的一部分;与解除束缚这一算法进步合在一起,在当前趋势的增益中甚至可能占多数。)
"解除束缚"正是让这些模型变得有用的关键——而且我认为,今天许多商业应用之所以受限,很大程度上就是需要进一步的这种"解除束缚"。确实,今天的模型仍然被束缚得不可思议!例如:
- They don’t have long-term memory.
- 它们没有长期记忆。
- They can’t use a computer (they still only have very limited tools).
- 它们不会使用计算机(它们仍然只有非常有限的工具)。
- They still mostly don’t think before they speak. When you ask ChatGPT to write an essay, that’s like expecting a human to write an essay via their initial stream-of-consciousness.28
- 它们大多仍然不假思索就说。当你让 ChatGPT 写一篇文章时,那就像期望一个人凭借最初的意识流来写文章。28
- They can (mostly) only engage in short back-and-forth dialogues, rather than going away for a day or a week, thinking about a problem, researching different approaches, consulting other humans, and then writing you a longer report or pull request.
- 它们(大多)只能进行简短的你来我往式对话,而不是离开一整天或一整周,思考一个问题、研究不同的方法、咨询其他人,然后给你写一份更长的报告或拉取请求(pull request)。
- They’re mostly not personalized to you or your application (just a generic chatbot with a short prompt, rather than having all the relevant background on your company and your work).
- 它们大多没有针对你或你的应用进行个性化(只是一个带短提示词的通用聊天机器人,而不是掌握关于你公司和工作的所有相关背景)。
这里的可能性巨大,而我们正迅速摘取这里的低垂果实。这一点至关重要:仅仅想象"GPT-6 ChatGPT"是完全错误的。 随着解除束缚的持续推进,改进相比"GPT-6 + RLHF"将是一种阶跃变化。到 2027 年,你将拥有的不再是一个聊天机器人,而是一种更像智能体、更像同事的东西。
从聊天机器人到智能体-同事(From chatbot to agent-coworker)
未来几年雄心勃勃的解除束缚会是什么样?在我看来,有三个关键要素:
1. 解决"入职(onboarding)问题"
GPT-4 具备完成许多人工作中相当一部分的原始智慧,但它有点像刚报到 5 分钟的聪明新员工:它没有任何相关背景,没读过公司文档或 Slack 历史,没和团队成员聊过天,也没有花任何时间理解公司内部的代码库。一个聪明的新员工在到达 5 分钟后并不那么有用——但入职一个月后就相当有用了!看起来应该可以做到,例如通过超长上下文(very-long-context),像对待新的人类同事那样"入职"模型。仅这一点就会是巨大的解锁。
2. 测试时算力余量(面向更长周期问题的推理/纠错/系统二)
目前,模型基本上只能做短任务:你问它们一个问题,它们给你一个答案。但这极其受限。人类做的多数有用的认知工作都是更长周期的——不只是花 5 分钟,而是几小时、几天、几周或几个月。
一个只能思考一个难题 5 分钟的科学家不可能取得任何科学突破。一个被要求时只能为一个函数写骨架代码的软件工程师不会有太大用处——软件工程师会接到一个更大的任务,然后他们去制定计划、理解代码库或技术工具的相关部分、编写不同的模块并增量测试、调试错误、在可能的解决方案空间中搜索,最终提交一个凝结了数周工作的大拉取请求。如此等等。
本质上,存在巨大的测试时算力余量(test-time compute overhang)。把每个 GPT-4 token 想成你在思考一个问题时的内心独白的一个词。每个 GPT-4 token 都很聪明,但它目前只能有效地连贯使用大约几百个 token 进行思维链(实质上就像你只能在某个问题或项目上花几分钟内心独白/思考)。
如果它能用数百万 token 来思考和处理真正困难的问题或更大的项目呢?
| Token 数量 | 相当于我投入某项工作的时间… | |
|---|---|---|
| 数百 | 几分钟 | ChatGPT(我们在此处) |
| 数千 | 半小时 | +1 OOM 测试时算力 |
| 数万 | 半个工作日 | +2 OOM |
| 数十万 | 一个工作周 | +3 OOM |
| 数百万 | 数月 | +4 OOM |
假设人类以约 100 token/分钟的速度思考,每周工作 40 小时,把模型"思考多久"(以 token 计)换算成人在某个问题/项目上投入的时间。
即便"每 token"的智能相同,这也是一个聪明人在一个问题上花几分钟与花几个月之间的差别。我不知道你怎么想,但几个月里我能做到的事比几分钟多得多、多得多、多得多。如果我们能为模型解锁"能够以数月当量、而不是数分钟当量来思考和工作",那将解锁一种疯狂的能力跃升。这里存在巨大的余量,值好几个 OOM。
目前,模型还做不到这一点。即便最近长上下文取得了进展,这种更长的上下文大多只对 token 的消费(输入)有效,对 token 的生产(输出)无效——过一段时间,模型就会脱轨或卡住。它还无法离开一段时间,独自去处理一个问题或项目。29
但解锁测试时算力可能只是相对较小的"解除束缚"式算法胜利的问题。也许少量的 RL 就能帮助模型学会纠错("嗯,那看起来不对,让我再检查一下")、制定计划、搜索可能的解决方案等等。从某种意义上说,模型已经具备大部分原始能力,它只是需要在上面再学几个额外的技能,把所有东西整合起来。
本质上,我们只需要教会模型一种系统二(System II)式的外层循环,30 让它能推理贯穿困难、长周期的项目。
如果我们成功教会了这种外层循环,那么想象一下:不再是聊天机器人那种几段话的简短回答,而是数百万词的流(以比你阅读速度更快的速度涌来),模型在其中思考问题、使用工具、尝试不同方法、做研究、修改自己的成果、与他人协作,并独自完成大型项目。
** 其他机器学习领域中的测试时与训练时算力权衡
在其他领域,比如棋类游戏的 AI 系统,已经得到证明,你可以用更多的测试时算力(也称推理时算力)来替代训练算力。
Jones(2021):在 Hex 棋上,如果给较小的模型更多的测试时算力("更多思考时间"),它可以做得和体量大得多的模型一样好。在这个领域,他们发现,测试时多花约 ~1.2 个 OOM 的算力,就能获得与训练算力多约 ~1 个 OOM 的模型相当的表现。
如果类似的关系在我们的情况中成立,那么如果我们能解锁 +4 个 OOM 的测试时算力,那可能相当于 +3 个 OOM 的预训练算力,也就是说,大致相当于 GPT-3 到 GPT-4 之间的跃升。(也就是说,解决这个"解除束缚"问题将相当于一次巨大的 OOM 扩展。)
3. 使用计算机
这也许是三要素中最直截了当的。目前的 ChatGPT 基本上就像一个坐在隔离箱子里、你可以给它发短信的人。早期的解除束缚改进教模型使用一个个孤立的工具,而我预期,凭借多模态模型,我们很快就能一蹴而就:我们只需让模型像人类一样使用计算机。
这意味着加入你的 Zoom 会议、在网上做研究、给人发消息和邮件、阅读共享文档、使用你的应用和开发工具等等。(当然,为了让模型在更长周期的循环中充分利用这一点,这将与解锁测试时算力相辅相成。)
走到这一步的尽头,我预期我们会得到一种很像即插即用的远程工人(drop-in remote worker)的东西。一个加入你公司、像新的人类雇员一样入职、在 Slack 上给你和同事发消息、使用你的软件、提交拉取请求的智能体;而且,给它大项目时,它能做到模型版的"人类离开数周独立完成项目"。要解锁这一点,你可能需要比 GPT-4 更好的基础模型,但也许甚至不需要好那么多——很多潜力都在于修复模型仍被束缚的那些明显而基本的方式。
一个非常早期的预览就是 Devin,它是在通往创造全自动软件工程师的路上、解锁模型"智能体余量(agency-overhang)"/"测试时算力余量"的早期原型。我不知道 Devin 在实际中表现如何,而且这个演示比起正规的聊天机器人 → 智能体解除束缚所能带来的还非常有限,但它是一个有用的预告,预示着即将到来的东西。
顺便一提,我预期解除束缚的核心地位会在商业应用方面带来一种颇为有趣的"音爆"(sonic boom)效应。从现在到即插即用远程工人之间的中间模型,将需要大量的辛苦工作(schlep)来改变工作流程、搭建基础设施,才能整合并从中获得经济价值。而即插即用的远程工人将容易整合得多——只需,嗯,把他们插进去,就能自动化所有可以远程完成的工作。看起来很有可能,这些辛苦工作会比解除束缚耗时更长——也就是说,等到即插即用远程工人能够自动化大量工作时,中间模型还没被充分利用和整合——因此产生的经济价值跃升可能是某种程度上的不连续。
未来四年
对 GPT-4 之前四年进展驱动因素的估算总结,以及 GPT-4 之后四年应当预期什么。
把这些数字放在一起,我们应当(大致)预期,在 GPT-4 之后的 4 年里,也就是到 2027 年底,再来一次 GPT-2 到 GPT-4 规模的跃升。
- GPT-2 to GPT-4 was roughly a 4.5–6 OOM base effective compute scaleup (physical compute and algorithmic efficiencies), plus major “unhobbling” gains (from base model to chatbot).
- 从 GPT-2 到 GPT-4,基础有效算力扩展大约为 4.5–6 个 OOM(物理算力和算法效率),外加重大的"解除束缚"增益(从基础模型到聊天机器人)。
- In the subsequent 4 years, we should expect 3–6 OOMs of base effective compute scaleup (physical compute and algorithmic efficiencies)—with perhaps a best guess of ~5 OOMs—plus step-changes in utility and applications unlocked by “unhobbling” (from chatbot to agent/drop-in remote worker).
- 在随后的 4 年里,我们应当预期 3–6 个 OOM 的基础有效算力扩展(物理算力和算法效率)——最佳猜测也许约 ~5 个 OOM——外加由"解除束缚"解锁的实用性与应用上的阶跃变化(从聊天机器人到智能体/即插即用远程工人)。
为了让你有个直观感受,假设 GPT-4 训练花了 3 个月。到 2027 年,一家领先的 AI 实验室将能在 1 分钟内训练出一个 GPT-4 级别的模型。31 有效算力的 OOM 扩展将是戏剧性的。
那会把我们带到哪里?
历数 OOM 的总结。
从 GPT-2 到 GPT-4,我们从约"学龄前儿童"水平走到约"聪明高中生"水平;从勉强能输出几句连贯的话,到能在高中考试拿高分、成为有用的编程助手。那是一次疯狂的跃升。如果这一次我们将再次跨越同样的智能差距,那会带我们去往何方?32 如果它把我们带得非常、非常远,我们也不应感到惊讶。很可能,它将把我们带到能够胜过博士和一个领域最优秀专家的模型。
(一个简洁的思考方式是:当前 AI 进步的节奏大约是儿童发展速度的 3 倍。你那 3 倍速的孩子刚刚高中毕业;用不了多久它就会接手你的工作!)
再说一遍,关键是不要只想象一个极其聪明的 ChatGPT:解除束缚的增益应当意味着,这看起来更像一个即插即用的远程工人——一个极其聪明的智能体,能推理、规划、纠错,了解关于你和你公司的一切,并能独立处理一个问题数周。
我们正朝着 2027 年实现 AGI 的轨道前进。这些 AI 系统将基本上能够自动化几乎所有认知性工作(想想:所有可以远程完成的工作)。
要说明白——误差范围很大。如果我们耗尽数据,如果闯过数据墙所需的算法突破比预期的更难,进展可能停滞。也许解除束缚没那么远,我们只能得到专家级聊天机器人,而不是专家级同事。也许持续十年的趋势线会断裂,或者这次深度学习的规模化真的撞上高墙。(又或者,一次算法突破——哪怕是释放测试时算力余量的简单解除束缚——可能成为范式转移,进一步加速一切,让 AGI 更早到来。)
无论如何,我们正飞速穿越 OOM;要认真对待 2027 年前实现 AGI——真正的 AGI——的可能性,并不需要什么玄妙的信念,只需要对直线趋势的外推。
如今似乎很多人都在玩"向下定义 AGI"的把戏,把它说成"一个非常好的聊天机器人"之类。我所说的 AGI,是指一个能完全自动化我或我朋友的工作、能完全胜任 AI 研究员或工程师工作的 AI 系统。也许某些领域,比如机器人技术,默认情况下可能需要更长时间才能解决。而社会的落地推广,例如在医疗或法律行业,很容易被社会选择或监管拖慢。但一旦模型能自动化 AI 研究本身,那就足够了——足以启动激烈的反馈循环——而且我们能非常快地取得进一步进展,自动化的 AI 工程师们自己解决全自动化道路上剩余的所有瓶颈。特别是,数以百万计的自动化研究员非常有可能把十年甚至更久的算法进步压缩到一年以内。AGI 将仅仅是对紧随其后的超级智能的一小口尝鲜。(更多内容见下一篇文章。)
无论如何,不要指望这种令人目眩的进步速度会放缓。趋势线看起来人畜无害,但它们的含义是强烈的。就像它们之前的每一代模型一样,每一代新模型都会让大多数旁观者目瞪口呆;当模型很快解决需要博士花数天的极难科学问题、当它们在你的电脑上飞速完成你的工作、当它们从零写出数百万行代码的代码库、当这些模型产生的经济价值每一两年就增长 10 倍时,人们将难以置信。忘掉科幻,历数 OOM:这才是我们应当预期的。AGI 不再是遥远的幻想。扩展简单的深度学习技术就是行之有效,模型们只是想要学习,而我们即将在 2027 年底前再来一次 100,000x 以上。用不了多久,它们就会比我们更聪明。
GPT-4 只是开始——四年后我们会站在哪里?不要犯下低估深度学习进步速度的错误(正如 GAN 的进展所示)。
系列下一篇:二、从 AGI 到超级智能:智能爆炸
附记。穿越 OOM 的竞速:成败在此十年
我曾经对 AGI 的短时间线更为怀疑。一个原因是,把这么大的 AGI 概率质量集中在这十年、偏爱这个十年似乎不合理(觉得"哦,我们这么特别"像是典型的谬误)。我当时认为,我们应当对实现 AGI 需要什么保持不确定,这应该会让我们可能获得 AGI 的时间形成一种"摊得更开"的概率分布。
然而,我改变了看法:关键的是,我们对实现 AGI 需要什么的确定性应当以OOM(有效算力)为单位,而不是以年为单位。
这十年,我们正飞速穿越 OOM。即便在摩尔定律往日的鼎盛时期,它也只有 1–1.5 OOM/十年。我估计,我们将在 4 年内做到约 5 个 OOM,而整个十年超过约 10 个 OOM。
这十年我们一直在飞速穿越 OOM;2030 年代初之后,我们将面对缓慢的跋涉。
本质上,我们正处在一场巨大的扩展之中,在这十年里收获一次性的增益;此后穿越 OOM 的进展将慢上许多倍。如果这次扩展没能在未来 5-10 年内把我们带到 AGI,那可能就遥遥无期了。
- Spending scaleup: Spending a million dollars on a model used to be outrageous; by the end of the decade, we will likely have $100B or $1T clusters. Going much higher than that will be hard; that’s already basically the feasible limit (both in terms of what big business can afford, and even just as a fraction of GDP). Thereafter all we have is glacial 2%/year trend real GDP growth to increase this.
- 支出扩展(Spending scaleup):过去,在一个模型上花一百万美元曾是荒唐的事;到本十年末,我们很可能会有 1000 亿美元或 1 万亿美元的集群($100B or $1T)。再往上走会很难;那基本上已经接近可行上限(无论从大企业能负担多少,还是仅作为 GDP 的一部分来看)。此后,我们能依靠的只有每年 2% 的冰川般的实际 GDP 趋势增长来提高这一数字。
- Hardware gains: AI hardware has been improving much more quickly than Moore’s law. That’s because we’ve been specializing chips for AI workloads. For example, we’ve gone from CPUs to GPUs; adapted chips for Transformers; and we’ve gone down to much lower precision number formats, from fp64/fp32 for traditional supercomputing to fp8 on H100s. These are large gains, but by the end of the decade we’ll likely have totally-specialized AI-specific chips, without much further beyond-Moore’s law gains possible.
- 硬件增益(Hardware gains):AI 硬件的改进速度比摩尔定律快得多。那是因为我们一直在为 AI 工作负载专门化芯片。例如,我们从 CPU 走向 GPU;为 Transformer 定制芯片;还转向低得多的数值精度格式,从传统超级计算的 fp64/fp32 到 H100 上的 fp8。这些是巨大的增益,但到本十年末,我们很可能拥有完全专门化的 AI 专用芯片,之后很难再有超越摩尔定律的增益了。
- Algorithmic progress: In the coming decade, AI labs will invest tens of billions in algorithmic R&D, and all the smartest people in the world will be working on this; from tiny efficiencies to new paradigms, we’ll be picking lots of the low-hanging fruit. We probably won’t reach any sort of hard limit (though “unhobblings” are likely finite), but at the very least the pace of improvements should slow down, as the rapid growth (in $ and human capital investments) necessarily slows down (e.g., most of the smart STEM talent will already be working on AI). (That said, this is the most uncertain to predict, and the source of most of the uncertainty on the OOMs in the 2030s on the plot above.)
- 算法进步(Algorithmic progress):在未来十年,AI 实验室将在算法研发上投入数百亿美元,全世界最聪明的人都将致力于此;从微小的效率提升到新的范式,我们将摘取大量低垂的果实。我们可能不会触及任何硬性上限(尽管"解除束缚"很可能是有限的),但至少改进的节奏应该会放缓,因为快速的增长(资金和人力资本投资)必然放缓(例如,大部分聪明的 STEM 人才届时已经投身 AI)。(话虽如此,这是最难以预测的,也是上图中 2030 年代 OOM 不确定性的大部分来源。)
综合起来,这意味着我们在未来十年穿越的 OOM 数量,将远超之后几十年可能穿越的。也许这就够了——我们很快就能获得 AGI——又或者我们可能要迎来一场漫长而缓慢的跋涉。关于实现 AGI 的中位数(median)时间,你和我可以合理地各执一词,这取决于我们认为实现 AGI 有多难——但鉴于我们此刻穿越 OOM 的速度,你的众数(modal)AGI 年份肯定应该落在本十年稍后的某个时候。
Matthew Barnett 有一个相关的好可视化,只考虑了算力和生物学的边界。
过去十年里他们每年都会做出的预测,而这些预测他们年年都错……↩
来自 SSC:Janelle Shane 问 GPT-2 它最喜欢的十种动物:提示词:我最喜欢的 10 种动物是:1. 我最喜欢的十种动物是:背上带白色伤疤的斑马 背阴处的蜘蛛和章鱼 长着大叶子的青蛙,希望是黑色的 带鳞片的鸡尾鹦鹉 翅膀垂在脸前约 4 英寸处、身上纹着青蛙心形纹身的刀嘴海雀 可以失明、切割并生吃的蛇怪互锁四足兽:生活在阳光下的黑白沙漠鳄鱼 斑马和许多其他豌豆虫↩
这里我指的是笨拙的旧版 GPT-3,不是你可能从 ChatGPT 认识的、大幅改进的 GPT-3.5。↩
不,这些考试并不在训练集中。AI 实验室为确保这些评估不受污染付出了切实努力,因为他们需要好的测量来做好的科学。ScaleAI 最近对此的分析证实,领先的实验室并没有对基准过拟合(尽管一些较小的 LLM 开发者可能在做高自己的数字)。↩
原始论文中指出:"我们还评估了人类在 MATH 上的表现,发现一位并不特别喜欢数学的计算机科学博士生在 MATH 上获得了约 40%,而一位三次获得 IMO 金牌的选手获得了 90%,这表明 MATH 对人类来说同样可能具有挑战性。"↩
一位合著者指出:"当我们团队首次发布 MATH 数据集时,至少有一位[机器学习研究同事]告诉我们,这是一个毫无意义的数据集,因为它远远超出了机器学习模型能够完成的范围(事实上,我自己当时也有点担心这一点)。"↩
这里是 Yann LeCun 在 2022 年预测,即便是 GPT-5000 也无法推理与真实世界的物理交互;而一年后 GPT-4 显然轻松做到了。这里是 Gary Marcus 在 GPT-2 之后预测的高墙被 GPT-3 攻克,以及他在 GPT-3 之后预测的高墙被 GPT-4 攻克。这里是 Bryan Caplan 教授输掉他人生第一次公开对赌(此前他以完美的公开打赌记录而闻名)。2023 年 1 月,在 GPT-3.5 于他的经济学期中考试中只得 D 之后,Caplan 教授打赌 Matthew Barnett:到 2029 年前,不会有 AI 在他的经济学期中考试中拿到 A。仅仅两个月后,GPT-4 发布,它立即在他的期中考试中拿了 A(而且会是全班最高分之一)。↩
在 diamond 子集上,采用多数投票,模型用思维链尝试 32 次。↩
而且值得注意这些趋势线是多么一致。把原始的缩放定律论文与此后关于算力和算力效率扩展的一些估算结合起来,意味着一个持续超过 15 个数量级(有效算力超过 1,000,000,000,000,000 倍)的一致缩放趋势!↩
一个常见的误解是缩放只对困惑度(perplexity)损失成立,但我们在基准测试的下游表现上也看到了非常清晰、一致的缩放行为。通常这只是找到正确的对数-对数图的问题。例如,在 GPT-4 的博客文章中,他们使用 MLPR(平均对数通过率)展示了编程问题表现在 6 个 OOM(1,000,000 倍)算力上的一致缩放行为。"涌现能力是海市蜃楼吗?"(Are Emergent Abilities a Mirage?)论文提出了类似的观点:只要选择的指标正确,下游任务的表现几乎总有一致的趋势。
更一般地说,"缩放假说"(scaling hypothesis)的定性观察——模型能力随规模呈现非常清晰的趋势——早于损失缩放曲线;"缩放定律"的工作只是对这一点的正式度量。↩
- Gemini 1.5 Flash 在 MATH 上得分 54.9%,成本为每百万 token $0.35/$1.05(输入/输出)。GPT-4 在 MATH 上发布前得分 42.5%,2023 年初在 MATH 上得分 52.9%,成本为每百万 token $30/$60(输入/输出);这比 Gemini 1.5 Flash 每 token 贵 85x/57x(输入/输出)。为了保守起见,我在上文使用了 30 倍成本下降的估算(考虑到 Gemini 1.5 Flash 可能使用更多 token 来推理问题)。2. Minerva540B 在 MATH 上得分 50.3%,使用 64 个样本的多数投票。一位见多识广的朋友估计,这里的基础模型推理成本可能比 GPT-4 贵 2-3 倍。不过,快速抽查表明 Minerva 每个答案使用的 token 似乎略少一些。更重要的是,Minerva 需要 64 个样本才能达到那样的表现,如果天真地通过推理 API 运行,这粗略意味着成本要乘以 64 倍。实际上,运行评估时提示词 token 可以缓存;给定少样本提示词,即使算上输出 token,提示词 token 也很可能占成本的大头。假设输出 token 占获取单个样本成本的三分之一,那么有缓存的情况下,maj@64 只会带来约 ~20 倍的成本增加。为了保守起见,我在上文中使用了 20 倍成本下降的粗略数字(即便通过 API 运行所导致的朴素推理成本下降会更大)。↩
虽然这些是推理效率(而不一定是训练效率),并且在某种程度上会反映推理特有的优化,但 a)它们表明大量算法进步是可能的,并且总体上正在发生;b)算法改进往往既是训练效率的增益,也是推理效率的增益,例如通过减少所需的参数数量。↩
GPT-3:$60/1M token;GPT-4:$30/1M 输入 token、$60/1M 输出 token。↩
Chinchilla 缩放定律表明,参数数量和数据的规模应同步扩展。也就是说,参数数量的增长是有效训练算力增长的 OOM 的"一半 OOM"。同时,直观上参数数量与推理成本大致成正比。在其他条件相同的情况下,推理成本不变就意味着有效算力增长的 OOM 中有一半被算法胜利"抵消"了。话虽如此,需要明确的是,这是一个非常天真的计算(仅用于粗略说明),它在多个方面是错的。可能存在不转化为训练效率的推理特有优化;也可能存在不减少参数数量(因此不转化为推理效率)的训练效率提升;如此等等。↩
Gemini 1.5 Flash 在LMSys 聊天机器人排行榜上的排名与 GPT-4 相近(高于原始 GPT-4,低于更新版本的 GPT-4),在 MATH 和 GPQA(衡量推理的评估)上与原版 GPT-4 表现相近,而在 MMLU(更侧重衡量知识的评估)上大致落在 GPT-3.5 和 GPT-4 之间。↩
例如,这篇论文将 GPT-3 风格的朴素 Transformer 与多年来发表的对架构和训练配方的各种简单改动(用 RMSnorm 代替 layernorm、不同的位置嵌入、SwiGlu 激活、用 AdamW 优化器代替 Adam 等)进行了比较,即他们所称的"Transformer++",表明至少在小规模下就有 6 倍的增益。↩
如果我们取每年 0.5 个 OOM 的趋势,以及 GPT-2 和 GPT-4 发布之间相隔的 4 年,那会是 2 个 OOM。然而,GPT-2 到 GPT-3 是一次简单的扩展(在 Transformer 等带来的巨大增益之后),而 OpenAI 声称 GPT-4 的预训练在 2022 年完成,这可能意味着我们在这里应当计算的大约只有 2 年的算法进步。1 个 OOM 的算法效率似乎是一个保守的下限。↩
至少,鉴于十多年来持续一致的算法改进,举证责任应该落在那些认为这一切会突然停止的人身上!↩
考虑到集群成本,3 倍算力效率的经济回报将以数百亿美元($10s of billions)甚至更多来衡量。↩
而且,一遍又一遍地重读同一本教科书可能只会带来记忆,而不是理解。我认为,许多 wordcels(只会咬文嚼字、不开窍的人)正是这样通过数学课的!↩
另一种我觉得有趣的思考方式是:预训练和上下文学习(in-context learning)之间存在一个"缺失的中间地带"。上下文学习是惊人的(并且与人类的样本效率相竞争)。例如,Gemini 1.5 Pro 论文讨论了把关于 Kalamang 语的教材(一本教科书、一本词典)放进上下文——Kalamang 是一种只有不到 200 人使用、基本不存在于互联网上的语言——而模型学会了以人类水平从英语翻译成 Kalamang 语!在上下文中,模型能像人类一样从教科书中学到东西(而且比只把那本教科书扔进预训练所学到的好得多)。当人类从教科书学习时,他们能通过练习把短期记忆/所学提炼为长期记忆/长期技能;然而,我们没有相应的方法把上下文学习"提炼回权重"。合成数据/自我对弈/RL 等方法正试图解决这个问题:让模型自己学习,然后思考并练习所学到的东西,把这种学习提炼回权重。↩
另见 Andrej Karpathy 在这里讨论这一点的演讲。↩
从某种意义上说,这就是无监督学习的魔力:为了更好地预测下一个 token、让困惑度下降,模型学会了极其丰富的内部表征,从(著名的)情感到复杂的世界模型,无所不包。但是,开箱即用时,它们是被束缚的:它们只是用这些惊人的内部表征来预测随机互联网文本中的下一个 token,而不是以最佳方式运用它们去真正尝试解决你的问题。↩
参见更新版 Gemini 1.5 白皮书中的图 7,其中比较了 Gemini 1.5 Pro 和 Gemini 1.5 Flash(一个便宜得多、想必也更小的模型)的困惑度与上下文的关系。↩
不过,人们正在研究这个!↩
这说得通——它为什么要学会更长周期推理和纠错的技能呢?互联网上几乎没有"我在一个月的工作中完整的内心独白、推理过程、所有相关步骤"这种形式的数据。解锁这一能力将需要一种新的训练,让它学会这些额外的技能。或者如 Gwern 所说(私人通信):"'拥有银河系大小的头脑,而他们让我做什么?预测基准测试上拼写错误的答案!'抑郁的神经网络马文(Marvin)哀叹道。"↩
系统一(System I)与系统二(System II)是思考 LLM 当前能力——包括它们的局限和愚蠢错误——以及 RL 和解除束缚可能带来什么的实用框架。这样想:当你开车时,大多数时候你都在自动驾驶(系统一,也就是模型目前大部分时间做的事)。但当你遇到复杂的施工区或陌生的路口时,你可能会请副驾的同伴暂停一下对话,让你搞清楚——真正思考——正在发生什么、该怎么办。如果被迫只用系统一过生活(更接近今天的模型),你会有很多麻烦。创造系统二推理循环的能力是一个核心解锁。↩
基于上文描述的关于物理算力和算法效率扩展的最佳猜测假设,并简化并行性的考量(实际上,它可能更像是"一天 1440(60*24)个 GPT-4 级别模型"或类似的说法)。↩
当然,我们今天拥有的任何基准测试都会被攻克。但这说明不了什么;它主要反映了做出足够难的基准测试有多么困难。↩