专为低比特量化设计,让大模型推理更快更省电
MixPE: Quantization and Hardware Co-design for Efficient LLM Inference
- 分组后统一解量化,减少计算开销
- 用移位加法替代乘法,提升效率与能耗比
- 适合部署大模型的硬件加速场景
基于Transformer的大语言模型在规模不断增长的同时,其部署面临巨大的计算和内存挑战。量化成为有效解决方案,先进量化算法引入了混合精度矩阵乘法(mpGEMM),即低精度权重与高精度激活相乘。然而,当前主流硬件如GPU和TPU缺乏对高效mpGEMM的支持,导致主循环中解量化操作效率低下。为此,我们提出MixPE,一种面向低比特量化推理的专用混合精度处理单元。MixPE通过两项关键创新降低解量化开销并释放低比特量化的全部潜力:首先,鉴于每个量化组内的缩放因子和零点共享,我们在组内mpGEMM后执行解量化,显著减少解量化开销;其次,摒弃传统乘法器,采用高效的移位与加法运算实现乘法,优化计算与能效。实验表明,MixPE相比现有最先进量化加速器实现2.6倍速度提升和1.4倍能耗降低。
原文摘要 · Abstract (English)
Transformer-based large language models (LLMs) have achieved remarkable success as model sizes continue to grow, yet their deployment remains challenging due to significant computational and memory demands. Quantization has emerged as a promising solution, and state-of-the-art quantization algorithms for LLMs introduce the need for mixed-precision matrix multiplication (mpGEMM), where lower-precision weights are multiplied with higher-precision activations. Despite its benefits, current hardware accelerators such as GPUs and TPUs lack native support for efficient mpGEMM, leading to inefficient dequantization operations in the main sequential loop. To address this limitation, we introduce MixPE, a specialized mixed-precision processing element designed for efficient low-bit quantization in LLM inference. MixPE leverages two key innovations to minimize dequantization overhead and unlock the full potential of low-bit quantization. First, recognizing that scale and zero point are shared within each quantization group, we propose performing dequantization after per-group mpGEMM, significantly reducing dequantization overhead. Second, instead of relying on conventional multipliers, MixPE utilizes efficient shift\&add operations for multiplication, optimizing both computation and energy efficiency. Our experimental results demonstrate that MixPE surpasses the state-of-the-art quantization accelerators by $2.6\times$ speedup and $1.4\times$ energy reduction.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。