AI State of the Art
Ecosystem/Annotated Foundational Papers/12 min
Section 298

"GPT-3: Language Models are Few-Shot Learners" (2020)

Listen as a podcast →

The Scale Jump That Changes Everything

GPT-2: 1.5 billion parameters. GPT-3: 175 billion.

That's 100x bigger. But what's fascinating is that GPT-3 isn't "just 100x better." It's qualitatively different. Capabilities that simply didn't exist in GPT-2 appear in GPT-3, as if the model had crossed an invisible threshold.

This is the paper (Brown et al., May 2020) that opened the age of scaling in AI. The idea that by making models large enough, capabilities emerge spontaneously.

Log-log plot of validation loss against training compute in PetaFLOP per second-days. Each colored curve is a model of a different size, from 100,000 to over 100 billion parameters. The curves settle onto a dashed straight line with equation L equals 2.57 times C to the power minus 0.048.
The figure from the paper that justifies the scaling bet: each curve is a model of a given size, and they all land on the same dashed line. The more compute you spend, the lower the loss drops, smoothly and predictably across eight orders of magnitude. This regularity is what convinced OpenAI to go all the way to 175 billion parameters.Source : GPT-3 paper, Brown et al. 2020 (figure 3.1), via Towards Data Science
Emergent capabilities

GPT-3 can do things nobody explicitly taught it: translation without parallel data, problem-solving by analogy, functional code generation, 3-digit arithmetic. These capabilities are absent in GPT-2. They emerge from scaling, as if size unlocked new aptitudes.

In-Context Learning: The Major Discovery

GPT-3's most important contribution isn't its size. It's the discovery of in-context learning: the ability to learn new tasks simply from examples in the prompt, without modifying the model's weights.

You don't fine-tune GPT-3 for translation. You give it a few examples in the prompt:

"English: Hello -> French: Bonjour. English: Goodbye -> French: Au revoir. English: Thank you -> French:"

And it responds "Merci." Without ever having been specifically trained on translation.

Three regimes were identified:

  • Zero-shot: just the task description, no examples
  • One-shot: a single example
  • Few-shot: 10 to 100 examples in the prompt

The finding: performance increases significantly with the number of examples. And the larger the model, the more it benefits from examples. GPT-3 learns in the prompt, not through fine-tuning. It was revolutionary and nobody really understood how it worked.

To give an analogy: it's as if you showed someone 3 examples of haikus, and they could write a perfect one. Without poetry lessons. Just by seeing the pattern. GPT-3 does that, but for hundreds of different tasks.

Architecture and Training

  • 175 billion parameters
  • 96 layers, 12,288 embedding dimensions, 96 attention heads
  • Context window: 2,048 tokens (modest by current standards)
  • Decoder-only architecture (autoregressive, predicts the next token)

Training data (a carefully weighted mix):

  • Filtered Common Crawl (60%): cleaned web pages
  • WebText2 (22%): popular Reddit links
  • Books1 and Books2 (16%): book corpora
  • Wikipedia (3%): encyclopedia
  • Total: approximately 300 billion tokens
Table of GPT-3 training datasets: filtered Common Crawl 410 billion tokens and 60 percent of the mix, WebText2 19 billion and 22 percent, Books1 12 billion and 8 percent, Books2 55 billion and 8 percent, Wikipedia 3 billion and 3 percent, along with the epochs elapsed when training for 300 billion tokens.
The original table from the paper. Note the rightmost column: weight in the mix does not follow source size. Common Crawl is by far the largest corpus yet is seen only 0.44 times, while tiny Wikipedia is passed over 3.4 times. Sources considered clean are deliberately oversampled.Source : GPT-3 paper, Brown et al. 2020 (table 2.2), via Towards Data Science

Estimated training cost: $4.6 million in 2020. A figure that seems modest today (current models cost hundreds of millions), but was astronomical at the time for a single training run.

Results: Impressive and Surprising

SuperGLUE: few-shot performance approaches that of fine-tuned models. Without any fine-tuning, just examples in the prompt.

Translation: competitive in few-shot without ever having seen parallel bilingual data. The model learned translation as a byproduct of text prediction.

Arithmetic: addition and subtraction up to 5 digits. Not perfect, but the fact that a language model could "calculate" at all was surprising.

Text generation: GPT-3-generated articles were difficult to distinguish from human-written texts in blind studies. Human evaluators were wrong ~50% of the time.

Code generation: GPT-3 could write simple code in Python and JavaScript, laying the foundations for what would become Codex and then GitHub Copilot.

Impact: GPT-3 Creates an Industry

GPT-3 catalyzed several simultaneous transformations that shaped the industry as we know it:

The API as a product: GPT-3 is the first LLM offered as a service via an API. You send text, you receive text. No GPU needed, no training data needed. It democratized access to large models.

Prompt engineering as a discipline: how do you write effective prompts? How do you structure examples? How do you guide the model? A new skill set was born, which has become a full-fledged professional competency.

The startup explosion: hundreds of startups were built on the GPT-3 API. Jasper (marketing writing), Copy.ai (copywriting), and of course the projects that would become GitHub Copilot and Codex. AI became a product, not just a research topic.

The beginning of the AGI debate: for the first time, serious discussions about artificial general intelligence emerged in the mainstream. Does a model that can do "a bit of everything" approach general intelligence?

From scaling comes emergence

GPT-3 established a fundamental understanding: scaling is not linear. It's not about getting "slightly better" answers. At large scale, qualitatively new capabilities emerge. This is the foundation of the scaling paradigm that still dominates the industry and justifies billions of dollars in investments.

The Problems GPT-3 Reveals

GPT-3 isn't all good news. It also reveals fundamental problems:

Systematic biases: the model reproduces and amplifies gender, race, and religion biases present in its training data. Stereotyped associations appear in responses. This is a problem the industry is still fighting today.

Hallucinations: GPT-3 invents facts with confidence. It can cite studies that don't exist, attribute quotes to the wrong people, or fabricate statistics out of thin air. The fluency of the text masks the absence of truth.

Difficult tasks: reading long documents, multi-step reasoning, and causal understanding remain problematic.

These problems directly motivated subsequent research: InstructGPT (RLHF to align the model with human intentions), Constitutional AI (Anthropic, for safety), and ultimately ChatGPT (which made GPT accessible to the general public).

The Path from GPT-3 to ChatGPT

The lineage is direct:

GPT-3 (scaling) -> InstructGPT (RLHF, alignment) -> GPT-3.5 (optimizations) -> ChatGPT (dialogue fine-tuning) -> GPT-4 (multimodal, reasoning)

Each generation fixes the problems of the previous one. But it's GPT-3's massive scaling that laid the foundation on which everything else was built.

The Philosophical Debate: Stochastic Parrots?

Bender et al. (2021) published an influential paper arguing that GPT-3 is nothing but a "stochastic parrot": sophisticated pattern matching without any understanding. The model doesn't "know" anything, it recombines textual statistics.

Others, like Ilya Sutskever (then at OpenAI), argued the opposite: correctly predicting the next token in any context requires some form of world understanding. You can't predict what comes next in a physics text without "understanding" (in some sense) physics.

This debate remains open and active. It touches on deep questions: what is understanding? Can you understand without consciousness? Does the distinction between "simulating understanding" and "truly understanding" have practical meaning?

The paper's lucid limitations

The original GPT-3 paper honestly acknowledges its limitations: prohibitive training cost, significant biases, poor performance on certain tasks. The authors presented these as challenges for future research. And indeed, these challenges were addressed: RLHF for alignment, Chinchilla for efficiency, Constitutional AI for safety. GPT-3 posed the problems as much as the solutions.