Awesome Testing

Lesson 05 · Attention gathers context

Which earlier positions should “too” consult before the model predicts the next token?

Unfinished prompt

The animal did not cross the street because it was too

01 · Smallest useful mechanism

Move the right clue to the right place

Attention lets a token position gather information from other positions. A useful mental model is: the current position asks a question, earlier positions advertise what they contain, and the best matches contribute information to the current state. In a text-generating model, a causal mask prevents reading future tokens. Multiple heads perform different learned searches in parallel. The resulting weights control a mixture of information; they are not a database lookup or a complete human-readable explanation. High attention to a token says that one head routed information from that position in this computation. It does not prove that the token caused the final answer or that the model understood it in a human sense.

Each position gathers a weighted mixture of information from allowed positions.

02 · Experiment

Test the prediction

Calculate by hand · exact teaching head

The 2D head is an exact small calculation. A future model trace would require explicit tensor provenance.

Loading the experiment…

03 · Production-minded practice

Test an attention interpretation

Commit to a written claim and evidence plan. The Lab stores the draft locally and never sends it to a server.

Your learning artifact

Write the argument you would defend

Stored only in this browser. No account required; course reset does not delete it.

04 · Check your understanding

What does one attention row sum to after softmax?

Optional referenceDeep dive / reference chapterOpen the complete essay, diagrams, mathematics, exercises, glossary, and sources when you want more depth.

Next: The attention output is not the final answer. It is added to the shared residual stream, followed by more block updates.