arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.24820cs.ARcs.AI
收藏

Salca:一种面向高效长上下文注意力解码的稀疏性感知硬件加速器

Salca: A Sparsity-Aware Hardware Accelerator for Efficient Long-Context Attention Decoding

Fudan University(复旦大学)

Wang Fan, Wei Cao, Xi Zha, Kedi Ma, MingQian Sun, Jialin Chen, Fengzhe Zhang, Fan Zhang

AI总结:

本文提出Salca,通过软硬件协同设计,解决长上下文注意力解码中的计算与内存瓶颈,实现3.82倍速度提升和74.19倍能效提升。

摘要:

长上下文增强了大语言模型的能力,但带来了严峻的硬件挑战:计算和内存足迹随序列长度线性增长。特别是解码阶段持续访问大量KV缓存,显著增加带宽和计算压力。现有加速器主要针对短上下文设计和评估,处理长上下文时性能显著下降。为弥合这一差距,我们识别了主要瓶颈,并通过软硬件协同设计提出了一种长上下文注意力解码硬件加速器。在软件侧,我们提出双压缩动态稀疏注意力,结合超低精度量化与特征稀疏性以最小化预测开销。一个硬件友好的近似Top-K选择进一步将滤波复杂度从O(n log k)降至O(n)。在硬件侧,我们深入优化计算和内存访问,以应对稀疏注意力与长上下文之间复杂相互作用带来的瓶颈,并建立性能模型以推导最优协同设计方案。所获得的硬件采用完全流水线并行架构,在长序列上也实现O(n)效率。实验表明,我们的设计在A100上实现了3.82倍的速度提升和74.19倍的能效提升。与现有最佳加速器相比,这是首个高效支持长上下文推断的ASIC加速器,具有至少3.5倍的吞吐量和2.08倍更好的能效比。

英文摘要:

Long contexts improve capabilities of large language models but pose serious hardware challenges: compute and memory footprints grow linearly with sequence length. Particularly, the decoding phase continuously accesses massive KV cache, dramatically increasing bandwidth and computing pressure. Existing accelerators are primarily designed and evaluated for short contexts. They suffer from significant performance degradation when processing long contexts. To bridge this gap, we identify the major bottleneck and present a hardware accelerator for long context attention decoding via hardware-software co-design. On the software side, we propose dual-compression dynamic sparse attention. It combines ultra-low-precision quantization with feature sparsity to minimize prediction overhead. A hardware-friendly approximate Top-K selection further reduces filter complexity from $O(n \log k)$ to $O(n)$. On the hardware side, we deeply optimize compute and memory access to tackle bottlenecks from intricate interplay between sparse attention and long contexts, and establish a performance model to derive the optimal co-design scheme. The resulting hardware adopts a fully pipelined parallel architecture and achieves $O(n)$ efficiency even for long sequences. Experiments show that our design delivers $3.82\times$ speedup and $74.19\times$ energy efficiency over A100. Compared to SOTA accelerators, this is the first ASIC accelerator that efficiently supports long context inference, with at least $3.5\times$ higher throughput and $2.08\times$ better energy efficiency.

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

↑