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

MEADOW:面向低功耗边缘 LLM 的内存高效数据流与数据打包

MEADOW: Memory-efficient Dataflow and Data Packing for Low Power Edge LLMs

IIT Roorkie(鲁基印度理工学院);IBM Research - Yorktown Heights(IBM 约克敦高地研究院)

Abhishek Moitra, Arkapravo Ghosh, Shrey Agarwal, Aporva Amarnath, Karthik Swaminathan, Priyadarshini Panda

AI总结:

本文提出 MEADOW 框架,利用 TPHS 数据流和无损权重打包减少低功耗边缘 FPGA 上 LLM 的片外访问,显著降低解码、预填及端到端延迟。

摘要:

大语言模型(LLM)在计算和内存方面的挑战,已经催生了多种旨在实现其高效部署的优化方法。尽管以往面向 LLM 的量化以及稀疏加速工作已显著缓解了内存和计算瓶颈,但它们都假设运行在 GPU 和服务器级 FPGA 等高功耗平台上,这类平台具备较大的片外内存带宽,并且对解码器中的所有层采用通用矩阵乘法(GEMM)执行。在这种基于 GEMM 的执行方式中,数据从片外内存取出、完成计算后再存回。然而,在低功耗边缘设备所面对的片外内存容量受限情况下,由于大型中间 token 被反复写入片外内存并从中读取,该实现策略会显著增加注意力计算延迟。此外,从带宽受限的内存中读取权重矩阵还会进一步加剧内存瓶颈。为此,我们提出 MEADOW 框架,通过新颖的 token 并行、头顺序(TPHS)数据流显著减少 LLM 的片外内存访问。此外,MEADOW 采用权重打包,对大型权重矩阵执行无损分解,将其分解为唯一元素,从而降低巨大的权重读取延迟。在功耗低于 10W 的低功耗 Xilinx ZCU102 FPGA 平台上,与基于 GEMM 的 LLM 实现相比,MEADOW 的解码和预填延迟分别降低 1.5 倍和 2.5 倍。此外,与以往的 LLM 优化工作相比,MEADOW 实现了超过 40% 的端到端延迟改进。

英文摘要:

The computational and memory challenges of large language models (LLMs) have sparked several optimization approaches towards their efficient implementation. While prior LLM-targeted quantization, and prior works on sparse acceleration have significantly mitigated the memory and computation bottleneck, they do so assuming high power platforms such as GPUs and server-class FPGAs with large off-chip memory bandwidths and employ a generalized matrix multiplication (GEMM) execution of all the layers in the decoder. In such a GEMM-based execution, data is fetched from an off-chip memory, computed and stored back. However, at reduced off-chip memory capacities, as is the case with low-power edge devices, this implementation strategy significantly increases the attention computation latency owing to the repeated storage and fetch of large intermediate tokens to and from the off-chip memory. Moreover, fetching the weight matrices from a bandwidth constrained memory further aggravates the memory bottleneck problem. To this end, we introduce MEADOW, a framework that significantly reduces the off-chip memory access for LLMs with a novel token-parallel head-sequential (TPHS) dataflow. Additionally, MEADOW applies weight packing that performs loss-less decomposition of large weight matrices to their unique elements thereby, reducing the enormous weight fetch latency. MEADOW demonstrates 1.5x and 2.5x lower decode and prefill latency, respectively, compared to a GEMM-based LLM implementation on the low power Xilinx ZCU102 FPGA platform that consumes less than 10W. Additionally, MEADOW achieves an end-to-end latency improvement of over 40%, compared to prior LLM optimization works.

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

↑