Attention

When the model writes each word, it scores every earlier word for how much it matters to this one. That scoring is attention. Hover any word below to see what it read.

For each word the model writes, every earlier word gets a score of how much it matters right now. High scores win. The model leans on them when it picks the next word.

The scores do practical work. The model copies your date instead of inventing one because the real date scores high. A pronoun stays attached to the right name the same way. Ask it to change one line of code and it reads the other twenty back, rather than remembering them.

See it happen

Try it

Hover a generated word to see which earlier words it drew from.

Precomputed. Nothing is generated live. Real attention is per layer, per head, and much richer. This shows one simplified number per word pair.

In the memo, hover a copied date or address: the same words in your request light up hard. In the bug fix, hover the reproduced code: it reads your function back almost line by line, with the corrected part drawing from the explanation.

Why it matters

The model can only lean on what is in front of it. If a fact never made it into your request, attention cannot find it. The model reaches for something similar from training instead, and that is where wrong answers come from.

Long conversations fail the same way. The old words are still there, but in a long history their scores lose to noise. A chatbot that forgets something from an hour ago still has the words in context. Their scores went quiet.

Working on this?

If AI is stuck somewhere in your business, tell me where. I read every one of these.