2k tokensrelative compute
8k tokens16
32k tokens64
128k tokens256
Self-attention computes a score between every pair of tokens, so both compute and memory for the attention matrix scale as in sequence length (for a fixed model width). Doubling the context roughly quadruples the attention cost — which is why simply 'stuffing more context in' has a real, nonlinear cost, not just a linear one, and why efficient-attention and KV-cache techniques exist as separate engineering efforts.