Attention in transformers, step-by-step | Deep Learning Chapter 6
Enable camera attention tracking to prevent passive scrolling
Topic Checkpoints
Active Topic: 1. Why Attention? Contextual Polysemy
How attention enables words like "bank" or "mole" to change their representations depending on surrounding tokens in the sentence.
Turn This Lesson Into A Hands-on Project
Apply concepts taught in this video to a structured implementation roadmap.
1. Why Attention? Contextual Polysemy
How attention enables words like "bank" or "mole" to change their representations depending on surrounding tokens in the sentence.
2. Queries, Keys & Dot-Product Attention Scores
How Query vectors (what a word asks for) and Key vectors (what a word advertises) compute alignment scores via dot products.
3. Causal Masking & Value Vector Accumulation
Applying lower-triangular causal masks so tokens cannot peek into future words, and weighting Value vectors by attention scores.
4. Multi-Head Attention & Output Projection Matrices
Splitting embeddings across multiple parallel attention heads (e.g. 96 heads) and recombining them through the output matrix W_o.