zero-to-gpt

Zero to GPT — Course Roadmap

This is the full map of the course: 14 main-path lessons and 8 side branches. It’s for teachers planning a term, adults studying on their own, and anyone who wants to know what’s coming.

Ways to run it

The full Thinking Moves catalog is in THINKING-MOVES.md. Dated events also appear in the course timeline (site/timeline/).

About accuracy: Names and dates below come from the original papers and books, and were checked when this was written. If you find an error, open an issue. Getting history right counts as a Bug Hunt too.


At a glance

# Lesson ID Big question (kid words) Math practiced Thinking Move Status
01 01-the-guessing-machine Can you guess the next letter just by counting? Counting, fractions, probability, conditional probability Count instead of argue 🟡 In progress
02 02-numbers-that-mean-things How can a list of numbers mean something? Coordinates, vectors, length, dot product Give it an address ⚪ Planned
03 03-tables-that-transform How do you do the same math to everything at once? Matrix × vector, matrix × matrix, shapes Write the recipe once ⚪ Planned
04 04-sliding-downhill How does a computer get less wrong a little at a time? Slope, derivatives, gradient descent Make it smooth so you can slide downhill ⚪ Planned
05 05-the-fake-neuron Can one fake brain cell learn? What can’t it learn? Weighted sums, lines as boundaries, XOR Know what it can’t do ⚪ Planned
06 06-blame-flows-backward When a big machine is wrong, whose fault is it? Chain rule, computation graphs Pass the blame backward ⚪ Planned
07 07-the-babbling-network Can a network learn our counting table by itself? Exponents, logs, softmax, cross-entropy Let it learn its own features ⚪ Planned
08 08-words-as-places If words were places on a map, which would be neighbors? High-dimensional vectors, cosine similarity, analogies Know a word by the company it keeps ⚪ Planned
09 09-memory-problems Why do networks forget the start of a sentence? Repeated multiplication, decay, sigmoid gates Find exactly where it breaks ⚪ Planned
10 10-just-look-back What if every word could look back at every other word? QKᵀ, scaling, row softmax, weighted averages, masking Remove the bottleneck ⚪ Planned
11 11-nanogpt What happens when you make it bigger, and how do we know? Logs, power laws, log-log plots, scientific notation Make it bigger, then measure ⚪ Planned
12 12-parrot-to-assistant How do you turn an autocomplete into a helper? Comparisons, sigmoid of a difference, log-odds Ask people which they prefer ⚪ Planned
13 13-nanochat Can we see the whole pipeline, start to finish? Estimation, units, budgets, evaluation statistics Rebuild it small to understand it ⚪ Planned
14 14-what-we-know-now What’s new, and what’s still a mystery? Rotations (sin/cos), top-k routing, averages over samples Open the box ⚪ Planned

Status key: 🟡 in progress · ⚪ planned · 🟢 ready to teach · 🔵 classroom-tested.


Lesson by lesson

01 · 01-the-guessing-machine · 🟡 In progress

02 · 02-numbers-that-mean-things · ⚪ Planned

03 · 03-tables-that-transform · ⚪ Planned

04 · 04-sliding-downhill · ⚪ Planned

05 · 05-the-fake-neuron · ⚪ Planned

06 · 06-blame-flows-backward · ⚪ Planned

07 · 07-the-babbling-network · ⚪ Planned

08 · 08-words-as-places · ⚪ Planned

09 · 09-memory-problems · ⚪ Planned

10 · 10-just-look-back · ⚪ Planned

11 · 11-nanogpt · ⚪ Planned

12 · 12-parrot-to-assistant · ⚪ Planned

13 · 13-nanochat · ⚪ Planned

14 · 14-what-we-know-now · ⚪ Planned


Branches: where the side paths split off

Branches are optional. A branch is good for:

Each branch notes the main-path lesson you need first.

