This February 2025 paper introduces Native Sparse Attention (NSA), a novel approach to address the computational demands of long-context modeling in large language models. NSA combines algorithmic innovations like a dynamic hierarchical sparse strategy with hardware-aligned optimizations to significantly improve efficiency. The paper highlights NSA's ability to maintain or even surpass the performance of traditional "Full Attention" models across various benchmarks, including general language, long-context tasks, and instruction-based reasoning, while achieving substantial speedups in decoding, forward, and backward propagation. It critically analyzes the shortcomings of existing sparse attention methods, particularly their failure to achieve practical speedups and support end-to-end training, thus motivating NSA's natively trainable and hardware-efficient design. NSA's architecture incorporates token compression, blockwise token selection, and a sliding window mechanism, underpinned by a specialized kernel designed for optimal GPU utilization.
Source:
https://arxiv.org/pdf/2502.11089