Language Models are Few-Shot Learners
1. Research problem
Fine-tuning large models per task is expensive and unlike human learning from a few examples in context.
2. Motivation
The authors wanted to see whether scaling autoregressive models unlocks in-context learning, where tasks are specified by examples in the prompt without gradient updates.
3. Previous approaches
GPT-2 showed limited zero-shot transfer; BERT-style models needed fine-tuning; earlier meta-learning approaches did not operate at language-model scale.
4. Core contribution
Trained a 175B-parameter model and systematically evaluated zero-, one-, and few-shot performance across many benchmarks, showing that in-context examples dramatically improve performance.
5. Mathematical formulation
Next-token prediction on a broad corpus; at inference, prepend k demonstration input-output pairs and the query, and generate an answer without updating weights.
6. Methodology
Train models from 125M to 175B parameters, evaluate in three prompt regimes, and analyze scaling of task performance with model size.
7. Architecture
Decoder-only Transformer with 96 layers, 96 attention heads, and 12,288 embedding dimension.
8. Experimental setup
Dozens of NLP benchmarks covering question answering, translation, cloze, reasoning, and synthetic tasks.
9. Datasets
A filtered Common Crawl mixture, WebText2, Books1/2, Wikipedia; benchmark suites such as SuperGLUE, TriviaQA, LAMBADA, and WMT.
10. Results
Few-shot GPT-3 matched or exceeded fine-tuned systems on several tasks, though it remained weak on reasoning and some reading-comprehension tasks.
11. Limitations
Massive compute cost, sensitivity to prompt formatting, inability to update from context permanently, and possible benchmark contamination from web data.
12. Critical analysis
Changed the paradigm from fine-tuning to prompting, but also made contamination and reproducibility central concerns in LLM evaluation.
13. Implementation tasks
- 1.Build a few-shot prompt harness for a small open model and compare zero-, one-, and few-shot accuracy.
- 2.Ablate demonstration ordering and wording to quantify prompt sensitivity.
- 3.Implement log-probability scoring for multiple-choice evaluation of a language model.
14. Follow-up work
- 1.Scaling Laws for Neural Language Models (Kaplan et al., 2020)
- 2.Training Compute-Optimal Large Language Models (Hoffmann et al., 2022)
15. Open research questions
- 1.What mechanism implements in-context learning inside the model?
- 2.How can contamination be detected in web-scale pretraining corpora?