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

PD-Swap:通过动态部分重新配置实现端到端LLM推理的边缘FPGA预填解码逻辑交换

PD-Swap: Prefill-Decode Logic Swapping for End-to-End LLM Inference on Edge FPGAs via Dynamic Partial Reconfiguration

University of California, Irvine(加州大学尔湾分校)

Yifan Zhang, Zhiheng Chen, Ye Qiao, Sitao Huang

AI总结:

PD-Swap通过动态部分重新配置实现边缘FPGA上LLM推理的预填解码逻辑分离,提升吞吐量并优化资源利用。

摘要:

针对低功耗边缘FPGA上部署生成式AI的挑战,本文提出PD-Swap加速器。大规模量化语言模型(如1.58位BitNet风格的三元权重Transformer)使在低功耗边缘FPGA上部署生成式AI成为可能。然而,随着提示词增长到上万token,由于二次预填成本和快速增加的KV缓存带宽需求,边缘硬件性能随序列长度急剧下降,使长上下文长度的推理延迟成为首要系统关注点。最近的LLM研究揭示了预填解码的不对称性:预填是计算密集型的,由密集矩阵运算主导,而解码是内存带宽受限的,由KV缓存流量主导。静态加速器必须为两种模式提供资源和单一数据流,导致重复的注意力逻辑、未充分利用的织物和紧绷的LUT/URAM限制,这些限制限制了模型大小和可用上下文。我们提出了一种预填解码分离的LLM加速器PD-Swap,利用动态部分重新配置(DPR)在边缘FPGA上时间复用注意力模块。核心表格查找三元矩阵乘法和权重缓冲引擎保持静态,而注意力子系统是一个可重新配置的分区,包含两种相专用的架构:一个计算密集型、token并行的预填引擎和一个带宽优化、以KV缓存为中心的解码引擎。一个屋顶线启发式的模型和设计空间探索联合优化可重新配置区域大小、重新配置下的并行度和可路由性约束,并将重新配置延迟隐藏在计算延迟中。PD-Swap实现了高达27 tokens/s的解码吞吐量,在长上下文长度下表现更优,比现有最先进作品提升了1.3x到2.1x(在更长上下文长度下增益更大),且无需额外面积成本。

英文摘要:

Aggressively quantized large language models (LLMs), such as BitNet-style 1.58-bit Transformers with ternary weights, make it feasible to deploy generative AI on low-power edge FPGAs. However, as prompts grow to tens of thousands of tokens, edge hardware performance drops sharply with sequence length due to quadratic prefill cost and rapidly increasing KV-cache bandwidth demands, making inference latency of longer context length a first-order system concern. Recent studies on LLMs expose a fundamental prefill-decode asymmetry: prefill is compute-bound and dominated by dense matrix-matrix operations, whereas decoding is memory-bandwidth-bound and dominated by KV-cache traffic. A static accelerator must provision resources and a single dataflow for both regimes, leading to duplicated attention logic, underutilized fabric, and tight LUT/URAM limits that cap model size and usable context. We propose a prefill--decode disaggregated LLM accelerator, PD-Swap, that uses Dynamic Partial Reconfiguration (DPR) to time-multiplex the attention module on edge FPGAs. The core table-lookup ternary matrix multiplication and weight-buffering engines remain static, while the attention subsystem is a reconfigurable partition with two phase-specialized architectures: a compute-heavy, token-parallel prefill engine and a bandwidth-optimized, KV-cache-centric decoding engine. A roofline-inspired model and design space exploration jointly optimize reconfigurable-region size, parallelism under reconfiguration and routability constraints, and reconfiguration latency is hidden by computation latency. PD-Swap achieves up to 27~tokens/s decoding throughput, outperforming prior state-of-the-art works by 1.3x--2.1x (larger gains at longer context lengths), without extra area cost.

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

↑