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

Ruikang Liu, Haoli Bai, Yuxuan Sun, Qian Zhang, Wenzheng Cai, Yanqi Hao, Feiyu Wang, Weidong Zhong, Zhuang Wang, Tong Yang, Xiangsheng ZhouarXiv 2026

TL;DR

G²PTQ (Generalized Gradient Compensation Post-Training Quantization) is a new framework that significantly improves LLM quantization by combining first-order gradients and second-order Hessian information under a block-wise supervision objective. By refreshing these estimates before quantizing each Transformer block and introducing a trust-region scaling mechanism to stabilize updates, G²PTQ achieves state-of-the-art alignment with full-precision models, particularly at aggressive low-bit widths (2-bit and 3-bit).

What Problem Does This Paper Address?

Quantizing Large Language Models (LLMs) is essential for deployment, but it often leads to significant performance degradation. The current "gold standard," GPTQ, and its variants suffer from two main issues:

  1. Local vs. Global Objectives: GPTQ minimizes error at the individual linear layer level (MSE). While efficient, this "local" view ignores how errors accumulate and interact across the model. Newer "global" methods try to fix this by using end-to-end objectives (like KL divergence), but they typically compute the Hessian matrix once at the start. As quantization proceeds, this initial estimate becomes stale and no longer accurately reflects the state of the partially quantized model.
  2. Ignoring First-Order Information: Most methods assume the model has already converged, meaning the first-order gradient is zero. However, due to the domain gap between the original training data and the small calibration sets used for quantization, these gradients are rarely zero. Ignoring them leaves valuable "steering" information on the table.

Methods

G²PTQ introduces a unified framework to solve these problems through three main innovations:

  • Block-wise Supervision: Instead of quantizing layer-by-layer, G²PTQ optimizes at the level of Transformer blocks. It uses block-wise MSE for intermediate blocks and KL divergence for the final block to ensure the quantized model's output distribution matches the original.
  • Information Refreshing: To avoid the "staleness" problem, G²PTQ performs a backward pass through each block just before it is quantized. This provides fresh, accurate gradient and Hessian estimates that reflect the current state of the model.
  • Trust-Region Gradient Compensation: Using exact gradients can be numerically unstable, often leading to "exploding" weight updates that ruin model performance. The authors introduce a trust-region scaling factor ($\beta$) that dynamically bounds the gradient step, ensuring weight updates stay within a neighborhood where the mathematical approximations remain valid.

Crucially, the authors derived efficient recursive implementations for these updates, ensuring that the computational complexity remains comparable to vanilla GPTQ ($O(d^3)$), making it practical for massive models.

Datasets

The researchers evaluated G²PTQ across a wide range of models (from 0.6B to 125B parameters) using:

  • Calibration: 1,024 sequences from the NeuralMagic dataset for dense models; 8,192 sequences for Mixture-of-Experts (MoE) models.
  • Evaluation Metrics: Perplexity (PPL) on WikiText2 and KL divergence on UltraChat and NuminaMath.
  • Downstream Benchmarks: Seven commonsense QA tasks (e.g., ARC, HellaSwag, PIQA, WinoGrande) and several complex reasoning benchmarks (e.g., GPQA Diamond, LiveCodeBench) for the largest models.

Key Insights and Ideas

  • Staleness is a Performance Killer: The paper demonstrates that a Hessian calculated on a full-precision model is a poor guide for a model that is already halfway quantized. Refreshing information block-by-block is the "Goldilocks" zone—more global than layer-wise MSE, but more accurate than a one-time global Hessian.
  • Exact Gradients > Taylor Approximations: Prior work (like FOEM) used Taylor expansions to approximate gradients. G²PTQ shows that for complex objectives like KL divergence, these approximations introduce significant error. Using exact gradients—provided they are stabilized—is much more effective.
  • Stability is the Secret Sauce: The trust-region mechanism is what makes exact gradient compensation viable. Without it, the quantization process frequently diverges, leading to catastrophic accuracy loss.

Key Results

G²PTQ consistently outperformed state-of-the-art baselines like GPTQ, GuidedQuant, and GPTAQ across various settings:

  • Superior Alignment: In the W2A16 (2-bit weight, 16-bit activation) setting, G²PTQ* halved the KL divergence compared to GPTAQ and improved QA accuracy by over 6% on average.
  • Weight-Activation Quantization: On the LLaMA3-70B model under aggressive 4-bit weight-activation quantization, G²PTQ improved QA accuracy by 4.56% over the best baseline.
Table 2: 4-bit weight-activation quantization results for LLaMA3-70B. G²PTQ shows a significant lead in QA accuracy.
  • MoE Scalability: The method proved highly effective for Mixture-of-Experts models. On the 125B Qwen3.8-Flash-Next model, G²PTQ* achieved nearly lossless 4-bit quantization, with only a 0.33% drop in QA accuracy.
Table 1: Weight-only quantization results across different model families. G²PTQ variants (highlighted in blue) consistently achieve the lowest KL divergence and highest QA scores.

Limitations and Future Work

  • Hessian-based Clipping: The authors explored using the Hessian to guide weight clipping (H-Scale). Interestingly, they found this was highly model-dependent—it helped Qwen3 models significantly but provided no benefit (or even slight degradation) for Qwen3.5 models. They suggest that finding a universal clipping strategy is a key area for future research.
  • Calibration Requirements: While G²PTQ is efficient, it does require more calibration samples than GPTQ to properly estimate the refreshed first- and second-order information without high variance.
  • Computational Overhead: Although the complexity matches GPTQ, the additional backward passes mean it takes roughly 3-5x longer to run (e.g., ~2.24 hours for an 8B model vs. ~0.43 hours for GPTQ). However, this is still very practical compared to full quantization-aware training (QAT).

Summary updated

BibTeX
@misc{liu2026g,
  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},
  title = {{G$^2$PTQ: Improving LLM Post-Training Quantization with Generalized Gradient Compensation}},
  year = {2026},
  eprint = {2609.31009},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.31009},
}
Figure