Sliding Window Attention: Context Length Champion

Mistral's Sliding Window Attention (SWA) enables efficient processing of long context windows by limiting each token to attend only to a fixed local range, reducing computational complexity from O(n^2) to O(n*w) and capping KV cache memory growth, making it practical for extensive inputs.

Sources

Open the full topic