How it works
Scaled dot-product attention computes query-key similarities, divides by the square root of key width, applies softmax, and uses the weights to combine values.
A concrete example
In the interactive example, select a query token to see how its illustrative vector compares with the keys for three tokens.
Watch for this
Attention weights are conditional on the layer, head, and input; they should not automatically be interpreted as a complete explanation.
Try it yourself
Select each query and observe how the distribution changes. Then explore multi-head attention in the architecture walkthrough.