Attention and the context window 00:00:01 A parcel with a pronoun The tiny word “it” on Ren's packing slip points backward. Under his transparent reading head, one earlier word lights up three times as strongly as another. Follow those two wires to see what their light actually contributes. Self-attention lets a position mix information from other eligible positions. Queries score keys and the normalized scores weight the corresponding values. In a decoder, a causal mask limits each position to its available past. The context window limits which positions can exist in the first place. Freeze one query at one position. Give the two eligible value wires eight units and four units. We can now calculate what leaves that head without guessing what an entire model believes. 00:00:54 Inside one attention head At the position for It, the model can use earlier permitted positions. The example isolates two candidate keys to make one attention head’s calculation visible. After masking, assume the two allowed positions have these scaled scores. Softmax assigns weights 0.75 and 0.25. Later positions receive no causal attention here. For scalar values 8 and 4, the head outputs 7. A real head combines vectors, and subsequent heads and layers can change the representation. The softmax runs across eligible keys for each query. The mask M suppresses forbidden positions. With two allowed weights 0.75 and 0.25 and scalar values 8 and 4, the output is 7. 00:01:51 The envelope that never arrived A transformer block mixes information across positions through attention and transforms each position through a feed-forward network. Residual connections carry information between layers. At generation time, the final hidden representation is projected into vocabulary scores. A decoder uses a causal mask so a position cannot read later tokens. Trace three positions through a decoder block. At position two, the causal mask allows positions one and two and hides position three. Each position produces a query, a key and a value. Query–key scores determine how much each permitted value contributes to the output. Different heads learn different projections. A high attention coefficient describes one internal weighted sum. by itself it cannot establish why an entire model produced its answer. If two eligible value vectors are (1, 0) and (0, 2), weighting them one quarter and three quarters yields (0.25, 1.5). Compare identical contexts with the supporting passage near the start, middle and end. Keep question, distractors, and total length fixed. A larger advertised context limit alone tells you little about retrieval of a particular fact at each position. Move the only warranty exception from paragraph two to paragraph forty. An answer change isolates sensitivity to placement from the cost of adding more text. A support assistant may lose an important exception either because it fell outside the supplied input or because the model failed to use it. Record the actual input first. Then compare performance at different evidence positions and inspect whether preserving the same facts in less text improves the answer. 00:03:48 Which evidence is still there? The source paragraph was truncated before inference. Can raising its attention weight recover it? Only positions present in the actual input or eligible cached prefix can participate. A larger attention score cannot recover omitted text. A bright wire can redirect available information. To use an excluded page, Ren has to put that page back in the input and run the request again.