Inside the model / an interactive field experiment
Follow the representation.
A token enters a block. Attention gathers context; feed-forward processing changes the representation. Residual paths carry it onward.
For x = 2, equal weights on values 1 and 3 give attention update a = 2. Residual h = 4. The toy feed-forward update max(0, 0.5h − 1) = 1, so y = 5. The reading below remains available without JavaScript.
Listen to this experiment
Highschool · locally generated Kokoro Heart narration. The transcript follows the audio. Optional guided snapshots show the main example from each paragraph; they do not claim word-level timing.
Read the complete narration transcript
Follow the representation. This scene is a small numerical model of two ideas: attention gathers context, and a feed forward operation transforms each position. It is not a trained transformer.
Start with the number two. Give equal weight to the values one and three. Their weighted average is two. Add that attention update to the starting number to get four. Our toy feed forward rule takes half of four, subtracts one, and keeps the result if it is positive. That gives one. Add this update to four to get five.
Use Workbench to change the attention weight. Before stepping forward, predict which operation mixes information across positions. Attention does that. The position wise feed forward operation does not. Residual additions keep a direct path from the incoming representation.
The result can enter another block. It is not yet a word. Real models use vectors, multiple attention heads, positional information, normalization, and learned projections. Use Field Notes for the source and the limits of this example. Still mode preserves every explanation without animation.
Context, transformation, continuity
Attention lets a token representation use information from permitted positions. A feed-forward sublayer then transforms each position separately using shared learned weights. Residual additions preserve a direct path for the incoming representation alongside each update.
One block is not the whole model. Blocks repeat, and a later output projection converts final representations into vocabulary scores. A token does not become a human-readable word after each block.
The mathematical boundary
Scaled dot-product attention is softmax(QKᵀ / √dₖ + mask)V. The original position-wise FFN is max(0, xW₁ + b₁)W₂ + b₂. Our scalar arithmetic illustrates weighted combination and two residual additions; it omits projections, heads, positional information and normalization. It is not an executable trained transformer.
The original paper uses post-normalization. Many later decoders use pre-normalization and different feed-forward activations. This scene does not prescribe the norm placement of any specific model.
Source and scope
Attention Is All You Need · sections 3.1–3.3. The scene’s numbers and outcomes are authored teaching fixtures. No model inference or performance benchmark is being run.
Keep exploring
Dedicated scene narration and its transcript are available above. Existing lesson narration remains available in the connected lesson. Scene controls stay in this tab and do not change your saved lesson or study-coach progress.