DoSA:点积稀疏注意力
DoSA: Dots Sparse Attention
AI总结:
本文提出无损稀疏注意力方法DoSA,通过条件计算减少索引器的评分与选择开销,其GPU实现使Indexer及GLM-5.2、DeepSeek-V3.2的首令牌生成速度获显著提升。
摘要:
稀疏注意力仅访问少量键,但寻找这些键仍需要每个索引器头对每个键进行评分。我们提出DoSA(Dots Sparse Attention,点积稀疏注意力),这是一种无损方法,可在保留精确令牌选择的同时使该计算具有条件性。其核心观察结果是,Top-K选择需要足够的证据来拒绝候选对象,而不一定需要其完整分数。种子集为获胜阈值提供了下界;非负头投影和联合残差界对正贡献进行上界约束,而激活信息聚合则对负头减去的幅度进行界约束。该证明指导将完整评分定向到仍符合条件的候选对象,精确评分过滤进一步减少回写和选择工作。我们建立了该证明及其精确选择条件,并分析几何和选择裕度如何控制其有效性。我们的GPU实现使完整Indexer在英语、中文和代码工作负载上的速度比SGLang快2.74倍,比LiteTopK快1.69倍;在GLM-5.2和DeepSeek-V3.2上的端到端评估分别实现了比这两个基线最高1.94倍和1.50倍的首令牌生成时间加速。
英文摘要:
Sparse attention visits few keys, yet finding them can still require scoring every key with every indexer head. We introduce DoSA (Dots Sparse Attention), a lossless method for making this computation conditional while preserving exact token selection. Its central observation is that Top-K selection requires sufficient evidence to reject a candidate, not necessarily its full score. A seed set supplies a lower bound on the winning threshold. Nonnegative head projections and joint residual bounds upper-bound positive contributions, while activation-informed aggregation bounds the magnitude subtracted by negative heads. The certificate directs full scoring toward candidates that remain eligible; exact-score filtering further reduces writeback and selection work. We establish the certificate and its exact-selection conditions, and analyze how geometry and selection margins govern its effectiveness. Our GPU implementation accelerates the complete Indexer by up to 2.74 times over SGLang and 1.69 times over LiteTopK across English, Chinese, and code workloads. End-to-end evaluation on GLM-5.2 and DeepSeek-V3.2 achieves up to 1.94 times and 1.50 times time-to-first-token speedups over the two baselines, respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。