Learning track
The Transformer
Assemble the architecture behind modern LLMs, beginning with self-attention and its query, key, and value operations.
core · 14 available lessons
The Transformer
Assemble the architecture behind modern LLMs, beginning with self-attention and its query, key, and value operations.
- "Attention Is All You Need" in context
- Self-attention from first principles: Q, K, V
- Scaled dot-product attention & the √d_k
- Causal masking & why order matters
- Multi-head attention
- Positional encoding I: sinusoidal & learned
- Positional encoding II: RoPE
- Positional encoding III: ALiBi & relative bias
- The feed-forward block & where knowledge lives
- Residuals, pre-norm vs post-norm
- The full block, assembled
- Encoder-only, decoder-only, encoder–decoder
- Build a GPT from scratch, annotated
- Reading real weights: what a trained model looks like