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

大语言模型推理加速:全面的硬件视角

Large Language Model Inference Acceleration: A Comprehensive Hardware Perspective

Shanghai Jiao Tong University(上海交通大学);SII(上海创新研究院);Infinigence-AI

Jinhao Li, Jiaming Xu, Shan Huang, Yonghua Chen, Wen Li, Jun Liu, Yaoxiu Lian, Jiayi Pan, Li Ding, Hao Zhou, Yu Wang, Guohao Dai

AI总结:

本文从硬件视角全面调研生成式大语言模型的推理加速技术,梳理多类硬件平台的优化方法并对比性能,指出三大未来发展趋势。

摘要:

大语言模型(LLM)已在自然语言理解、文本生成等多个领域展现出卓越能力。与BERT、DeBERTa等非生成式LLM相比,GPT系列、Llama系列等生成式LLM凭借更优的算法性能,成为当前的研究主流。生成式LLM的发展与硬件能力的提升紧密相关,不同硬件平台具备独特的硬件特性,可用于提升LLM的推理性能。因此,本文全面调研了不同硬件平台上的高效生成式LLM推理技术。首先,本文概述了主流生成式LLM的算法架构,并深入剖析了其推理流程。随后,总结了CPU、GPU、FPGA、ASIC以及PIM/NDP等不同平台的各类优化方法,并给出了生成式LLM的推理结果。此外,本文结合硬件功耗、绝对推理速度(tokens/s)和能效(tokens/J),对不同硬件平台在批量大小为1和8时的推理性能进行了定性与定量比较,对比了同一优化方法在不同硬件平台上的表现、不同硬件平台的整体性能,以及同一硬件平台上不同方法的性能差异。本文整合软件优化方法与硬件平台,对现有推理加速研究工作进行了系统全面的梳理。本文指出,多模态、推理时计算、更高推理能效这三大趋势有望重新定义边缘人工智能系统的能力。本文相关项目可访问https://dai.sjtu.edu.cn/project.html获取。

英文摘要:

Large Language Models (LLMs) have demonstrated remarkable capabilities across various fields, from natural language understanding to text generation. Compared to non-generative LLMs like BERT and DeBERTa, generative LLMs like GPT series and Llama series are currently the main focus due to their superior algorithmic performance. The advancements in generative LLMs are closely intertwined with the development of hardware capabilities. Various hardware platforms exhibit distinct hardware characteristics, which can help improve LLM inference performance. Therefore, this paper comprehensively surveys efficient generative LLM inference on different hardware platforms. First, we provide an overview of the algorithm architecture of mainstream generative LLMs and delve into the inference process. Then, we summarize different optimization methods for different platforms such as CPU, GPU, FPGA, ASIC, and PIM/NDP, and provide inference results for generative LLMs. Furthermore, we perform a qualitative and quantitative comparison of inference performance with batch sizes 1 and 8 on different hardware platforms by considering hardware power consumption, absolute inference speed (tokens/s), and energy efficiency (tokens/J). We compare the performance of the same optimization methods across different hardware platforms, the performance across different hardware platforms, and the performance of different methods on the same hardware platform. This provides a systematic and comprehensive summary of existing inference acceleration work by integrating software optimization methods and hardware platforms. We point out that three trends (multimodality, inference-time compute, and higher inference energy efficiency) are promising to redefine the capabilities of edge artificial intelligence systems. Our project is available at https://dai.sjtu.edu.cn/project.html.

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

↑