We have spent two chapters celebrating Attention — the glowing web of spotlights that lets words talk to one another. Yet if you pause for a second, you will spot a glaring mystery.
Suppose I type: Michael Jordan plays …
Attention can easily connect Michael to Jordan so the model realizes we are talking about the famous athlete rather than a random person named Michael. But the word “basketball” is nowhere in the sentence! No spotlight shining on any word in the prompt can fetch a fact that isn’t there.
So where does basketball — or Paris, or 0°C — actually come from?
Every Transformer layer has a two-beat rhythm. First, Attention lets words talk to each other across the sentence. Second, the Feed-Forward Layer (the Memory Vault) lets each word think privately and pull stored facts out of long-term memory.
1. The Two-Step Rhythm: Talk, Then Remember
Think of a group of detectives solving a case. In Step 1 (Attention), the detectives lean across the table and share clues: “Hey, ‘Eiffel’ and ‘Tower’ belong together!” In Step 2 (Memory Vault), every detective goes into a private booth — no talking to neighbors — opens their mental filing cabinet, and retrieves the matching fact: “Ah! Eiffel Tower → located in Paris.”
Switch between the three fact prompts below and step through the rhythm (or let it auto-play) to watch information flow horizontally during Attention, then vertically into the private Memory Vault.
Surprisingly, about two-thirds of all the learned parameters in a modern LLM live inside these Feed-Forward Memory Vaults — not in Attention! Attention routes the clues; the Memory Vault holds the encyclopedia.
2. Inside the Vault: Pattern-Detector Lockboxes
How does a Memory Vault actually store millions of facts? Researchers discovered a remarkably intuitive picture: inside every feed-forward layer sit thousands of tiny neurons that behave like glowing combination lockboxes.
- Each lockbox watches for a specific pattern of clues (its trigger).
- Most lockboxes stay completely dark for any given word. Only the handful whose exact combination matches flare bright gold!
- When a lockbox opens, it pours its stored association straight into the word’s meaning — nudging the next-word prediction toward Paris, Banana, or Mars.
Click a clue combo below — or type your own keywords (try french landmark, yellow curved fruit, red planet, or basketball) — and watch the matching pattern-detector lockboxes ignite!
Early on, scientists hoped every single neuron would neatly store one clean concept (one neuron for Paris, one for bananas, one for Mars). When they looked closer, they found something even cleverer — and far stranger.
3. Superposition: Packing More Ideas Than Rooms
Here is a puzzle that blew researchers’ minds. A modern language model knows millions of distinct concepts — cities, actors, programming languages, recipes, historical dates. Yet a single layer only has a few thousand independent directions (axes) to represent them in.
How can you store far more ideas than you have rooms?
The secret is that most concepts are sparse — they almost never appear at the exact same word at the exact same time. A word is almost never simultaneously “the Eiffel Tower,” “a yellow banana,” and “the planet Mars.” Because only one or two concepts fire at once, the network can pack many idea directions neatly around a shared space like spokes on a wheel — a phenomenon called Superposition.
Drag the slider below to pack anywhere from 2 to 8 concepts into a tiny 2-axis room. Notice how cleanly they fan out into symmetric spokes — and toggle Active at Once to see why superposition works brilliantly when concepts fire one at a time, but gets crowded if too many fire simultaneously.
Now zoom out and appreciate what we have built inside a single Transformer layer: first, Multi-Head Attention lets words exchange clues across the sentence; then, the Memory Vault lets each word privately consult millions of packed facts and associations.
One layer is already clever. What happens when we stack 96 of these layers on top of each other like a skyscraper? That is the journey waiting in Chapter 7.