Branch Splits off after Rejoins at Why it matters
branch-information-theory 01 (Shannon) 07, 11 Bits, entropy, and compression. Cross-entropy (07) and “a good predictor is a good compressor” (11) come straight from here. Shannon’s 1948 paper is the root.
branch-classic-ml 02 / 04 07 Nearest neighbors, linear regression, decision trees, and support-vector machines (Cortes & Vapnik, 1995). Not every problem needs a neural net: use the smallest tool that works.
branch-symbolic-ai 05 14 The other road: the Dartmouth workshop (1956), ELIZA (Joseph Weizenbaum, 1966), and expert systems in the 1970s–80s. Hand-written rules vs learned weights, and why the field went through “AI winters”.
branch-vision 03 / 06 10 Images are grids of numbers. Yann LeCun’s convolutional networks (1989), ImageNet (Fei-Fei Li and colleagues, 2009), and AlexNet (Krizhevsky, Sutskever & Hinton, 2012) restarted deep learning, before the Vision Transformer (2020).
branch-reinforcement-learning 04 12, 14 Learning from rewards instead of answers. Arthur Samuel’s checkers program (1959; his abstract describes “Two machine-learning procedures”), TD-Gammon (Gerald Tesauro, 1992), Atari-playing DQN (DeepMind, 2013/2015), and AlphaGo (2016). It powers RLHF (12) and reasoning models (14).
branch-memory-networks 08 / 09 10 Other ways to remember: Hopfield networks (John Hopfield, 1982), Neural Turing Machines and Memory Networks (2014), and retrieval-augmented generation (Lewis et al., 2020). This is how assistants “look things up”.
branch-generative-images 08 — Variational autoencoders (Kingma & Welling, 2013), GANs (Goodfellow et al., 2014), and diffusion models (Sohl-Dickstein et al., 2015; Ho et al., 2020). Covers consent and deepfakes as a conversation about honesty.
branch-state-space 09 14 RNN-like models that train fast: S4 (Albert Gu et al., 2021) and Mamba (Gu & Dao, 2023). Is attention the only way? Shows that a research question is still open.
01 ─ 02 ─ 03 ─ 04 ─ 05 ─ 06 ─ 07 ─ 08 ─ 09 ─ 10 ─ 11 ─ 12 ─ 13 ─ 14
 │    │    │    │    │    │    ▲    │    │    ▲    ▲    ▲         ▲
 └ information-theory ───────┘    │    │    │    │    │         │
      └ classic-ml (02/04) ──────┘    │    │    │    │         │
                     └ symbolic-ai (05) ─────────────────────────┘
           └ vision (03/06) ──────────────────┘    │
                └ reinforcement-learning (04) ─────────┘ (12, 14)
                                    └ memory-networks (08/09) → 10
                                    └ generative-images (08)
                                         └ state-space (09) → 14

Cross-cutting threads

These run through every lesson instead of living in one.

The big theme: the history of AI is a history of giving machines more context. Lesson 01’s Guessing Machine sees one word of context. Recurrent networks (09) try to carry a memory and forget. Attention (10) lets every word look at every other word. And shortcuts happen when a model uses the wrong context.

Thread The question it asks every lesson Where it lives
Rules vs Learning Did a person write the rule, or did the machine learn it from examples? EXPERIMENTS.md
What did it really learn? (shortcut learning) It got the right answer. Was it for the right reason? threads/shortcut-learning.md
Recreate the Experiment What did the original researchers actually do, in their words? EXPERIMENTS.md

What did it really learn?

Stories laddered from kid-sized to grown-up. Full versions, quotes and sources are in threads/shortcut-learning.md.

# Story Audience Source
1 Clever Hans: a horse “did math” by reading tiny, unintended movements of the person asking Kids Pfungst 1907; English translation 1911 (Gutenberg)
2 A mid-1960s face-sorting machine reportedly called George Harrison a woman because of his hair (discussion only) Kids Smithsonian ⚠️ film not identified
3 Husky vs wolf: a classifier built on purpose to rely on snow Kids + adults Ribeiro, Singh & Guestrin 2016, “Why Should I Trust You?” (arXiv)
4 Chest X-rays: models could tell which hospital an image came from Adults Zech et al. 2018, PLOS Medicine (DOI)
5 “Clever Hans predictors”: a horse class that leaned on a source tag Adults Lapuschkin et al. 2019, Nature Communications (DOI)
6 Naming it: “decision rules that perform well on standard benchmarks but fail to transfer” Adults Geirhos et al. 2020, Nature Machine Intelligence (DOI)

