arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.16158cs.LGcs.AIcs.AR
收藏

MixPE:面向高效大语言模型推理的量化与硬件协同设计

MixPE: Quantization and Hardware Co-design for Efficient LLM Inference

The Chinese University of Hong Kong(香港中文大学);Tsinghua University(清华大学);Huawei Noah’s Ark Lab(华为诺亚方舟实验室)

Yu Zhang, Mingzi Wang, Lancheng Zou, Wulong Liu, Hui-Ling Zhen, Mingxuan Yuan, Bei Yu

AI总结:

本文提出MixPE混合精度处理单元,通过逐组mpGEMM后反量化和移位加法替代乘法器两项创新,实现大语言模型推理中2.6倍加速和1.4倍能耗降低。

摘要:

基于Transformer的大语言模型(LLMs)随着模型规模持续增长已取得显著成功,但由于巨大的计算和内存需求,其部署仍然面临挑战。量化已成为一种有前景的解决方案,而当前最先进的大语言模型量化算法引入了混合精度矩阵乘法(mpGEMM)的需求,即低精度权重与高精度激活值相乘。尽管具有诸多优势,现有硬件加速器(如GPU和TPU)缺乏对高效mpGEMM的原生支持,导致主顺序循环中出现低效的反量化操作。为解决这一局限,我们提出MixPE,一种专为大语言模型推理中高效低位量化设计的专用混合精度处理单元。MixPE利用两项关键创新来最小化反量化开销并充分释放低位量化的潜力。第一,认识到缩放因子和零点在每个量化组内是共享的,我们提出在逐组mpGEMM之后执行反量化,从而显著降低反量化开销。第二,MixPE不依赖传统乘法器,而是利用高效的移位与加法(shift&add)操作来完成乘法,同时优化计算效率和能效。我们的实验结果表明,MixPE相比最先进的量化加速器实现了2.6倍的加速和1.4倍的能耗降低。

英文摘要:

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.

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

↑