Index Ai Academy
Glossary · Phase 5 · Transformers

Attention

Also written: self-attention

How a transformer lets each token look at the other tokens and pull in the information it needs.

Try it now

Pick "bank": it leans on "river", which is how it knows this isn't about money. These scores are illustrative, but the percentages are a real softmax.

Learn it properly

Attention: the intuition · Each token decides which other tokens matter to it. About 30 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write