Practice: “Pause before you prompt.” One silent minute to write your own prediction before asking Buddy. At the end of a lesson: What did the machine notice? What did it miss? What context did it ignore? What did I assume? Optional; details in the thread file.


The Math Ladder (self-study path)

This is for adults, including the owner, who want real math practice that ends at the math inside a GPT. Each rung lists:

Do the self-check without the computer first, then check your work in Python. Free practice: Khan Academy (Pre-algebra through AP Calculus AB and Statistics & Probability) and 3Blue1Brown (Essence of Linear Algebra, Essence of Calculus, Neural Networks). Search for these by name.

Rung Topic You can… Self-check Lesson
1 Fractions, ratios, percents Turn counts into fractions and percents, and compare them 12 of 40 letters are vowels. What fraction? What percent? 01
2 Basic probability Make a probability table whose rows sum to 1 Build P(next | “t”) from a short sentence 01
3 Conditional probability & sampling Use P(B | A), and sample with a die or random number Generate 10 letters by hand from your table 01
4 Coordinates & vectors Add, scale, and measure the length of vectors (Pythagoras) |(3, 4)| = ? 02
5 Dot product & cosine Compute a·b and cos θ, and interpret the sign Are (1, 2) and (2, −1) perpendicular? 02, 08
6 Matrices Multiply matrix × vector and matrix × matrix, and check shapes (2×3)·(3×4) = what shape? 03
7 Slope & rate of change Find the slope of a line and the average rate of change of a curve Slope of y = 3x + 1 between x = 2 and x = 5 04
8 Derivatives Differentiate polynomials (power rule) and check by nudging d/dx (x³ − 2x) at x = 1, two ways 04
9 Gradients & gradient descent Take partial derivatives and run 5 steps of descent by hand Minimize (w − 3)² from w = 0 with lr = 0.1 04
10 Lines as classifiers Graph w·x + b = 0 and test which side a point is on Show that no line separates XOR 05
11 Chain rule Differentiate compositions, and backprop through a graph by hand d/dx of (2x + 1)², via the chain rule 06
12 Exponents & logs Use the log rules, ln vs log₁₀, and eˣ ln(e³) = ? Why is −ln(1) = 0? 07
13 Softmax & cross-entropy Compute softmax of 3 scores, and the loss for the right answer softmax(2, 1, 0) and −ln(p_correct) 07
14 High-dimensional geometry Use cosine similarity in many dimensions, and vector analogies Find a − b + c and its nearest neighbor 08
15 Repeated multiplication Work with exponential growth and decay, and sigmoid/tanh ranges 0.9¹⁰, 0.9⁵⁰, 1.1⁵⁰ 09
16 Attention math Compute QKᵀ/√d, row softmax, and the weighted sum of V, with a mask A 3-token attention by hand with d = 2 10
17 Power laws & log-log Fit y = a·x^b on log-log axes, and use scientific notation 6 × 10⁸ params × 10¹⁰ tokens × 6 = ? FLOPs 11
18 Comparisons & log-odds Apply sigmoid to a score difference, and convert odds ↔ probability Scores 2 vs 0: P(first preferred)? 12
19 Estimation Fermi-estimate compute, time, and cost, with units GPU-hours for 4 × 10¹⁹ FLOPs at 10¹⁵ FLOP/s 13
20 Rotations Rotate a 2-D vector by θ using sin/cos Rotate (1, 0) by 90°, then by 30° 14

Suggested adult pace: one rung every 3–5 days, with 2–3 rungs running ahead of the lesson you’re on. Rungs 7–11 (calculus) are where most adults need the most time. That’s normal, and worth it.


Sources

Most of the paper citations for the lesson histories are in the Sources section of THINKING-MOVES.md. These are the extra ones used only here: