arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2510.01718cs.LG
收藏

基于基分解加速注意力机制

Accelerating Attention with Basis Decomposition

Jialin Zhao

AI总结:

提出BD Attention(BDA),通过基分解将多头投影重构为紧凑形式,实现无损且架构无关的注意力加速,在DeepSeek-V2-Lite上KV投影加速34%、权重减小25%,困惑度仅增0.02%。

摘要:

注意力是大语言模型(LLMs)中的核心操作。我们提出了BD Attention(BDA),一种无损的注意力算法性重表述。BDA通过基分解(BD)的一个简单矩阵恒等式实现,该恒等式将多头投影重构为紧凑形式,同时保持精确输出。与FlashAttention等I/O感知的系统优化不同,BDA提供了数学上保证的加速,且与架构无关。在DeepSeek-V2-Lite(16B,FP16)上,BDA仅需4秒离线准备,无需重新训练,在现代GPU上实现了34%更快的键/值投影和25%更小的权重,同时困惑度(PPL)仅增加0.02%(FP16)或0.0004%(FP32),对模型性能的影响可忽略。这些结果将BDA定位为一种理论上精确的无损注意力加速方法,与现有的工程级优化互补。我们的代码可在以下网址获取:this https URL。

英文摘要:

Attention is a core operation in large language models (LLMs). We present BD Attention (BDA), a lossless algorithmic reformulation of attention. BDA is enabled by a simple matrix identity from Basis Decomposition (BD), which restructures multi-head projections into a compact form while preserving exact outputs. Unlike I/O-aware system optimizations such as FlashAttention, BDA provides a mathematically guaranteed acceleration that is architecture-agnostic. On DeepSeek-V2-Lite (16B, FP16), BDA requires only 4s of offline preparation with no retraining required and, on modern GPUs, achieves 34% faster key/value projections and 25% smaller weights, while increasing perplexity (PPL) by just 0.02% (FP16) or 0.0004% (FP32), a negligible effect on model performance. These results position BDA as a theoretically exact method for lossless attention acceleration that is complementary to existing engineering-level optimizations. Our code is available at https://github.com/abcbdf/basis-decomposition-official.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