Beams = attention from the highlighted query token to every key. Thicker & redder = higher weight.
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Self-Attention: Scaled Dot-Product Visualizer

Transformer models decide how much each word in a sentence should "listen" to every other word through scaled dot-product self-attention. This simulator computes the real mechanism on a small toy sequence: random token embeddings are projected into Query, Key and Value vectors, dot products between the selected query and every key are scaled by √d and a temperature control, passed through softmax, and rendered as glowing 3D beams whose thickness and color encode the resulting attention weight — with a synchronized heatmap showing the full token-by-token attention matrix at once.