Grant Sanderson (3Blue1Brown) — Transformers, the Tech Behind LLMs
3Blue1Brown · Deep Learning, Chapter 5
Grant Sanderson · 3Blue1Brown · Deep Learning Chapter 5
Answer Three Quick Questions
You just watched. Answer these three questions now, while the video is fresh.
- 1What stood out to you most in this video?
- 2What is one thing you will do because of what you watched?
- 3When and where will you do it?
Sign in to answer. Your answers save as part of your submission for this video.
Sanderson Transformers 7-Day Sprint
Every step below says three things: what to do, how to do it, and where it happens.
Day 1 — Play the predict, sample, repeat loop by hand with any sentence
How: Open the step on this sprint page, read the brief, and write your answer to the step prompt on the page. At each word, write the two or three likeliest next words with rough chances, just as the model does.
Where: On this sprint page
Day 2 — Sketch the flow inside a transformer, then rewatch the segment and correct it
How: Rewatch the inside a transformer segment on the video page and correct your one page sketch in a second color as you watch. Then note on this sprint page which stage is still a black box for you.
Where: On the video page
Day 3 — Write the premise of deep learning in your own two sentences
How: Open the step on this sprint page, read the brief, and write your answer to the step prompt on the page. Include the honest unknown, because being precise about what is not known is part of the lesson.
Where: On this sprint page
Day 4 — Place six words from your field on a simple two axis map, by hand
How: Open the step on this sprint page, read the brief, and write your answer to the step prompt on the page. Choose your two axes, place the words, and notice the choices you made. That is embedding work, done by hand.
Where: On this sprint page
Day 5 — List three kinds of information in your field that could share one space
How: Open the step on this sprint page, read the brief, and write your answer to the step prompt on the page. For each kind, write one sentence on what a shared space could make possible and one on what it could get wrong.
Where: On this sprint page
Day 6 — Ask an AI tool the same open question twice and compare a safe and a surprising answer
How: Try the two asks first, one framed for the safest answer and one for the most surprising. Then come back to this sprint page, read the brief, and write your answer to the step prompt, noting what temperature likely did.
Where: On this sprint page
Day 7 — Draw the full transformer flow from memory and teach it to one person
How: Teach the flow to one person in your own day first, using a real sentence of your choosing, and note their questions. Then come back to this sprint page, read the brief, and write your answer to the step prompt.
Where: In your own day.
Key Themes from the Lesson
Predict, Sample, Repeat
Strip away the mystique and a language model does one thing: given the text so far, it predicts a probability for every possible next token, samples one, appends it, and repeats. Everything else is machinery in service of that loop.
Meaning as Direction
Words enter the model as embeddings: lists of numbers, thousands long, where meaning lives in direction. Words used alike sit near each other; relationships become geometry. The machine does not store definitions — it stores positions.
The Premise of Deep Learning
Midway, Sanderson states the bet underneath all of it: a flexible function with millions of tunable numbers, fit to enormous data, will generalize — behave sensibly on inputs it has never seen. The transformer is that bet, industrialized.
Embeddings Beyond Words
The same trick works past language: images, audio, and other data can be embedded into the same kind of space. That is how one architecture grows many senses — a shared geometry for different kinds of input.
Temperature: A Dial on Caution
At the output, softmax turns scores into probabilities and temperature stretches or sharpens them. Low temperature: the model plays it safe and repetitive. High: it wanders, inventively and sometimes wrongly. A small dial with a visible character.
Connected to the Voice Up Trilogy
The Naming Gap — Naming What Matters
Transformer, embedding, attention, softmax: four words that gatekeep most AI conversation. This chapter names each one with a picture attached, and the conversation stops being gated.
A Time for Purpose — Living What You Name
A model becomes what its training shaped it to be, then samples its future one token at a time. The human version is familiar: we too are formed by what we have taken in, and we choose our next word anyway.
Miracle Has a Monster — Facing What Stands in the Way
The monster, for most learners, is the diagram — the famous transformer figure that looks like a circuit board for a spaceship. Sanderson walks through it wire by wire until it reads as a story about data in motion.