What is sparse attention?

Definition

Sparse attention is an attention pattern that limits which token pairs interact. Instead of computing every possible relationship in a sequence, the model uses local windows, selected global tokens, learned routing or another structured subset.

Reducing the number of comparisons can lower memory use and serving cost, especially for long contexts or media generation. The tradeoff is that a poorly chosen sparse pattern may miss important distant information, so designs must preserve the connections needed by the task.

Frequently asked questions

How does sparse attention improve efficiency?

It computes fewer token-to-token relationships than full attention. This can reduce memory and processing requirements as the input sequence grows.

Does sparse attention reduce model quality?

It can if the pattern excludes useful information. Well-designed methods preserve important local and global connections while avoiding many low-value comparisons.

Videos explaining sparse attention

  1. The Week Open Models Closed the Gap
    AI Search43:531 VIEW