提出可变长度分组激活数据格式,显著提升大模型推理效率。
Anda: Unlocking Efficient LLM Inference with a Variable-Length Grouped Activation Data Format
- 设计自适应数据格式Anda,动态分配尾数位并共享指数位。
- 在多种LLM上实现平均2.4倍加速、3.1倍能效提升。
- 适合对推理速度与能效要求高的边缘部署场景。
当前广泛使用的仅权重量化大语言模型(LLM)采用低比特整数(INT)权重和浮点(FP)激活,虽降低存储需求但将能耗与延迟瓶颈转移到高成本的FP激活上。现有加速器主要关注计算优化,忽视了对关键FP-INT GeMM操作中计算与数据移动的联合优化。本文研究不同模块激活精度的敏感性及其对整体模型精度的影响,提出Anda数据类型:一种具有组共享指数位和动态尾数位分配的自适应格式;设计迭代后训练自适应精度搜索算法,优化各模块比特宽度以平衡精度、能效与速度;并提出一系列硬件优化技术,包括基于位平面的数据组织、支持位串行计算的Anda增强处理单元及运行时位平面压缩器,协同优化存储、计算与内存开销。在主流模型OPT、LLaMA及LLaMA-2系列上的实验表明,Anda在FPINT GeMM操作中相比GPU-like FP-FP基线平均实现2.4倍加速、4.0倍面积效率与3.1倍能效提升,展现出跨场景强适应性,适用于多样化部署需求。
原文摘要 · Abstract (English)
The widely-used, weight-only quantized large language models (LLMs), which leverage low-bit integer (INT) weights and retain floating-point (FP) activations, reduce storage requirements while maintaining accuracy. However, this shifts the energy and latency bottlenecks towards the FP activations that are associated with costly memory accesses and computations. Existing LLM accelerators focus primarily on computation optimizations, overlooking the potential of jointly optimizing FP computations and data movement, particularly for the dominant FP-INT GeMM operations in LLM inference. To address these challenges, we investigate the sensitivity of activation precision across various LLM modules and its impact on overall model accuracy. Based on our findings, we first propose the Anda data type: an adaptive data format with group-shared exponent bits and dynamic mantissa bit allocation. Secondly, we develop an iterative post-training adaptive precision search algorithm that optimizes the bit-width for different LLM modules to balance model accuracy, energy efficiency, and inference speed. Lastly, a suite of hardware optimization techniques is proposed to maximally exploit the benefits of the Anda format. These include a bit-plane-based data organization scheme, Anda-enhanced processing units with bit-serial computation, and a runtime bit-plane Anda compressor to simultaneously optimize storage, computation, and memory footprints. Our evaluations on FPINT GeMM operations show that Anda achieves a 2.4x speedup, 4.0x area efficiency, and 3.1x energy efficiency improvement on average for popular LLMs including OPT, LLaMA, and LLaMA-2 series over the GPU-like FP-FP baseline. Anda demonstrates strong adaptability across various application scenarios, accuracy requirements, and system performance, enabling efficient LLM inference across a wide range of deployment scenarios.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。