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

FlightLLM:在FPGA上具有完整映射流程的高效大语言模型推理

FlightLLM: Efficient Large Language Model Inference with a Complete Mapping Flow on FPGAs

Tsinghua University(清华大学);Infinigence-AI(无问芯穹);Shanghai Jiao Tong University(上海交通大学)
Shulin Zeng, Jun Liu, Guohao Dai, Xinhao Yang, Tianyu Fu, Hongyi Wang, Wenheng Ma, Hanbo Sun, Shiyao Li, Zixiao Huang, Yadong Dai, Jintao Li, Zehao Wang, Ruoyu … 展开作者

Shulin Zeng, Jun Liu, Guohao Dai, Xinhao Yang, Tianyu Fu, Hongyi Wang, Wenheng Ma, Hanbo Sun, Shiyao Li, Zixiao Huang, Yadong Dai, Jintao Li, Zehao Wang, Ruoyu Zhang, Kairui Wen, Xuefei Ning, Yu Wang

AI总结:

本文提出FlightLLM,一种在FPGA上实现高效大语言模型推理的完整映射流程,通过可配置稀疏DSP链、片上解码方案和长度自适应编译方法,在能效、成本效益和吞吐量上显著优于商用GPU。

摘要:

基于Transformer的大语言模型(LLMs)对各个领域产生了重大影响。然而,LLMs的效率受到繁重的计算和内存开销的影响。稀疏化和量化等压缩技术通常被用来缓解LLMs的计算/内存开销与硬件容量之间的差距。然而,现有的GPU和基于Transformer的加速器无法高效处理压缩后的LLMs,因为存在以下未解决的挑战:计算效率低、内存带宽未充分利用以及编译开销大。本文提出了FlightLLM,通过在FPGA上的完整映射流程实现高效的LLMs推理。在FlightLLM中,我们强调了一种创新的解决方案,即利用FPGA专用资源(例如DSP48和异构内存层次结构)来解决LLMs的计算和内存开销问题。我们提出了一种可配置的稀疏DSP链,以高计算效率支持不同的稀疏模式。其次,我们提出了一种始终在片的解码方案,在混合精度支持下提升内存带宽。最后,为了使FlightLLM适用于真实的LLMs,我们提出了一种长度自适应编译方法以减少编译开销。FlightLLM在Xilinx Alveo U280 FPGA上实现,在批大小为1的情况下,使用vLLM和SmoothQuant,在现代LLMs(如LLaMA2-7B)上,与商用GPU(如NVIDIA V100S)相比,实现了6.0倍的更高能效和1.8倍的更好成本效益。使用最新的Versal VHK158 FPGA,FlightLLM以1.2倍的更高吞吐量击败了NVIDIA A100 GPU。

英文摘要:

Transformer-based Large Language Models (LLMs) have made a significant impact on various domains. However, LLMs' efficiency suffers from both heavy computation and memory overheads. Compression techniques like sparsification and quantization are commonly used to mitigate the gap between LLM's computation/memory overheads and hardware capacity. However, existing GPU and transformer-based accelerators cannot efficiently process compressed LLMs, due to the following unresolved challenges: low computational efficiency, underutilized memory bandwidth, and large compilation overheads. This paper proposes FlightLLM, enabling efficient LLMs inference with a complete mapping flow on FPGAs. In FlightLLM, we highlight an innovative solution that the computation and memory overhead of LLMs can be solved by utilizing FPGA-specific resources (e.g., DSP48 and heterogeneous memory hierarchy). We propose a configurable sparse DSP chain to support different sparsity patterns with high computation efficiency. Second, we propose an always-on-chip decode scheme to boost memory bandwidth with mixed-precision support. Finally, to make FlightLLM available for real-world LLMs, we propose a length adaptive compilation method to reduce the compilation overhead. Implemented on the Xilinx Alveo U280 FPGA, FlightLLM achieves 6.0$\times$ higher energy efficiency and 1.8$\times$ better cost efficiency against commercial GPUs (e.g., NVIDIA V100S) on modern LLMs (e.g., LLaMA2-7B) using vLLM and SmoothQuant under the batch size of one. FlightLLM beats NVIDIA A100 GPU with 1.2$\times$ higher throughput using the latest Versal VHK158 FPGA.

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

↑