Lesson 04 · Two jobs per block
Unfinished prompt
The animal did not cross the street because it was too …
01 · Smallest useful mechanism
A model passes every token state through a stack of transformer blocks. Each block has two complementary jobs. Attention lets a position gather relevant information from other permitted positions. The MLP then transforms the information available at each position independently. Residual connections add each result to a shared working state instead of replacing it, so useful information can persist while new evidence accumulates. Normalization keeps repeated updates manageable. One block usually makes only a partial refinement; depth lets many refinements compose. Think of the stack as a team repeatedly annotating the same working document, not an assembly line where each layer owns one tidy linguistic rule.
Attention communicates between positions; the MLP transforms each position.
02 · Experiment
Calculate by hand · tiny transformer block
Every displayed update is internally consistent teaching data, chosen so the residual and MLP operations remain inspectable.
One position · one block
Input R
[0.79, 0.03]
Communicate
+ [0.18, 0.31]
Compute locally
+ [-0.07, 0.22]
Output R next
[0.90, 0.56]
03 · Production-minded practice
Commit to a written claim and evidence plan. The Lab stores the draft locally and never sends it to a server.
Your learning artifact
Stored only in this browser. No account required; course reset does not delete it.
04 · Check your understanding
Next: Now isolate the communication job and calculate exactly where one position reads from.