Saved in:
Bibliographic Details
Main Authors: Wang, Jinguang, Wang, Jingyu, Sun, Haifeng, Yang, Tingting, Zhuang, Zirui, Ning, Wanyi, Yin, Yuexi, Qi, Qi, Liao, Jianxin
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2503.07654
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912268596281344
author Wang, Jinguang
Wang, Jingyu
Sun, Haifeng
Yang, Tingting
Zhuang, Zirui
Ning, Wanyi
Yin, Yuexi
Qi, Qi
Liao, Jianxin
author_facet Wang, Jinguang
Wang, Jingyu
Sun, Haifeng
Yang, Tingting
Zhuang, Zirui
Ning, Wanyi
Yin, Yuexi
Qi, Qi
Liao, Jianxin
contents Quantization has been widely used to compress and accelerate inference of large language models (LLMs). Existing methods focus on exploring the per-token dynamic calibration to ensure both inference acceleration and model accuracy under 4-bit quantization. However, in autoregressive generation inference of long sequences, the overhead of repeated dynamic quantization and dequantization steps becomes considerably expensive. In this work, we propose MergeQuant, an accurate and efficient per-channel static quantization framework. MergeQuant integrates the per-channel quantization steps with the corresponding scalings and linear mappings through a Quantization Step Migration (QSM) method, thereby eliminating the quantization overheads before and after matrix multiplication. Furthermore, in view of the significant differences between the different channel ranges, we propose dimensional reconstruction and adaptive clipping to address the non-uniformity of quantization scale factors and redistribute the channel variations to the subsequent modules to balance the parameter distribution under QSM. Within the static quantization setting of W4A4, MergeQuant reduces the accuracy gap on zero-shot tasks compared to FP16 baseline to 1.3 points on Llama-2-70B model. On Llama-2-7B model, MergeQuant achieves up to 1.77x speedup in decoding, and up to 2.06x speedup in end-to-end compared to FP16 baseline.
format Preprint
id arxiv_https___arxiv_org_abs_2503_07654
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MergeQuant: Accurate 4-bit Static Quantization of Large Language Models by Channel-wise Calibration
Wang, Jinguang
Wang, Jingyu
Sun, Haifeng
Yang, Tingting
Zhuang, Zirui
Ning, Wanyi
Yin, Yuexi
Qi, Qi
Liao, Jianxin
Machine Learning
Quantization has been widely used to compress and accelerate inference of large language models (LLMs). Existing methods focus on exploring the per-token dynamic calibration to ensure both inference acceleration and model accuracy under 4-bit quantization. However, in autoregressive generation inference of long sequences, the overhead of repeated dynamic quantization and dequantization steps becomes considerably expensive. In this work, we propose MergeQuant, an accurate and efficient per-channel static quantization framework. MergeQuant integrates the per-channel quantization steps with the corresponding scalings and linear mappings through a Quantization Step Migration (QSM) method, thereby eliminating the quantization overheads before and after matrix multiplication. Furthermore, in view of the significant differences between the different channel ranges, we propose dimensional reconstruction and adaptive clipping to address the non-uniformity of quantization scale factors and redistribute the channel variations to the subsequent modules to balance the parameter distribution under QSM. Within the static quantization setting of W4A4, MergeQuant reduces the accuracy gap on zero-shot tasks compared to FP16 baseline to 1.3 points on Llama-2-70B model. On Llama-2-7B model, MergeQuant achieves up to 1.77x speedup in decoding, and up to 2.06x speedup in end-to-end compared to FP16 baseline.
title MergeQuant: Accurate 4-bit Static Quantization of Large Language Models by Channel-wise Calibration
topic Machine Learning
url https://arxiv.org/abs/2503.07654