首页 > AI前沿 > Dual-Band Attention: Efficient LLM Inference With Lightweight Block Sparsity Estimation

Dual-Band Attention: Efficient LLM Inference With Lightweight Block Sparsity Estimation

arXiv机器学习 2026-12-02 13:00 6 阅读 查看原文

As large language models (LLMs) scale to longer context windows, the quadratic complexity of self-attention creates a severe latency bottleneck during the inference prefill phase. Existing sparse attention methods often struggle to balance computational efficiency with inference accuracy. To address this, we propose Dual-Band Attention (DBA), a training-free, dynamic sparse attention mechanism.

DBA employs a lightweight estimator utilizing dual-band sampling and tensor folding to efficiently identify high-importance attention blocks. Furthermore, it introduces a Compact Block Mask (CBM) that reduces block mask storage and guides a hardware-aligned block sparse kernel to skip computation and memory accesses for unselected blocks.

  • Evaluations using Llama-3.1-8B-Instruct demonstrate that DBA achieves a 2.07x whole-model prefill speedup over FlashAttention 2 on an NVIDIA A100 GPU and a 1.82x speedup over FlashAttention 3 on an NVIDIA H20 GPU, both at a context length of 128K tokens.
  • Compared with dense attention, DBA scores 0.5 points lower on RULER on average across six input lengths and 0.23 points higher on LongBench.
  • Additionally, in HunyuanVideo experiments, DBA achieves frame-level similarity scores comparable to those of XAttention, using dense attention outputs as the reference.

Overall, DBA provides a practical solution for accelerating long-context LLM prefill.