Exact matrix projections, scaled dot-product attention, and softmax computations
The source computes queries keys and values by multiplying input X with separate weight matrices. For a hypothetical input row one two and identity query weights, the query stays one two. Dotting that query with keys one zero and zero one gives scores one and two. The bars use two hundred pixels per score. These numbers illustrate the source operations, not a trained linguistic representation. With model dimension four, enabled scaling divides scores by two. Softmax of scores one two assigns the second key about zero point seven three one one. Softmax of one half one assigns it about zero point six two two five. The bars use six hundred pixels per probability. Subtracting the row maximum stabilizes exponentials without changing the ratio. This toy matrix has no trained language model or optimized loss. For hypothetical value scalars zero and ten, the unscaled row weights produce about seven point three one one, while the scaled weights produce six point two two five. The bars use sixty pixels per output unit. The source multiplies its full attention matrix by V; each output row is a weighted combination of value rows. A high weight describes this configured matrix, not a validated explanation of real model reasoning.