# Attention

Canonical page: https://www.theglitch.ai/ai-glossary/attention

The part of a transformer that scores how much every token should look at every other token when building its meaning.

[Attention, common card \#035 in The Glitch AI glossary: The part of a transformer that scores how much every token should look at every other token when building its meaning.](https://www.theglitch.ai/images/cards/glossary/attention.png?v=77ed629ae7f00327)

GLS 035 · common

Also called: Self-attention, Attention mechanism.

For: Builders

## Why it matters

Attention is why models keep track of who did what across a long paragraph, and why long inputs get expensive.

## In practice

In “Sam gave Alex the keys because she was leaving”, attention helps settle who “she” is.

## Watch for

Attention patterns are not explanations; reading them as reasons can mislead.

## Related terms

[Transformer](https://www.theglitch.ai/ai-glossary/transformer) · [Token](https://www.theglitch.ai/ai-glossary/token) · [Context window](https://www.theglitch.ai/ai-glossary/context-window)

## Sources

- [Wikipedia: Attention (machine learning)](https://en.wikipedia.org/wiki/Attention_%28machine_learning%29)

Definition updated 2026-10-29.

[The Ultimate AI Glossary (2027): every term](https://www.theglitch.ai/ai-glossary)

---

Site: [The Glitch](https://www.theglitch.ai) · [About Rabin](https://www.theglitch.ai/about) · [Agent guide](https://www.theglitch.ai/agent.md)
