Optimize Weight Rounding via Signed Gradient Descent for the Quantization of LLMs

Wenhua Cheng, Weiwei Zhang, Haihao Shen, Yiyang Cai, Xin He +2 more
9/11/2023
65 citations
cs.CLcs.AIcs.LG
quantization-pruning

Official code: intel/neural-compressor (2,734 stars, Python, Apache-2.0, last commit 2026-04-30). 1 more implementation below.

Abstract

Large Language Models (LLMs) have demonstrated exceptional proficiency in language-related tasks, but their deployment poses significant challenges due to substantial memory and storage requirements. Weight-only quantization has emerged as a promising solution, significantly reducing memory and storage needs without sacrificing too much performance.

Show full abstract

In this study, we introduce SignRound, a method that leverages signed gradient descent (SignSGD) to optimize rounding values and weight clipping in just 200 steps. SignRound integrates the advantages of Quantization-Aware Training (QAT) and Post-Training Quantization (PTQ), delivering exceptional results across 2 to 4 bits while minimizing tuning costs and avoiding additional inference overhead. For example, SignRound achieved absolute average accuracy improvements ranging from 6.91% to 33.22% at 2bits, as measured by the average zero-shot accuracy across 11 tasks. It also demonstrates strong generalization in recent models, achieving near-lossless 4-bit quantization in most scenarios. The source code is publicly available at https://github.com/intel/auto-round.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
intel/neural-compressorOfficial2,734PythonApache-2.02026-04-30
intel/auto-roundOfficial1,706PythonApache-2.02026-04-30
Apache-2.0

SOTA low-bit LLM quantization (INT8/FP8/MXFP8/INT4/MXFP4/NVFP4) & sparsity; leading model compression techniques on PyTorch, TensorFlow, and ONNX Runtime

2,734337Python, ShellJul 21, 20207 months agoApache-2.0
auto-tuningawqfp4gptqint4+12 more
intel/auto-roundOfficial68%
Apache-2.0

A SOTA quantization algorithm for high-accuracy low-bit LLM inference, seamlessly optimized for CPU/XPU/CUDA, with multi-datatype support and full compatibility with vLLM, SGLang, and Transformers.

1,706204Python, ShellJan 4, 20247 months agoApache-2.0
ggufint4llmsmxfp4nvfp4+6 more

Similar Papers

Cite this paper

@article{cheng2023optimize,
  title  = {Optimize Weight Rounding via Signed Gradient Descent for the Quantization of LLMs},
  author = {Wenhua Cheng and Weiwei Zhang and Haihao Shen and Yiyang Cai and Xin He and Kaokao Lv and Yi Liu},
  year   = {2023},
  eprint = {2309.05516},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.05516v5}
}

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/2309.05516.svg)](https://codeofpaper.com/paper/2309.05516)

Discussion