arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.10953cs.AR
收藏

SwiftKV:一种面向边界的注意力算法和多头加速器,用于快速高效的LLM解码

SwiftKV: An Edge-Oriented Attention Algorithm and Multi-Head Accelerator for Fast, Efficient LLM Decoding

School of Integrated Circuits, Hubei Key Laboratory of Advanced Memories, Huazhong University of Science and Technology(华中科技大学集成电路学院,湖北省先进存储重点实验室)

Junming Zhang, Qinyan Zhang, Huajun Sun, Feiyang Gao, Sheng Hu, Rui Nie, Xiangshui Miao

AI总结:

SwiftKV提出了一种面向边界的注意力算法和多头加速器,通过高效流水线化和统一处理实现快速高效的LLM解码,显著提升性能和效率。

摘要:

在大型语言模型中,边缘加速至关重要,以实现其广泛应用;然而,在资源受限的边缘加速器上实现快速注意力推断和高效解码仍具有挑战性。本文提出了SwiftKV注意力,一种每token流水线化的、低延迟的单次通过注意力推断算法,其中每个(kt,vt)在KV缓存中被精确处理一次,在统一的每token流水线中,不进行分数材料化、分块softmax或第二次通过,从而在单一硬件集上实现快速执行,而无需资源密集型并行。此外,为了解决现有加速器对多头LLM解码支持有限的问题,我们设计了SwiftKV-MHA加速器,它在同一处理器阵列上实现了高精度注意力和低精度GEMV,实现了快速高效的多头并行解码。实验结果表明,在边缘加速器上,SwiftKV注意力算法相比原生注意力实现了7.16倍的加速,并显著优于其他注意力算法。SwiftKV-MHA进一步将注意力延迟减少了13.48倍;在相同设置下,它比最先进的作品提高了17.4%的生成速度,并增加了1.98倍的token效率。

英文摘要:

Edge acceleration for large language models is crucial for their widespread application; however, achieving fast attention inference and efficient decoding on resource-constrained edge accelerators remains challenging. This paper presents SwiftKV Attention, a per-token pipelined, low-latency single-pass attention inference algorithm, where every (kt, vt) in the KV cache is processed exactly once in a uniform per-token pipeline without score materialization, blockwise softmax, or a second pass, thereby enabling fast execution on edge accelerators with a single hardware set and no resource-intensive parallelism. Furthermore, to address the limited support for multi-head LLM decoding in existing accelerators, we design the SwiftKV-MHA accelerator, which enables high precision attention and low precision GEMV on the same processor array, achieving fast and efficient multi-head parallel decoding. Experimental results show that, on the edge accelerator, the SwiftKV Attention algorithm achieves a 7.16* speedup over native attention and significantly outperforms other attention algorithms. SwiftKV-MHA further reduces attention latency by 13.48*; under the same settings, it improves generation speed by 17.4% and increases token efficiency by 1.98* compared with state-of-the-art works.

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

↑