Rafhael Oliveira · IA

The seven fossils: why GPT-1, GPT-2 and RoBERTa are a historical cross-section, not a list

What you will learn, in what order, and why in that order.

1 min read· chapter: 8 min

Seven files on Hugging Face record the exact moment language AI split in two. Between 2018 and 2019 the whole field forked into two branches. On one side, the branch that generates text one word at a time, looking only backward: GPT-1, GPT-2 small, medium, large, XL. That lineage would lead to ChatGPT. On the other, the branch that reads the whole sentence and generates nothing: BERT, RoBERTa. OpenAI's seven models on Hugging Face are not a list. They are the fossils of that moment. And the difference between the two branches fits in one line of code.

The three points

  1. The seven models are two branches: decoder (generates) and encoder (understands). Everything that came later descends from one of them.
  2. The track goes from text becoming numbers to the model becoming a server, and every chapter has a lab that runs on your machine.
  3. No number in the course is quoted from a paper. All were measured on an ordinary machine, and the guide says how to repeat them.

From the chapter, the beginning

What you will learn, in what order, why in that order — and where each piece lives on your machine.

This course takes apart GPT-2 and RoBERTa — the seven models the openai-community organization published on Hugging Face. They are not a random list: they are a historical cross-section. Between 2018 and 2019, the entire field of language processing split into two branches, and these seven files are exactly the record of that moment.

On one side, the decoder branch: GPT-1 → GPT-2 small → medium → large → XL. This is the lineage that generates text, one word at a time, looking only backward. It would lead to GPT-3, to ChatGPT and to everything that came after.

On the other side, the encoder branch: BERT → RoBERTa. This is the lineage that understands text, looking at the whole input at once, forward and backward. It remains widely used for classification, search and information extraction.

Keep reading chapter 00 →Ler em portuguêsThe PDFs by e-mail →
What the chapter covers · 6 sections · 8 min
  1. Why this course exists
  2. The seven models, in numbers
  3. The track, chapter by chapter
  4. Where everything lives on your machine
  5. What exists beyond what we use
  6. How to study this
All chapters of the course · GPT-1 and GPT-2, taken apart
  1. 00 · The seven fossils: why GPT-1, GPT-2 and RoBERTa are a historical cross-section, not a list
  2. Glossary · Course glossary: what token, layer and model mean in AI, and in the rest of IT
  3. 01 · Why GPT-2 sees neither letters nor words, and what that costs in Portuguese
  4. 02 · Embeddings: from a meaningless integer to a vector that knows king and queen are related
  5. 03 · Attention: the single operation that replaced twenty years of recurrent networks
  6. 04 · Twelve heads instead of one, and the single line of code that separates GPT from RoBERTa
  7. 05 · Why GPT-2 needs 48 floors to answer, and what happens inside each one
  8. 06 · What scale really buys: from 124 million to 1.5 billion, measured
  9. 07 · Temperature, top-k and top-p: the decision that changes the text more than switching models
  10. 08 · Perplexity: the one number that says what the model learned, without anecdotes
  11. 09 · GPT-1 to GPT-2: same size, half the perplexity. Four decisions explain it
  12. 10 · RoBERTa: when the advance is training better what already existed
  13. 11 · Encoder vs decoder: one line of code and every consequence that descends from it
  14. 12 · The detector: how a language model becomes a classifier, and why this one should decide nothing
  15. 13 · Reading GPT-2's original code: 174 lines against everything you learned
  16. 14 · Serving models: from function call to HTTP server, and what production does on top
  17. 15 · The lab guide: every command, every script, and everything that was measured
  18. 16 · The ceiling of this path: LeCun's argument, read from inside GPT-2

After this: the Antivision experiment

Rafhael Oliveira
Rafhael Oliveira

Writes the GPT-2 course and runs the Antivision experiment, measuring every run before publishing the number. The LinkedIn posts start here and end in the chapters.

Follow on LinkedIn →