arXiv:2505.03745cs.ARcs.AI2025-05被引 8

通过软硬协同设计,让大模型在边缘设备上高效处理长文本。

AccLLM: Accelerating Long-Context LLM Inference Via Algorithm-Hardware Co-Design

  • 算法层面融合剪枝、特殊注意力和低比特量化压缩模型。
  • 实测能耗降低4.07倍,吞吐量提升2.98倍,优于当前最优方案。
  • 适合需要低功耗部署长文本生成的边缘设备场景。

近年来,大语言模型(LLMs)在自然语言处理领域取得巨大成功,推动其从云端向资源受限的边缘设备部署的需求不断增长。然而,在边缘设备上部署LLMs面临三大挑战:(1)计算密集且模型庞大,(2)自回归生成带来巨大的内存与带宽需求,(3)对长序列处理的可扩展性有限。为此,我们提出AccLLM,一种通过算法与硬件协同设计实现高效快速长上下文LLM推理的综合加速框架。在算法层面,集成(1)剪枝、(2)Λ形注意力机制、(3)创新的W2A8KV4量化方案(2比特权重、8比特激活、4比特键值缓存),有效降低内存与带宽开销,支持长序列生成。在硬件层面,设计基于FPGA的专用加速器,配备可重构计算单元,灵活适配压缩算法带来的多样化操作,充分将算法创新转化为硬件效率。我们在Xilinx Alveo U280 FPGA上验证了AccLLM,相比当前最优工作FlightLLM,实现了4.07倍的能效提升和2.98倍的吞吐量提升。

原文摘要 · Abstract (English)

Recently, large language models (LLMs) have achieved huge success in the natural language processing (NLP) field, driving a growing demand to extend their deployment from the cloud to edge devices. However, deploying LLMs on resource-constrained edge devices poses significant challenges, including (1) intensive computations and huge model sizes, (2) great memory and bandwidth demands introduced by the autoregressive generation process, and (3) limited scalability for handling long sequences. To address these challenges, we propose AccLLM, a comprehensive acceleration framework that enables efficient and fast long-context LLM inference through algorithm and hardware co-design. At the algorithmic level, we integrate (1) pruning, (2) Λ-shaped attention, and (3) an innovative W2A8KV4 (2-bit weights, 8-bit activations, and 4-bit KV cache) quantization scheme, thus effectively reducing memory and bandwidth requirements while facilitating LLMs' long-sequence generation. At the hardware level, we design a dedicated FPGA-based accelerator with a reconfigurable computing engine to effectively and flexibly accommodate diverse operations arising from our compression algorithm, thereby fully translating the algorithmic innovations into tangible hardware efficiency. We validate AccLLM on the Xilinx Alveo U280 FPGA, demonstrating a 4.07x energy efficiency and a 2.98x throughput compared to the state-of-the-art work FlightLLM.

大模型推理边缘计算软硬协同长文本生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。