Back to CatalogID: eMlx5fFNoYc
Module 1
Chapter 7 of 10: Attention in transformers, step-by-step
3Blue1Brown

Attention in transformers, step-by-step | Deep Learning Chapter 6

0:00/6:20Part 1
Strict Focus Mode

Enable camera attention tracking to prevent passive scrolling

Roadmap

Topic Checkpoints

0/4 Cleared

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.

Part 1

1. Why Attention? Contextual Polysemy

How attention enables words like "bank" or "mole" to change their representations depending on surrounding tokens in the sentence.

Part 2

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.

Part 3

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.

Part 4

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.