Self-Attention, Multi-Head Weighting, Scaled Dot-Product & Next-Token Probabilities
The actual source syntactic head assigns raw score three point five to adjacent tokens, one to self and point two to other tokens. Bars share one hundred pixels per raw score and compare adjacent and self routes. These are authored rules rather than learned query-key vectors. Softmax then normalizes the full row. The visual lesson offers five selectable conceptual layer steps without executing a complete trained transformer. The code divides raw scores by square root of sixty-four times point one two five times temperature. Since eight times point one two five is one, the effective denominator is temperature. For hypothetical raw-score gap point two five, the two-route relative ratio is exponential of point two five over temperature: about one point two eight four at temperature one and one point one zero five at temperature two point five. Bars share two hundred pixels per ratio. The extra factor matters when reading the displayed general scaling formula. Four and eight tokens require sixteen and sixty-four query-key grid cells. Bars share six pixels per pair. Actual presets, four authored heads, every query chip and matrix-cell selection, all five lesson-step controls, previous/next navigation, temperature endpoints and reset must preserve full SVG, matrix, lesson and numeric outputs through genuine resize. The displayed next-token distribution uses fixed authored logits regardless of sentence or query; it is not actual model prediction. No native downloadable export exists; independent video scene approval remains separate.