GWQ: Gradient-Aware Weight Quantization for Large Language Models

Yihua Shao, Yan Gu, Siyu Chen, Haiyang Liu, Zixian Zhu +10 more
10/30/2024
cs.LGcs.AIcs.CL
quantization-pruning

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Large language models (LLMs) show impressive performance in solving complex language tasks. However, its large number of parameters presents significant challenges for the deployment.

Show full abstract

So, compressing LLMs to low bits can enable to deploy on resource-constrained devices. To address this problem, we propose gradient-aware weight quantization (GWQ), the first quantization approach for low-bit weight quantization that leverages gradients to localize outliers, requiring only a minimal amount of calibration data for outlier detection. GWQ retains the top 1\% outliers preferentially at FP16 precision, while the remaining non-outlier weights are stored in a low-bit. We widely evaluate GWQ on different task include language modeling, grounding detection, massive multitask language understanding and vision-language question and answering. Results show that models quantified by GWQ performs better than other quantization method. During quantization process, GWQ only need one calibration set to realize effective quant. Also, GWQ achieves 1.2x inference speedup in comparison to the original model and effectively reduces the inference memory.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{shao2024gwq,
  title  = {GWQ: Gradient-Aware Weight Quantization for Large Language Models},
  author = {Yihua Shao and Yan Gu and Siyu Chen and Haiyang Liu and Zixian Zhu and Zijian Ling and Minxi Yan and Ziyang Yan and Chenyu Zhang and Michele Magno and Haotong Qin and Yan Wang and Jingcai Guo and Ling Shao and Hao Tang},
  year   = {2024},
  eprint = {2411.00850},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.00850v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.00850.svg)](https://codeofpaper.com/paper/2411.00850)

Discussion