Dual-Band Attention: Efficient LLM Inference With Lightweight Block Sparsity Estimation
Zheng Liu, Kaixin Huang, Jiaxi Li, Meng Hao, Weizhe Zhang, Hui He
Abstract
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.
Create a lesson
Metadata
- Categories
- cs.LG, cs.AI, cs.PF
- Comments
- 12 pages, 13 figures, under review
Related papers
Shorter Sequences, Faster Models: Sequence Length Compression as a Stackable Primitive for LLM Training and Inference
Shared title terminologycs.LGMarc Neumann
Geodesic Tensor Diffusion for Estimation of the Local Riemannian Metric in Machine Learning
Shared title terminologycs.LGAlexandre L. M. Levada
BlockDTW: Efficient, Parallel and Differentiable Time-Series Alignment for Neural Learning Systems
Shared title terminologycs.LGAlberto Zancanaro, Leonardo Badia, Giulia Cisotto
Tabular Selective Attention
Shared title terminologycs.LGRohith Saai Pemmasani Prabakaran, Daniel De Dios Allegue, Nour Shaheen et al.
Refresh or Reweight? Two Kinds of Training-Inference Mismatch in LLM Reinforcement Learning
Shared title terminologycs.LGRunguo Li, Dezhen Lu, Lingxiang Gao
ALPS: Annealed Local Penalties for Efficient Sobolev Regularization on Implicit Neural Representations
Shared title terminologycs.LGRichard F. M. Lim, Jeová Farias Sales Rocha Neto