How Transformers Work
The Transformer ("Attention Is All You Need", Vaswani et al., 2017) replaced recurrence with attention: every token can directly look at every other token in one step. That made training massively parallel on GPUs, and it is the architecture underneath essentially every modern LLM.
In this lesson
- The big picture (decoder-only LLM)
- Self-attention in one paragraph
- Multi-head attention
- Positional information
- The feed-forward block
- Residuals and normalization
- Three families
- Cost of attention
This lesson is part of AI Engineering. Unlock the full course to read it, take the quiz and track your progress.