Home › Blog › GPT-1: How the First GPT Was Actually Built
Model Case Study · Article 1 📄

GPT-1: How the First GPT Was Actually Built

Before GPT-3 made headlines and GPT-4 became a product every knowledge worker touches, there was a much smaller, much quieter paper from a roughly four-person research effort at OpenAI. This is the end-to-end story of GPT-1 — the idea, the tiny team, the data, the architecture, the training run, the evaluation, and the release — read through both a researcher's lens (this site's Foundations series) and a practitioner's lens (this site's Engineering Practicum), showing exactly how the concepts in both series showed up in the model that started it all.

FL
FrontierAGI Team

One Paper, One Small Team, One Real Recipe

"GPT" stands for Generative Pre-trained Transformer, and the model that first earned that name was documented in a single 2018 OpenAI paper, "Improving Language Understanding by Generative Pre-Training" by Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. It introduced no new architecture of its own — the Transformer already existed — and it trained on a dataset that, by today's standards, is almost comically small. What it introduced was a recipe: pretrain one large language model on raw, unlabeled text, then fine-tune that same model, with minimal changes, on a wide range of specific tasks. That recipe, more than any single number in the paper, is the direct ancestor of every GPT model since.

4 Named authors on the original GPT-1 paper
117M Parameters — smaller than a single modern phone photo, by file size
12 Downstream NLP tasks the same pretrained model was fine-tuned on
Part 1 — The Problem

Why NLP Lagged Behind Vision

By 2017, computer vision had ImageNet-pretrained models that could be fine-tuned onto almost any new visual task with a small amount of labeled data — a transfer-learning recipe that made vision progress compound quickly. Natural language processing had no equivalent. Most NLP systems were still trained largely from scratch, per task, on relatively small labeled datasets, because unlike images, there was no obvious, universally useful "pretraining task" for text that everyone had agreed worked well. This series' own Generalization & Learning Theory article covers exactly why this mattered: a model trained on a small labeled dataset generalizes only as well as that dataset's coverage of the underlying task — and most labeled NLP datasets in 2017 were small enough that this was a real, binding constraint on how good any single-task model could get.

Part 2 — The Idea

A Semi-Supervised Bet, Not a New Architecture

GPT-1's core idea was not, in isolation, novel — it built directly on two real 2018 precursors: ELMo (Peters et al.), which learned contextual word representations from a bidirectional LSTM language model and fed them into task-specific architectures, and ULMFiT (Howard & Ruder), which pretrained and fine-tuned a full language model for text classification specifically. GPT-1's bet was to go further in one specific direction: use a single Transformer-based language model, pretrained once on unlabeled text, and fine-tune that entire model — not just its output representations — on each downstream task with only a minimal, task-specific input transformation and output layer. This is the same idea this site's Day One Onboarding article describes at a smaller scale — a real project idea starting as a hypothesis worth testing cheaply, not a guaranteed result.

The Idea One Transformer, pretrained once on raw text via next-word prediction, then fine-tuned with minimal changes across many different labeled tasks.
Part 3 — The Team

A Roughly Four-Person Effort

The GPT-1 paper credits exactly four authors: Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. That is a strikingly small credited team by the standards of frontier model releases today, where training a flagship model routinely involves credit lists running into the hundreds once infrastructure, data, safety, and evaluation contributors are all named. This isn't just a historical curiosity — it directly shapes what this series' Other Teams' Code article calls Conway's Law in action: a four-person team can iterate on one shared codebase with almost no cross-team coordination overhead, which is part of why a small team could move from idea to published result as quickly as GPT-1's timeline suggests. That same small-team structure would become impossible once training runs required the compute-request processes and cross-team scheduler integration this series' Compute Economics article describes.

AR
Alec Radford
Lead author — architecture and training
KN
Karthik Narasimhan
Co-author — task adaptation and evaluation
TS
Tim Salimans
Co-author — training methodology
IS
Ilya Sutskever
Co-author — research direction
Part 4 — Standing on the Transformer

Why a Decoder, Not an LSTM

