DTS:基于差值的分块打分方法加速长上下文稀疏注意力
DTS: Delta-Based Tile Scoring for Efficient Long-Context Sparse Attention
Emre Uğur、Jiawen Qi、Qinyu Chen 提出免训练的稀疏块注意力打分方法 DTS,按局部向量变化选取 query 和 key 锚点,冗余区域用更少代表、异质区域保留更多细节,并用并行 delta packing 加速锚点选择。
论文给出免训练的分块稀疏注意力打分方法,在128K上下文下与全注意力精度差距小于0.1个百分点,并报告了打分延迟和prefill加速数据。
arXiv:2611.25938v1 Announce Type: new Abstract: Large language models (LLMs) increasingly need to process long documents and codebases, making long-context attention a major prefill bottleneck. Block sparse attention reduces computation by skipping unimportant blocks of the attention matrix, but scoring blocks accurately can itself be expensive. We propose Delta-Based Tile Scoring (DTS), a training-free, content-adaptive tile scoring method for sparse block attention. DTS selects query and key anchors according to local vector changes, using fewer representatives in redundant regions while retaining more detail in heterogeneous regions. To accelerate anchor selection, parallel delta packing partitions the query and key sequences into tile-aligned chunks and performs bounded local scans over these chunks concurrently. The selected tiles are then computed using the original query, key, and value vectors. On LLaMA-3.1-8B-Instruct, DTS keeps average RULER and LongBench scores within 0.10 percentage points of full attention, with RULER evaluated up to 128K tokens. At 128K tokens, DTS reduces measured scoring-pipeline latency by 38% compared with XAttention. On four NVIDIA H100 GPUs, it achieves a 3.3$\times$ prefill speedup over a PyTorch full-attention baseline using FlashAttention-2 at 512K tokens.
来源:arXiv (AI + Vision + Imaging) · arxiv.org