Why is long-context self-attention expensive?
Reveal the answer and explore the explanation.
14MediumHigh priorityWhy is long-context self-attention expensive?
Answer
MediumHigh priority
Why is long-context self-attention expensive?
Answer
Standard dense self-attention computes pairwise token interactions, requiring quadratic work in sequence length for those interactions.
Practical example
Double sequence length and observe a fourfold increase in attention score entries.
Reference: Further reading ↗