Vaswani et al.'s "Attention Is All You Need" (2017) had introduced the Transformer only a year before GPT-1, originally for machine translation with a full encoder-decoder structure. GPT-1's authors made a specific, consequential choice: use only the decoder half, with masked self-attention that only looks backward at previous tokens — the natural fit for a left-to-right language model, and the architectural seed of every GPT model since. Choosing the Transformer over the LSTMs that ELMo used mattered specifically because self-attention parallelizes across the full sequence during training in a way recurrent architectures cannot, directly connecting to this series' Mathematical Foundations and Systems articles' treatment of why architecture choices are inseparable from what hardware can actually execute efficiently.

Why A decoder-only Transformer with masked self-attention naturally matches the left-to-right structure of "predict the next word" — and trains far more efficiently on parallel hardware than an LSTM's inherently sequential computation.
Part 5 — Data Collection

BookCorpus: Small, Specific, and Deliberately Chosen

GPT-1 was pretrained on the BooksCorpus dataset, originally assembled by Zhu et al. (2015) for a different purpose (aligning books and movies) — roughly 7,000 unique unpublished books across a range of genres. The GPT-1 paper explicitly explains the choice: books contain long stretches of contiguous text, which lets the model learn to model long-range dependencies in a way that shuffled, sentence-level datasets like those used for some other language-modeling benchmarks at the time could not. This is the pretraining-era equivalent of this series' Production Training Code article's data-pipeline lessons — the specific properties of a dataset, not just its size, shape what a model can actually learn.

Dataset PropertyWhy It Mattered for GPT-1
~7,000 unique books, several genresEnough raw text diversity for general-purpose language modeling at 117M-parameter scale
Long, contiguous passagesEnabled learning long-range dependencies — the paper's explicit rationale for choosing books over sentence-shuffled corpora
Unpublished / less commonly seen textReduced overlap with the standard NLP benchmarks the model would later be evaluated on
Part 6 — Architecture & Design Decisions

117 Million Parameters, By Deliberate Design

The GPT-1 architecture, as specified in the paper: a 12-layer decoder-only Transformer, 768-dimensional hidden states, 12 attention heads per layer, and a 3,072-dimensional position-wise feed-forward network inside each block — roughly 117 million parameters in total. Text was tokenized using byte-pair encoding (BPE) with a 40,000-merge vocabulary, a subword scheme that lets the model handle rare and out-of-vocabulary words gracefully. Every one of these numbers was a real constraint-driven decision, not an arbitrary round figure — matching what this series' Custom Kernels article calls the compute-bound vs. memory-bound tradeoff: a 2018-era single machine with a handful of GPUs simply could not have trained a much larger model in a reasonable amount of time, so the architecture was sized to what the available hardware could actually execute.

Output logits Decoder block Masked self-attention Feed-forward (3072-d) × 12 layers Token + position embeddings
GPT-1's decoder-only stack — 12 blocks, 768-dim states, 12 heads — the direct architectural ancestor of every later GPT.
Part 7 — Training the Model

A Month, Eight GPUs

The paper states the pretraining run took roughly one month on 8 GPUs — a real, verifiable number that is almost quaint next to the multi-thousand-GPU, multi-month runs this series' Compute Economics article describes as standard for frontier models today. The training objective was straightforward next-token prediction (standard language modeling), optimized with Adam at a max learning rate of 2.5e-4, over 100 epochs on the BooksCorpus data with minibatches of 64 randomly sampled contiguous 512-token sequences. "State of the art hardware" in 2018 meant a single small GPU cluster that a four-person team could plausibly manage without any of the priority-quota-preemption scheduling infrastructure this series' Compute Economics article describes as necessary once hundreds of teams compete for the same GPUs.

"Trained for 1 month on 8 GPUs" — a sentence that would be almost unrecognizable as a frontier training run within just a few years of this paper's publication.
Part 8 — The Fine-Tuning Recipe

One Model, Twelve Tasks

The paper's central experiment is adapting the same pretrained model to 12 different NLP datasets spanning four task types: natural language inference, question answering, semantic similarity, and text classification. For each task, the input text was reformatted into a single ordered sequence the pretrained Transformer could consume (for example, a premise and hypothesis for entailment tasks joined with a delimiter token), with only a small linear output layer added on top — deliberately minimizing task-specific architecture, in contrast to the custom architectures common before this paper. This mirrors this series' Idea to Merged PR article's principle almost exactly: one shared underlying system, validated against many specific tests, rather than a forked implementation per test.

