Sintra AI
Home
Live Feed
Automation Hub
Prompt Library256
AI News554
Weekly Digest
Topic Hubs
AI History
AI Labs
Research
Learning Paths
Guides
Resources
Concepts
Videos
AI Tools74
Models
Claude
Google AI
Cost Calc
Skip to content
Sintra AIConcepts
Home/Concepts/Attention Mechanism
๐Ÿ‘๏ธ
Models & AITechnical

Attention Mechanism

How a model decides which words to focus on when understanding a sentence.

Attention is the mathematical operation that lets a Transformer weigh the relevance of each token relative to every other token when building its internal representation.

For each token, attention computes three vectors: a Query (what am I looking for?), a Key (what do I represent?), and a Value (what information do I carry?). Dot products between Queries and Keys produce attention scores โ€” how much each token should "attend to" each other.

Multi-head attention runs this process in parallel across multiple "heads," each learning different relationship patterns: one might track syntactic structure, another semantic similarity, another long-range dependencies.

Why it matters for practitioners:

  • Long-range dependencies are handled naturally (no vanishing gradient)
  • Context window limits arise from the O(nยฒ) cost of computing all pairwise attention scores
  • Longer contexts cost quadratically more compute โ€” a 1M-token context requires ~1 trillion attention calculations per layer

In plain terms

When re-reading a legal contract to understand clause 7, your eyes jump back to the definitions section, skip the boilerplate, and focus on the relevant precedent โ€” attention is that selective focus, done in parallel for every word.

Related concepts

โš™๏ธ

Transformer

The architecture that made modern AI possible โ€” attention over sequences.

โฌก

Large Language Model

AI trained on vast text to understand and generate language.

๐ŸชŸ

Context Window

How much text an AI can see and remember at once.

Stay current

New prompts & AI news, weekly

No noise. Curated highlights from the library.

Newsletter signup is currently disabled.

Sintra Tesseract

A curated library of AI use cases, mapped across every way to think with a machine.

Open source ยท Free forever

Discover

Use CasesCollectionsAI Tools DirectoryAI NewsLearning PathsResources & Links

Reference

Claude & AnthropicAI ConceptsAI HistoryAI LabsGoogle AI Tools

Elsewhere

AI Keynote โ†—GitHub โ†—RSS Feed โ†—
ยฉ 2026 Sintra ยท Curated in the open.Built on the void.