FlexLLM:用于灵活混合LLM加速器设计的可组合HLS库
FlexLLM: Composable HLS Library for Flexible Hybrid LLM Accelerator Design
AI总结:
FlexLLM通过可组合的HLS库实现灵活混合LLM加速器设计,提供高效量化和长上下文处理,显著提升性能与能效。
摘要:
我们提出了FlexLLM,一个用于快速开发领域专用LLM加速器的可组合高层次综合(HLS)库。FlexLLM为阶段定制推理暴露了关键架构自由度,使混合设计能够针对prefill和decode分别定制时间复用和空间数据流,并提供全面的量化套件以支持准确的低比特部署。使用FlexLLM,我们仅用1000行代码在两个月内构建了一个完整的Llama-3.2 1B模型推理系统。该系统包括:(1)一个阶段定制的加速器,具有硬件高效的量化(12.68 WikiText-2 PPL),超越SpinQuant基线;(2)一个分层内存Transformer(HMT)插件,用于高效处理长上下文。在AMD U280 FPGA上,加速器在16nm工艺下实现了1.29倍的端到端速度提升,1.64倍的解码吞吐量提升,以及比NVIDIA A100 GPU(7nm)运行BF16推理更高的能效3.14倍;在V80 FPGA上7nm工艺的预计结果分别达到4.71倍、6.55倍和4.13倍。在长上下文场景中,整合HMT插件将prefill延迟降低23.23倍,扩展上下文窗口64倍,与A100基线相比,端到端延迟降低1.10倍/4.86倍,能效提升5.21倍/6.27倍。FlexLLM因此在最小的manual努力下连接了LLM推理的算法创新和高性能加速器。
英文摘要:
We present FlexLLM, a composable High-Level Synthesis (HLS) library for rapid development of domain-specific LLM accelerators. FlexLLM exposes key architectural degrees of freedom for stage-customized inference, enabling hybrid designs that tailor temporal reuse and spatial dataflow differently for prefill and decode, and provides a comprehensive quantization suite to support accurate low-bit deployment. Using FlexLLM, we build a complete inference system for the Llama-3.2 1B model in under two months with only 1K lines of code. The system includes: (1) a stage-customized accelerator with hardware-efficient quantization (12.68 WikiText-2 PPL) surpassing SpinQuant baseline, and (2) a Hierarchical Memory Transformer (HMT) plug-in for efficient long-context processing. On the AMD U280 FPGA at 16nm, the accelerator achieves 1.29$\times$ end-to-end speedup, 1.64$\times$ higher decode throughput, and 3.14$\times$ better energy efficiency than an NVIDIA A100 GPU (7nm) running BF16 inference; projected results on the V80 FPGA at 7nm reach 4.71$\times$, 6.55$\times$, and 4.13$\times$, respectively. In long-context scenarios, integrating the HMT plug-in reduces prefill latency by 23.23$\times$ and extends the context window by 64$\times$, delivering 1.10$\times$/4.86$\times$ lower end-to-end latency and 5.21$\times$/6.27$\times$ higher energy efficiency on the U280/V80 compared to the A100 baseline. FlexLLM thus bridges algorithmic innovation in LLM inference and high-performance accelerators with minimal manual effort.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。