GPT-3 Paper Explained: How "Language Models Are Few-Shot Learners" Changed Everything
GPT-3 paper explained: OpenAI's 175B-parameter model reached 71.2% on TriviaQA few-shot with no fine-tuning. What held up, what did not.
"Language Models are Few-Shot Learners" (arXiv 2005.14165), submitted on 28 May 2020 by Tom B. Brown and 30 co-authors, mostly at OpenAI, reports a 175-billion-parameter language model that performs tasks from instructions and examples in its prompt, with no fine-tuning. In the authors' tests it reached 71.2% few-shot accuracy on closed-book TriviaQA and 86.4% on LAMBADA, while trailing fine-tuned systems by a wide margin on SuperGLUE. Every result below is the authors' claim unless a later paper is cited.
We read: the full text of v4 (arXiv HTML rendering) and the abstract page.
What problem did the GPT-3 paper try to solve?
It targeted the cost of task-specific fine-tuning. The authors argue that the dominant recipe needed a labelled dataset of thousands of examples for each new task, while people can pick up a task from a short instruction or a handful of examples.
Their bet was that scale could close the gap. The abstract describes the model as 10 times larger than any previous non-sparse language model, and tests whether a model that large can adapt through its prompt alone.
How does GPT-3 work?
GPT-3 reuses the GPT-2 architecture, a decoder-only transformer, with "alternating dense and locally banded sparse attention patterns" (arXiv v4, Section 2). The novelty is size, data and the evaluation protocol, not a new network design.
The paper trains eight models. All saw 300 billion tokens, and all use a 2,048-token context window.
| Model | Parameters | Layers | d_model | Batch size (tokens) |
|---|---|---|---|---|
| Small | 125M | 12 | 768 | 0.5M |
| XL | 1.3B | 24 | 2048 | 1M |
| 6.7B | 6.7B | 32 | 4096 | 2M |
| 13B | 13.0B | 40 | 5140 | 2M |
| 175B | 175.0B | 96 | 12288 | 3.2M |
Source: Table 2.1 of the paper. The paper lists eight sizes; five are shown.
The training mix, from Table 2.2, was weighted rather than proportional to dataset size:
| Dataset | Tokens | Weight in mix |
|---|---|---|
| Common Crawl (filtered) | 410B | 60% |
| WebText2 | 19B | 22% |
| Books1 | 12B | 8% |
| Books2 | 55B | 8% |
| Wikipedia | 3B | 3% |
Common Crawl began as 45TB of compressed plaintext and was cut to 570GB after filtering. The paper puts the data at 93% English by word count. Appendix D estimates training compute for the 175B model at 3.64E+03 petaflop/s-days, or 3.14E+23 flops.
What do zero-shot, one-shot and few-shot mean here?
The paper defines three prompt settings, all without weight updates:
- Zero-shot: a natural-language instruction only.
- One-shot: the instruction plus one demonstration.
- Few-shot: the instruction plus K demonstrations, where "we typically set K in the range of 10 to 100 as this is how many examples can fit in the model's context window (n_ctx=2048)."
This is the paper's lasting contribution. It turned prompting into an evaluation method, and it made "in-context learning" a research topic.
What were the results?
Results were uneven, and the paper says so. Here are headline numbers for the 175B model, all lab-reported:
| Benchmark | Zero-shot | One-shot | Few-shot | Reference point |
|---|---|---|---|---|
| TriviaQA (closed-book, accuracy) | 64.3% | 68.0% | 71.2% | Fine-tuned RAG 68.0%, T5-11B+SSM 60.5% |
| LAMBADA (accuracy) | 76.2% | 72.5% | 86.4% | Prior best 68.0% |
| CoQA (F1) | 81.5 | 84.0 | 85.0 | Fine-tuned SOTA 90.7 |
| SuperGLUE test average (K=32) | n/a | n/a | 71.8 | Fine-tuned SOTA 89.0; fine-tuned BERT-Large 69.0 |
Sources: Tables 3.2, 3.3, 3.7 and 3.8. The TriviaQA few-shot figure is from the wiki-split test server.
Translation showed a pattern. With 64 examples, few-shot BLEU into English was strong: 39.2 for French to English and 40.6 for German to English, against supervised results of 35.0 and 40.2. Translation out of English was weaker: 32.6 for English to French against a supervised 45.6, and 21.0 for English to Romanian against 38.5 (Table 3.4).
Arithmetic scaled with difficulty. Few-shot accuracy was 100.0% on two-digit addition and 80.4% on three-digit addition (the paper's prose says 80.2%, a small internal inconsistency), then fell to 25.5% at four digits and 9.3% at five (Table 3.9).
The result that drew the most attention was human detection of generated news. Participants identified articles from the 175B model at about 52% accuracy (95% CI 49 to 54%), against about 86% for a deliberately poor control model (Table 3.11). The study used roughly 80 US participants per model and 25 articles of about 200 words, so it measures short-article detection, not general fluency.
Does the evidence hold up?
Partly. Four points matter for a working researcher.
1. Training-set overlap. Section 4 reports that a filtering bug caused "only partial removal of all detected overlaps" from the training data, and retraining was not feasible. The authors built clean versions of each benchmark by dropping examples with a 13-gram overlap, and found that "although potential contamination is often high (with a quarter of benchmarks scoring over 50%), in most cases performance changes only negligibly."
Two results carry asterisks. PIQA had 29% of examples flagged and a 3-point drop on the clean subset. Winograd had 45% flagged and a 2.6% drop. Several language-modelling benchmarks, including the Wikipedia sets from GPT-2, were omitted because the authors found them contained in the training data.
2. Weak spots the authors name. The paper says few-shot GPT-3 does "little better than chance" on WiC and ANLI. On ANLI, few-shot test accuracy was 36.8, 34.0 and 40.2 across the three rounds (Table C.1), against a chance level of about 33%. On RTE, only the largest model performed convincingly better than random.
3. Few-shot is not fine-tuning. The SuperGLUE gap (71.8 against 89.0) shows the headline "competitive" claim applies to selected tasks. The paper also notes GPT-3 outperformed a fine-tuned BERT-Large on four of eight SuperGLUE tasks with 32 examples per task, which is a fair way to describe the trade-off.
4. The mechanism is unknown. Section 5 asks whether few-shot prompting teaches a task from scratch or helps the model recognise tasks it saw in pre-training. The paper does not settle that.
The NeurIPS 2020 Best Paper committee cited the paper's "very extensive and thoughtful exposition of the broader impact" alongside its science. Peer recognition is not replication, though.
Why did it matter at the time?
It arrived four months after Kaplan et al.'s Scaling Laws for Neural Language Models (arXiv 2001.08361, 23 January 2020), which reported that loss falls as a power law in model size, data and compute. Several authors overlap between the two papers. GPT-3 read as the large-scale experiment of that argument.
The NeurIPS committee called it "a very surprising result that is expected to have substantial impact in the field, and that is likely to withstand the test of time" (NeurIPS blog, 7 December 2020). The paper shared the Best Paper Award with two other papers that year.
What came after GPT-3?
Two follow-ups changed the recipe.
Chinchilla (arXiv 2203.15556, 29 March 2022). DeepMind trained over 400 models and concluded that "current large language models are significantly undertrained." Their rule: for every doubling of model size, double the training tokens. Their 70B-parameter Chinchilla used 4x more data than the 280B Gopher at the same compute, and the authors report it outperformed GPT-3 (175B) on a large range of downstream tasks. GPT-3's 300B tokens for 175B parameters looks light by that standard. The Chinchilla result is itself the authors' claim.
InstructGPT (arXiv 2203.02155, 4 March 2022). OpenAI fine-tuned GPT-3 on labeler demonstrations, then with reinforcement learning from human feedback. In human evaluations on their prompt distribution, the authors report that outputs from the 1.3B InstructGPT model were preferred to those from the 175B GPT-3, "despite having 100x fewer parameters." Raw few-shot prompting turned out to be a weaker route to a usable assistant than adding human preference data.
What holds up today?
Judging from the papers above, and labelled as this site's analysis:
- Holds up: in-context learning as a capability and as an evaluation protocol. The zero/one/few-shot vocabulary is still how labs report results.
- Holds up: scale as a driver of capability, with the revision that data volume matters as much as parameter count.
- Revised: the idea that a bigger base model alone gives a better product. InstructGPT shows alignment data changed user preference more than 100x more parameters did.
- Weaker than it looked: the contamination analysis. The authors disclosed the bug and flagged affected benchmarks, but a 13-gram check is a narrow test of overlap.
What's still unclear?
- How much of few-shot performance is recognition versus learning. The authors raise this themselves in Section 5 and do not resolve it.
- True contamination effects. With partial filtering and a 13-gram check, the reported clean-versus-full gaps are an estimate of the effect, not a measurement.
- Human evaluation scope. The ~52% detection result covers about 200-word news articles and about 80 participants per model.
- Internal inconsistencies. The prose and tables differ on a few numbers (3-digit addition at 80.2% versus 80.4%).
Frequently asked questions
What is the GPT-3 paper about?
"Language Models are Few-Shot Learners" (arXiv 2005.14165) by Tom B. Brown and 30 co-authors reports a 175-billion-parameter autoregressive language model. The authors evaluate it with no gradient updates, giving task instructions and a few examples as text in the prompt. They report competitive results on several benchmarks and clear weaknesses on others.
How big was GPT-3 and how much data did it see?
The largest model has 175 billion parameters, 96 layers and a 2,048-token context window. According to the paper, every model in the family was trained on 300 billion tokens, drawn mostly from filtered Common Crawl (60% of the mix), plus WebText2, two book corpora and Wikipedia. The authors put training compute at about 3,640 petaflop/s-days.
What is the difference between zero-shot, one-shot and few-shot?
In the paper, zero-shot gives the model only a natural-language instruction. One-shot adds a single worked example. Few-shot adds several, typically 10 to 100 as many as fit in the 2,048-token context. In all three settings the model's weights are not updated, so any learning happens inside the prompt.
Did GPT-3 beat fine-tuned models?
On some tasks, yes, on many no. The authors report 86.4% few-shot accuracy on LAMBADA against a prior best of 68.0%. On SuperGLUE the few-shot average was 71.8 against 89.0 for the fine-tuned state of the art, and on ANLI it stayed close to chance. The results are the authors' own.
Was GPT-3 trained on its own test sets?
Partly. The authors report that a filtering bug left some benchmark overlap in the training data and retraining was not feasible. They built "clean" test subsets and found performance changed little for most tasks, but flagged PIQA and Winograd with asterisks and left several language-modelling benchmarks out of the paper.
What came after GPT-3?
DeepMind's Chinchilla paper (arXiv 2203.15556) argued that models like GPT-3 were undertrained and should see more data per parameter. OpenAI's InstructGPT paper (arXiv 2203.02155) fine-tuned GPT-3 with human feedback and reported that a 1.3B version was preferred over the 175B base model on its prompt distribution.
Sources
- Language Models are Few-Shot Learners (abstract page), arXiv (2020-07-22)
- Language Models are Few-Shot Learners (v4, HTML full text), arXiv (2020-07-22)
- Announcing the NeurIPS 2020 award recipients, NeurIPS Blog (2020-12-07)
- Scaling Laws for Neural Language Models, arXiv (2020-01-23)
- Training Compute-Optimal Large Language Models, arXiv (2022-03-29)
- Training language models to follow instructions with human feedback, arXiv (2022-03-04)