SparDA: Sparse Decoupled Attention for Efficient Long-Context LLM Inference
About
Sparse attention reduces compute and memory bandwidth for long-context LLM inference. However, two key challenges remain: (1) KV cache capacity still grows with sequence length, and offloading to CPU memory introduces a PCIe transfer bottleneck; (2) the sparse selection step itself retains $O(T^2)$ complexity and can dominate attention cost at long contexts. We propose SparDA, a decoupled sparse attention architecture that introduces a fourth per-layer projection, the Forecast, alongside Query, Key, and Value. The Forecast predicts the KV blocks needed by the next layer, enabling lookahead selection that overlaps CPU-to-GPU prefetch with current-layer execution. Because Forecast is decoupled from the attention query, our GQA implementation uses one Forecast head per GQA group, reducing selection overhead versus the original multi-head selector. SparDA adds $<$0.5% parameters and trains only the Forecast projections by matching the original selector's attention distribution. On two sparse-pretrained 8B models, SparDA matches or slightly improves accuracy and delivers up to 1.25$\times$ prefill speedup and 1.7$\times$ decode speedup over the sparse-attention offload baseline. By enabling larger feasible batch sizes on a single GPU, SparDA further reaches up to 5.3$\times$ higher decode throughput than the non-offload sparse baseline. Our source code is available at https://github.com/NVlabs/SparDA.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| LLM Decoding | Long Context 32K | Decode Throughput (tok/s)1.22e+3 | 48 | |
| LLM Decoding | Long Context 64K | Decoding Throughput (tok/s)1.04e+3 | 42 | |
| LLM Decoding | Long Context 96K | Decode Throughput (tok/s)930.5 | 38 | |
| LLM Decoding | Long Context 128K | Throughput (tok/s)876.9 | 33 | |
| LLM Decoding Throughput | MiniCPM4.1-8B 32K context length | Throughput (tok/s)1.36e+3 | 24 | |
| LLM Decoding Throughput | NOSA-8B 32K context length | Throughput (tok/s)2.31e+3 | 24 | |
| LLM Decoding Throughput | MiniCPM 8B 64K context length 4.1 | Throughput (tok/s)1.16e+3 | 21 | |
| LLM Decoding Throughput | NOSA-8B 64K context length | Throughput (tok/s)2.00e+3 | 21 | |
| Prefill Throughput | MiniCPM 4.1-8B | Prefill Throughput (tok/s)1.98e+4 | 20 | |
| Prefill Throughput | NOSA-8B | Prefill Throughput (tok/s)1.35e+4 | 20 |