SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefilling

Xiaodong Ji, Hailin Zhang, Fangcheng Fu, Bin Cui

Introduction

As Large Language Models (LLMs) advance toward "ultra-long" context windows of 128K tokens and beyond, the prefilling stage—where the model processes the initial prompt—has emerged as a massive computational bottleneck. The primary culprit is the self-attention mechanism, which scales quadratically ($O(N^2)$) with sequence length. Doubling the prompt length effectively quadruples the computational workload.

While it is well-documented that attention maps are inherently "sparse" (meaning most tokens do not actually attend to the majority of other tokens), existing methods to exploit this sparsity have significant flaws. Static patterns, such as sliding windows, often miss critical information, exacerbating the "lost in the middle" phenomenon. Conversely, dynamic methods that attempt to find important regions on the fly are typically either too coarse-grained—missing fine details—or too computationally expensive to justify their use.

To address this, researchers have introduced SALE (Low-bit Estimation for Sparse Attention), a training-free, fine-grained sparse attention framework. SALE accelerates the prefilling stage of long-context LLMs by over 3.3x by using ultra-fast 4-bit quantization to "preview" the attention map. This allows the model to identify crucial regions and skip over 90% of the computation with negligible loss in accuracy.

The SALE Methodology

SALE relies on two primary innovations to find the "needles in the haystack" without incurring heavy computational overhead:

1. Low-bit Attention Weight Approximation

Instead of calculating the full-precision (FP16) attention map to locate important blocks, SALE utilizes 4-bit (Int4) quantization. Modern GPUs, such as the RTX 4090, feature specialized Tensor Cores capable of processing 4-bit mathematics up to 8x faster than 16-bit operations. This hardware advantage allows SALE to generate a "rough draft" of the attention map with minimal latency overhead.

2. Relative Attention Score (RAS)

Standard sparse attention methods often rely on a fixed threshold to determine if a block is "important." However, attention values can vary wildly across different heads and layers. To solve this, SALE introduces a relative metric. It compares the estimated weights of a target block against the weights of the "sink" (the very first tokens) and "local" (the most recent tokens) regions. Because these specific regions are almost universally important in LLM processing, they serve as a robust, dynamic baseline for evaluating importance.

3. Two-Pass Execution

SALE splits the attention computation into two distinct, highly optimized CUDA kernels:

  • Selection-Pass: Utilizes the 4-bit preview and the RAS metric to construct a sparse mask of important blocks.
  • Computation-Pass: Executes the actual, high-precision attention mathematics (using 8-bit quantization via SageAttention) exclusively on the blocks identified during the selection pass.

Key Insights

The development and testing of SALE yielded several notable insights into sparse attention mechanisms:

  • Fine-Grained Outperforms Coarse-Grained: Previous state-of-the-art methods (e.g., MInference or SpargeAttn) often use "representative tokens" to estimate the importance of entire data chunks. SALE demonstrates that evaluating every element—even at a very low 4-bit "resolution"—produces significantly more accurate attention masks.
  • The "One-Pass" Trap: Intuitively, computing and pruning in a single step seems more efficient. However, the authors discovered that a "Two-Pass" design is actually faster on GPUs. It avoids the heavy synchronization (all-reduce) overhead required to make on-the-fly pruning decisions within a single kernel.
  • Sparsity as a Noise Filter: On certain benchmarks, such as those tested with Qwen-3, SALE actually improved overall model accuracy. By accurately identifying and skipping unimportant regions, the method effectively acts as a noise filter, helping the model focus strictly on the most relevant context.

Performance and Results

The researchers evaluated SALE across three major long-context benchmarks: LongBench (diverse tasks mostly <32K tokens), InfiniteBench (100K+ token tasks like "Retrieve.KV"), and RULER (a synthetic benchmark for effective context length). Tests were conducted on models including Llama-3.1-8B, Qwen3-4B, and Qwen-2.5-32B.

  • Significant Speedups: SALE achieved at least a 3.36× speedup on Llama-3.1-8B for sequences longer than 64K. At 128K tokens, the speedup scaled to 3.88×.
  • Minimal Accuracy Loss: Across LongBench and InfiniteBench, SALE maintained performance nearly identical to the "Full Attention" baseline, outperforming competing sparse methods like FlexPrefill and MInference.
  • Low Overhead: The "Selection-Pass" (the 4-bit preview) accounts for only about 11% of the total attention latency, making it a highly cost-effective mechanism for bypassing unnecessary computation.

Limitations and Future Work

While highly effective for long contexts, SALE does have limitations. First, it exhibits an 8K token floor: if a prompt is shorter than approximately 8,000 tokens, the overhead of the 4-bit estimation exceeds the computational time saved. Second, the method is strictly designed for the prefilling stage and does not address the memory-bound decoding stage. Finally, SALE is currently hardware-specific, relying heavily on Int4 Tensor Core instructions; its advantages may diminish on older hardware or architectures (like Apple Silicon or AMD) that handle low-bit math differently.

Future iterations of SALE will explore even lower-precision formats, such as FP4 or LUT-based quantization, to further reduce the selection overhead and push the boundaries of efficient long-context LLM inference.

Summary updated

BibTeX
@inproceedings{ji2026sale,
  author = {Xiaodong Ji and Hailin Zhang and Fangcheng Fu and Bin CUI},
  title = {{SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefilling}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=WyGEJKjvJN},
}
Figure