GPT-3 & In-Context Learning (2020) › 2020: GPT-3 and In-Context Learning

Michael BrenndoerferJune 27, 20254 min read
History of Language AIAll chapters
Part 6 of 9Scaling & Retrieval
Chapter 67GPT-3 & In-Context Learning (2020) › 2020: GPT-3 and In-Context Learning
Reading section 1 of 7 · 2020: GPT-3 and In-Context Learning · 4 minSection 1 of 7 · 4 min

Book contents

Section 1 of 7 · 4 min read

GPT-3 & In-Context Learning (2020) › 2020: GPT-3 and In-Context LearningOne section · Sections in this chapter1 / 7 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The release of GPT-3 by OpenAI in 2020 marked a watershed moment in the development of large language models. This showed that scaling autoregressive language models to hundreds of billions of parameters could produce emergent capabilities that changed how AI systems could interact with and learn from humans. With 175 billion parameters, GPT-3 was an order of magnitude larger than GPT-2, and this large scale revealed a remarkable phenomenon: the model could perform diverse tasks with high accuracy simply by conditioning on a few examples or task descriptions provided in the input prompt, without any gradient-based fine-tuning. This capability, which researchers termed "in-context learning" or "few-shot learning," showed that large language models could adapt to new tasks on the fly through their autoregressive generation mechanism, learning from patterns in the prompt itself rather than requiring explicit training data.

By 2020, the field of natural language processing had embraced the transfer learning paradigm established by models like GPT-1, GPT-2, and BERT. Researchers had become accustomed to pretraining large models on vast text corpora and then fine-tuning them on specific downstream tasks with labeled data. While this approach had dramatically improved performance across many NLP benchmarks, it still required collecting task-specific training data, carefully tuning learning rates, and maintaining separate fine-tuned models for each application. GPT-2 had shown promising zero-shot capabilities, where the model could perform tasks based on natural language descriptions, but these capabilities were inconsistent and typically fell short of fine-tuned performance.

GPT-3 emerged from OpenAI's hypothesis that scaling language models further, both in terms of model size and training data, might produce more reliable and powerful emergent capabilities. The research team, led by Tom Brown and other researchers, designed an experiment to test whether a sufficiently large autoregressive language model could perform tasks effectively through in-context learning, where the model would see a few examples of a task in its input prompt and then generate appropriate responses for new inputs. This approach would eliminate the need for fine-tuning while potentially matching or exceeding fine-tuned performance across many tasks.

The results exceeded even optimistic expectations. GPT-3 demonstrated strong performance across a wide range of tasks using few-shot learning, where it would see several examples of the task in the prompt, as well as one-shot and zero-shot settings. The model could translate between languages, answer questions, perform arithmetic, generate code, complete analogies, and perform many other tasks simply by conditioning on appropriately formatted examples. This capability emerged from the model's training objective: during pretraining, the model learned to predict the next token in sequences that often contained questions followed by answers and examples of translation, among other structured formats. At sufficient scale, the model developed the ability to recognize these patterns and continue them appropriately, effectively "learning" from the examples in its context.

In-context learning changed how language models could be used and deployed. Instead of fine-tuning separate models for each task, practitioners could use a single large model and prompt it with examples for any task. This flexibility enabled rapid experimentation and adaptation to new domains or tasks without retraining. GPT-3's success also raised fundamental questions about the nature of what large language models learn during pretraining and how they acquire the ability to adapt to new tasks through pattern recognition in their input context.