G$^2$PTQ: Improving LLM Post-Training Quantization with Generalized Gradient Compensation

Ruikang Liu, Haoli Bai, Yuxuan Sun, Qian Zhang, Wenzheng Cai +6 more
9/25/2026
cs.CLcs.AI
quantization-pruning

Official code: G2PTQ/G2PTQ (8 stars, Python, MIT, last commit 2026-09-29).

Abstract

Post-training quantization (PTQ) is a practical approach to reducing the memory and computational footprint of large language models (LLMs) without retraining. GPTQ-based methods have become the de facto standard, yet they suffer from two complementary limitations.

Show full abstract

Methods with local, layer-wise objectives lack global supervision; while methods with global objectives fix their Hessian estimates at the start and ignore first-order gradients, so their guidance grows stale as quantization proceeds. This paper presents G$^2$PTQ, a unified PTQ framework with Generalized Gradient Compensation that integrates both first- and second-order information under a globally supervised, block-wise optimization objective. By refreshing gradient and Hessian estimates before quantizing each Transformer block, G$^2$PTQ avoids the staleness of prior global methods. Furthermore, to stabilize the exact first-order compensation, we introduce a trust-region scaling mechanism that dynamically bounds the gradient step to prevent exploding weight updates. Finally, we derive efficient implementations for block-wise Hessian approximation and exact gradient compensation. Experimental results on various model families and bit-widths demonstrate that G$^2$PTQ enables better alignment with the full-precision model, outperforming state-of-the-art baselines. Code is available at: https://github.com/G2PTQ/G2PTQ.

View on arXivView PDF

Code Implementations(1)

G2PTQ/G2PTQOfficial100%
MIT

Official PyTorch implementation of "G2PTQ: Improving LLM Post-Training Quantization with Generalized Gradient Compensation"

82Python, ShellSep 25, 20262 months agoMIT

Similar Papers

Cite this paper

@article{liu2026gptq,
  title  = {G$^2$PTQ: Improving LLM Post-Training Quantization with Generalized Gradient Compensation},
  author = {Ruikang Liu and Haoli Bai and Yuxuan Sun and Qian Zhang and Wenzheng Cai and Yanqi Hao and Feiyu Wang and Weidong Zhong and Zhuang Wang and Tong Yang and Xiangsheng Zhou},
  year   = {2026},
  eprint = {2609.31009},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.31009v1}
}

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

Discussion