In the last three chapters, we uncovered the two core engines inside a Transformer: Attention, which lets words pass context to one another, and the Memory Vault (feed-forward layers), which recognizes patterns and recalls facts.
Here is the puzzle. A single pass of Attention plus one Memory Vault is surprisingly nearsighted. It can glue Eiffel and Tower together into a single landmark, or notice that is pairs with located. Yet it cannot simultaneously parse a whole paragraph, resolve a tricky pronoun, recall geography, and pick the exact tone of the sentence — all in one leap.
How does a modern language model build deep understanding out of such simple pieces? It doesn't invent a brand-new machine for grammar, another for facts, and another for logic. Instead, it builds a skyscraper: dozens of identical floors stacked one on top of another, connected by a glowing vertical highway called the residual stream.
The Residual Stream: A Shared Elevator
Imagine a glass elevator rising through a 12-story building. On the ground floor (Floor 0), our sentence steps inside carrying only raw token embeddings — bare word meanings with zero awareness of their neighbors.
On every floor, two teams wait beside the shaft: an Attention team and a Memory Vault team. When the elevator pauses at a floor, those teams do not rip up the passenger's luggage and replace it. Instead, they peek inside, jot down a fresh discovery on a glowing sticky note, and add it to the stream.
Drag the floor slider below — or click any floor directly on the tower — to ride upward with the sentence "The Eiffel Tower is in the city of" and watch its bundle of meaning grow richer without losing a single early detail.
Think of the residual stream as a shared notebook passed up the skyscraper. Floor 1 writes "Eiffel + Tower = famous landmark." Floor 4 reads that note and adds "the blank needs a city name." Floor 8 reads both notes and adds "Paris!" Because nothing is erased, deep floors can combine clues written ten stories earlier.
Peeking Inside Early vs. Deep Floors
This raises an intriguing experiment that AI researchers actually run on real models. Normally, we only ask the model for its next-word guess at the very top floor (say, Layer 12, or Layer 96 in a giant model).
What happens if we interrupt the elevator early — say at Layer 2, or Layer 5 — and force the model to make its best guess right then and there? Researchers call this trick the Logit Lens, and watching it in action feels like watching a blurry camera slowly snap into crystal-clear focus.
Scrub the Layer Depth slider below for the prompt "The Eiffel Tower is located in the city of ___". Compare the heights of the five candidate bars at shallow floors versus deep floors.
Why Skip Connections Save the Signal
Before Transformers, stacking dozens of neural network layers was notoriously brittle. If Layer 1 had to completely rewrite the message and hand it to Layer 2, which rewrote it for Layer 3, and so on for 12 or 96 floors, something terrible happened: the game of Broken Telephone.
Even a tiny smudge of distortion on each floor multiplies across dozens of floors. By Floor 10, the original sentence has dissolved into fuzzy static — and during learning, the feedback signal trying to travel back down to Floor 1 fades out completely.
The residual stream solves this with one deceptively simple architectural move: a skip connection. Instead of forcing the whole message through every layer, the main highway bypasses each floor untouched, while the floor only contributes a gentle side-branch update.
Toggle between Broken Telephone and Shared Notebook below — or compare them side-by-side — and turn up the per-floor distortion slider to see why skip connections are the backbone of deep AI.
Step back and admire what you now understand: text is chopped into tokens, placed on a map of meaning, and sent riding up a skyscraper of Attention and Memory Vault floors along a shared residual stream. At the roof, the final bundle is turned into probabilities for the next word. In Part III, we ask the most magical question of all: how do all the dials inside these floors learn what to do?
Check Your Intuition
Why can a Transformer stack 50 or 100 layers on top of each other without losing track of the original words at the bottom?