Attention Is All You Need
Ashish Vaswani, Noam Shazeer et al.
0
Citations
0
Influential Citations
—
Venue
2024
Year
… This paper introduces "Double Sparsity," a novel post-training sparse attention technique designed to alleviate this bottleneck by reducing KV cache access. Double Sparsity combines …
As large language models (LLMs) are deployed for increasingly long-context tasks (e.g., document summarization, code generation, multi-turn dialogue), the memory and compute cost of the key-value (KV) cache becomes a critical bottleneck. Standard attention mechanisms require storing all previous keys and values, leading to O(n) memory per layer and O(n^2) compute for attention. This paper tackles the problem head-on by introducing Double Sparsity, a post-training technique that reduces KV cache access without retraining. The significance lies in its practicality: it can be applied to any pretrained transformer with minimal overhead, making it highly relevant for production systems where model updates are costly.
The paper addresses a pain point that many AI practitioners face: how to scale inference to longer sequences without exploding memory. By combining two forms of sparsity—token sparsity (which keys/values to attend to) and channel sparsity (which feature dimensions to use)—Double Sparsity achieves multiplicative compression. This dual approach is more effective than either sparsity alone, as it exploits redundancy in both the sequence and feature dimensions.
Double Sparsity provides a practical, training-free solution to one of the most pressing challenges in LLM inference: memory-bound attention for long sequences. Its impact is twofold: (1) it enables longer context windows on existing hardware without model changes, and (2) it reduces latency for real-time applications like chatbots and code assistants. The technique is complementary to other optimizations (e.g., quantization, speculative decoding) and can be stacked for further gains. For AI practitioners, this paper offers a ready-to-implement method that balances efficiency and quality, making it a valuable addition to the deployment toolkit.
Ashish Vaswani, Noam Shazeer et al.
Jakubův, Jan, Chvalovský, Karel et al.
Pauli Virtanen, Ralf Gommers et al.
Tom B. Brown, Benjamin Mann et al.