Part 9 — Evaluation

State of the Art on 9 of 12 Benchmarks — Honestly Reported

The paper reports new state-of-the-art results on 9 of the 12 datasets it evaluated against, covering benchmarks like MultiNLI, SciTail, QNLI, RACE, and the Story Cloze Test, while being explicit about where results were more mixed. This kind of honest self-assessment — reporting real wins without overstating generality — is exactly the discipline this series' Self-Assessment Deep Dive article covers, and it directly parallels the "shipping scrutiny" this series' On-Call Reality article describes: a result only counts once it survives honest, specific evaluation, not just a single favorable number.

Part 10 — Writing It Up and Releasing It

A Paper, a Blog Post, and a GitHub Repo — No API, No Safety Review

GPT-1's release, in June 2018, consisted of the paper itself, an OpenAI blog post, and code and weights published to a public GitHub repository — a release process almost unrecognizable next to how frontier labs release models today. There was no API gatekeeping usage, no staged rollout, and none of the formal safety review processes that later became standard as models grew more capable — a difference this series' Alignment article covers directly: release norms in AI have tightened specifically because capability grew faster than the field's shared understanding of what could go wrong, and GPT-1's era predates almost all of that infrastructure.

What Changed Since A 2018 release was code + weights + a blog post. A 2026-era frontier release typically involves staged access, red-teaming, safety evaluations, and often no public weights release at all for the most capable models.
Part 11 — Legacy

The Recipe Survived; the Scale Didn't

GPT-2 (2019) and GPT-3 (2020) scaled up almost every number in this article — parameters, data, compute, team size — while keeping GPT-1's core recipe intact: a decoder-only Transformer, pretrained on raw text via next-token prediction, adapted to downstream use with minimal task-specific machinery. This is the same "scale, don't reinvent" pattern this site's After Transformers and Evolution of Neural Networks articles trace across the field's whole history — and it's the direct throughline from a four-person team's one-month, 8-GPU training run to the frontier labs and multi-thousand-GPU training jobs this site's entire Engineering Practicum series exists to explain.

What Carried Forward Decoder-only Transformer architecture · pretrain-then-fine-tune recipe · next-token prediction as the pretraining objective · byte-pair-style subword tokenization

Readiness Checklist

1
Can you explain, in one sentence, what GPT-1 actually contributed given that the Transformer already existed?
2
Can you name both 2018 precursor papers (ELMo, ULMFiT) and what GPT-1 did differently from each?
3
Could you explain why BooksCorpus's long, contiguous text specifically mattered, not just its size?
4
Can you trace at least three concepts in this article back to a specific article in either the Foundations or Engineering Practicum series?

⚠️ What's Missing or Uncertain

The 4 credited authors are not necessarily the complete list of everyone who contributed. Infrastructure support, internal reviewers, and other uncredited contributors are common in real research efforts and are not disclosed in the paper. Internal false starts, earlier failed experiments, and the day-to-day decision-making process behind each architectural choice are also not publicly documented — this article draws only on what the paper, the blog post, and the public code release actually state, and treats everything else as genuinely unknown rather than filling gaps with plausible-sounding invention.

Where This Case Study Goes Next

GPT-2 scales this exact recipe up by roughly 13x in parameter count, replaces the curated BooksCorpus with a much larger and messier web-scraped dataset, and pushes the fine-tuning-free idea one step further into genuine zero-shot task transfer — while also becoming the field's first major staged-release controversy, a direct preview of the release-norms tightening this article's "What Changed Since" box gestures toward.

🔗 Reference Links

🎥 Recommended Videos

🧭 Closing — A Small Team's Bet That Defined a Decade

🎯 The Bottom Line
GPT-1 was not built by a large organization with dedicated infrastructure, safety, and evaluation teams — it was four named researchers, one existing architecture, one modestly-sized book dataset, and a month on eight GPUs. The recipe it proved — pretrain once on raw text, fine-tune everywhere — is the single idea that every GPT model since has scaled, not reinvented. Reading it through both this site's researcher lens and its practitioner lens shows the same lesson from two directions: the conceptual bet and the engineering reality were never separate stories, even when the team small enough to hold both in one room.