Part introduction
Part I - Understanding a Language Model System
Part I follows the numerical execution of a language model: token IDs, embeddings, attention, vocabulary logits, training gradients, and cached generation. We start with one forward pass and its memory allocations, then derive the operations that implement it. The running example uses a decoder-only transformer; other generation families are introduced explicitly rather than assumed to follow the same execution loop.