Lesson 1: The whole model, traced shape by shape
29 min read·13 Oct 2026
Module 5 · Lesson 1 · About 50 minutes · Needs: Module 3's lab (tinyformeratv0.3.0); Module 2, Lesson 4 (the causal mask)
The situation
Sol 409 at Aurora Station. Kofi Mensah, the Reliability Engineer, opens tinyformer/model.py for review. "Every tensor in here is (32, 128, 128). Which 128 is time and which is width? If you swapped them, would anything tell you?"
This lesson answers him: the model end to end, one batch traced shape by shape, named axes, a free shape checker, and three bugs that keep every shape right. The running example is the first validation batch, whose row 0 begins "airlock motor. Bruno Hoffman works in th".