GPT-3 is a language model that scales a decoder-only Transformer, nearly identical to GPT-2, up to 175 billion parameters, and shows that it can solve new tasks without updating its weights, simply by writing a few examples of the task into the input text. It was presented by Brown et al. at OpenAI in 2020 in the paper "Language Models are Few-Shot Learners." At 175 billion parameters, it is 10 times larger than any previous non-sparse language model.
Until then, models such as GPT and BERT were used by pre-training and then fine-tuning on thousands to hundreds of thousands of labeled examples for each task. The GPT-3 paper points out three problems with this approach.
- Every new task requires collecting a large labeled dataset.
- Fine-tuning on narrow data makes it easy to pick up accidental quirks of that data, which makes true generalization ability hard to measure.
- Humans can perform a new task after seeing only a short instruction or a few examples.
The paper therefore calls the approach of placing a task description and examples in the input text and having the model solve the task simply by predicting the continuation in-context learning, and studies it in three settings that differ in the number of examples.
| Setting | What goes in the input | Weight updates |
|---|---|---|
| Zero-shot | Task description only | None |
| One-shot | Task description and 1 example | None |
| Few-shot | Task description and examples (typically 10 to 100) | None |
As a result, GPT-3 in the few-shot setting matched or exceeded the best fine-tuned results of the time on TriviaQA, a knowledge-based question answering task (71.2% accuracy), and on LAMBADA, which asks for the last word of a passage (86.4%). It also showed that the larger the model, the more it gains from seeing examples. On the other hand, on tasks that compare two sentences (WiC, ANLI), even few-shot performance was close to random guessing.

