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

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Zhang, Yu, Wang, Mingzi, Zou, Lancheng, Liu, Wulong, Zhen, Hui-Ling, Yuan, Mingxuan, Yu, Bei
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915032984453120
author Zhang, Yu
Wang, Mingzi
Zou, Lancheng
Liu, Wulong
Zhen, Hui-Ling
Yuan, Mingxuan
Yu, Bei
author_facet Zhang, Yu
Wang, Mingzi
Zou, Lancheng
Liu, Wulong
Zhen, Hui-Ling
Yuan, Mingxuan
Yu, Bei
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2411_16158
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle MixPE: Quantization and Hardware Co-design for Efficient LLM Inference
Zhang, Yu
Wang, Mingzi
Zou, Lancheng
Liu, Wulong
Zhen, Hui-Ling
Yuan, Mingxuan
Yu, Bei
Machine Learning
Artificial Intelligence
Hardware Architecture
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.
title MixPE: Quantization and Hardware Co-design for Efficient LLM Inference
topic Machine Learning
Artificial Intelligence
Hardware Architecture
url https://arxiv.org/abs/2411.16158