The GPT model of the course notebooks and Point Transformer V3, built side by side in five lessons. Every lesson answers the question the previous one raised, and every concept is defined once, with a hand-checkable example, the book's figure for the text instance and a figure drawn from the course's car point cloud for the 3-D instance, and the real output of the code that computes it.
Read both rows before zooming in. The numbered stages are the five lessons; every stage is a link.
The two pipelines, drawn with real values. Top: the five lessons and their questions. Bottom: GPT-2 small and PTv3 from input to output, book Figure 2.4 style; the token ids are tiktoken's, the cells and codes are the car's. Each lesson's page repeats this figure with its own rows marked.
How does the input become a sequence of integers?
unit · id · encode/decode · unknown input · groups for attention
How does an integer or a point become a vector, and where is position?
embedding · order blindness · absolute table vs relative conv (xCPE)
How does one vector absorb its context?
context vector · score · softmax weights · q k v · scaling · the layer · vector vs scalar
What must attention not see, and how do groups exchange information?
causal mask · −∞ trick · dropout / Shuffle Order · Shift Order · multi-head
How are the pieces stacked into a model, and run?
LayerNorm · GELU-MLP · shortcuts · block · grid pooling · model · generate / label
| Lesson | Question | What we build | Hands on to the next lesson |
|---|---|---|---|
| 01 Tokens | How does the input become a sequence of integers? | regex tokenizer, vocabulary, BPE, sliding windows · grid cells, Z/Hilbert codes, sort, patches | Integers are labels. The network needs vectors. |
| 02 Embedding | How does an id or a point become a vector, and where is position? | nn.Embedding + position table · linear stem + xCPE toy conv | Vectors that know their position, but not each other. |
| 03 Attention | How does one vector absorb its context? | simple → trainable → scaled attention on six words and on three points | Attention sees everything in its group. Should it? Can it see beyond? |
| 04 Mask & interaction | What must attention not see, and how do groups talk? | causal mask, −∞, dropout, heads · no mask, Shift/Shuffle Order, heads over patches | One attention is one sub-layer. A model is a stack. |
| 05 Block & model | How are the pieces stacked, and run? | LayerNorm, GELU, shortcuts, block, GPTModel, generate · PTv3 block, grid pooling, U-Net on the car | Back to lesson 1: ids out, decode. |
tools/make_figs.py from the numbers in outputs/, so they change when the code changes.code/run_all.sh runs the scripts, python3 tools/make_figs.py redraws the figures, python3 build.py rebuilds these pages.