Self-attention is content-dependent mixing: it combines token representations according to relationships computed from the sequence, while positional information determines what order the mechanism can distinguish. This course develops a precise mental model of transformer attention, from QKV projections and causal masking through multi-head structure, numerical behavior, efficiency tradeoffs, and reference implementations. It is designed for ML engineers who need to reason about attention mathematically, diagnose implementation bugs, and make defensible choices when debugging or optimizing real LLM systems.
The course covers content-dependent mixing, QKV projections, tensor shapes, causal masking, multi-head subspaces, absolute and relative positional information, softmax stability, attention FLOPs and memory, KV caching, framework implementations, and unit checks.