弹性阈值注意力:面向长上下文解码的学习型上下文稀疏
原标题:Elastic Threshold Attention: Learned Contextual Sparsity for Long-Context Decoding
AI 摘要
该论文提出 Elastic Threshold Attention(ETA),一种端到端可训练的稀疏注意力架构,用于缓解长上下文解码中的 KV 缓存内存带宽瓶颈。ETA 通过查询表示预测动态的逐头阈值,并在训练中以退火 sigmoid 门控乘性抑制低于阈值的 logits,而非直接删除,从而避免表示坍塌并消除初始 token 上的注意力汇。作者还实现了基于 Triton 的块稀疏解码内核,并称 1.45B 预训练模型在语言建模、常识推理和长上下文检索上可媲美稠密注意力,并在最长 512K token 序列上实现相对 FlashAttention-2 的墙钟解码加速。
正文节选
Elastic Threshold Attention: Learned Contextual Sparsity for Long-Context Decoding Abstract Massive KV caches can cause severe memory-bandwidth bottlenecks during long-context decoding. Sparse attention methods mitigate this via selective loading, but that comes at a cost: rigid heuristics drop necessary context, leading to quality degradation. We introduce Elastic Threshold Attention (ETA), an end-to-end trainable architecture that achieves hardware-accelerated decoding speed without sacrificin