Row 0 (Query 0) attends to all N tokens. Each lit cell = one attention score computed between this query and a key.
“Like a town hall meeting where everyone hears everyone else simultaneously.”
In attention, each word (token) asks: 'which other words should I pay attention to?' Dense attention says: look at ALL of them. Every token computes a relevance score against every other token. Note: autoregressive models (GPT, LLaMA) apply a causal mask — the upper triangle is zeroed out so each token can only attend to earlier tokens.
Perfect information — every word can influence every other. But memory and compute scale as O(N²). A 10× longer document costs 100× more. Fine for short sequences, prohibitive for long ones.
Drag the slider to see real memory and compute numbers — not just O(N²). Watch Dense Attention become physically impossible while Flash and Linear stay cheap.