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

面向FPGA的持久状态数据流加速器用于内存受限的线性注意力解码

A Persistent-State Dataflow Accelerator for Memory-Bound Linear Attention Decode on FPGA

Neelesh Gupta, Peter Wang, Rajgopal Kannan, Viktor K. Prasanna

AI总结:

本文提出了一种FPGA加速器,通过持久存储递归状态将内存受限的线性注意力解码转换为计算受限,实现每token 63 μs的高效解码,比GPU快4.5倍,且能量效率提升60倍。

摘要:

门控Delta网络(GDN)是一种线性注意力机制,它用固定大小的递归状态替代了增长的KV缓存。像Qwen3-Next这样的混合大语言模型使用75%的GDN层,并实现了与仅使用注意力机制的模型相竞争的准确性。然而,在批量大小为1的情况下,GDN解码在GPU上是内存受限的,因为每次生成一个token都需要将完整的递归状态通过HBM来回传输。我们表明,这个瓶颈是架构性的,而非算法性的,因为所有亚二次序列模型在解码时的算术强度都低于1 FLOP/B,使其比标准Transformer更受内存限制。我们提出了一种FPGA加速器,通过在芯片内部的BRAM中持久存储完整的2 MB递归状态,将工作负载从内存受限转换为计算受限。我们的设计将GDN递归融合到一个五阶段流水线数据路径中,每个token只对每个状态矩阵执行一次读取和一次写入操作,利用Grouped Value Attention实现成对的头部并行性,并通过数据流流水线重叠准备、计算和输出存储。我们使用Vitis HLS在AMD Alveo U55C上探索了四个设计点,改变每迭代的头部级并行度从2到16个值头。我们的最快配置实现了每token 63 μs,比NVIDIA H100 PCIe上的GPU参考快4.5倍。实施后的功耗分析报告芯片内部功耗为9.96 W,每解码token的能量效率提高了60倍。

英文摘要:

Gated DeltaNet (GDN) is a linear attention mechanism that replaces the growing KV cache with a fixed-size recurrent state. Hybrid LLMs like Qwen3-Next use 75% GDN layers and achieve competitive accuracy to attention-only models. However, at batch-1, GDN decode is memory-bound on GPUs since the full recurrent state must be round-tripped through HBM every token. We show that this bottleneck is architectural, not algorithmic, as all subquadratic sequence models exhibit arithmetic intensities below 1 FLOP/B at decode time, making them more memory-bound than standard Transformers. We present an FPGA accelerator that eliminates this bottleneck by holding the full 2 MB recurrent state persistently in on-chip BRAM, converting the workload from memory-bound to compute-bound. Our design fuses the GDN recurrence into a five-phase pipelined datapath that performs only one read and one write pass over each state matrix per token, exploits Grouped Value Attention for paired-head parallelism, and overlaps preparation, computation, and output storage via dataflow pipelining. We explore four design points on an AMD Alveo U55C using Vitis HLS, varying head-level parallelism from 2 to 16 value-heads per iteration. Our fastest configuration achieves 63 $μ$s per token, 4.5$\times$ faster than the GPU reference on NVIDIA H100 PCIe. Post-implementation power analysis reports 9.96 W on-chip, yielding up to 60$\times$ greater energy efficiency per token decoded.

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

↑