Predicting Quantization Price for Selecting PTQ Configurations Before Deployment

Junbin Qiu, Jian Mu, Weitong Zhang, Yao Shu

TL;DR

Post-training quantization (PTQ) requires engineers to navigate a massive search space of bitwidths, granularities, and mathematical transformations before seeing how they affect a model's final performance. This paper introduces a unified "quantization price" framework derived from forward KL divergence that accurately predicts downstream performance degradation at calibration time. This allows practitioners to rapidly select optimal, budget-compliant PTQ configurations without the prohibitive cost of exhaustively building and testing every candidate model.

What Problem Does This Paper Address?

When compressing Large Language Models (LLMs) via weight-space post-training quantization (PTQ), developers face a dizzying array of choices: What bitwidth should each layer use? Should quantization be per-channel or group-wise? Should we apply a pre-quantization transformation like SmoothQuant or OmniQuant?

The core challenge is that the final consequence of these mixed choices—the output-distribution drift—is only visible after the entire quantized model is assembled. Exhaustively evaluating every combination is computationally impossible. While existing methods use local proxies like reconstruction error or Hessian sensitivity to guide specific choices (like bit allocation), they treat these dimensions in isolation. There has been no common mathematical currency to compare completely different strategies—such as trading a lower bitwidth for a more sophisticated coordinate transformation—before deployment trials.

Methods

The authors formulate weight-space PTQ as a pre-deployment configuration selection problem under a strict hardware/deployment budget.

  1. The Quantization Price: By expanding the full-precision-to-quantized forward KL divergence using a Taylor series, the authors show that the first-order term cancels out at the full-precision reference model. The dominant term is quadratic: $$\rho_l(\alpha_l) = \frac{1}{2}\operatorname{Tr}(\mathbf{H}_l\boldsymbol{\Sigma}_l(\alpha_l))$$ Here, $\boldsymbol{\Sigma}_l(\alpha_l)$ is the layer-output error covariance matrix induced by a candidate configuration $\alpha_l$, and $\mathbf{H}_l$ is the downstream curvature (Hessian) supplied by the full-precision reference model. $\mathbf{H}_l$ acts as the "price tag," dictating which error directions are costly to downstream performance.

  2. Isotropic Trace Reduction: To make this practical for massive models, the authors introduce a low-cost scalar reduction. Instead of computing full matrices, each candidate configuration is scored using two candidate-side scalars (input scale $\hat{\sigma}_l^2$ and perturbation scale $\hat{\omega}_l$) and a single cached reference curvature trace ($\hat{\tau}_l$).

  3. Price-Guided Search: This trace reduction yields a calibration-time price table. The final configuration selection is solved efficiently as a discrete constrained optimization problem using a binary Mixed-Integer Linear Program (MILP).

Datasets

The approach was validated using the following benchmarks:

  • Calibration & Perplexity: WikiText2 validation and test splits.
  • Downstream Tasks (via LightEval): BoolQ, TruthfulQA (MC2), PIQA, WinoGrande, and WiC.

Evaluations were performed across multiple model families, including OPT-125M, Qwen3-0.6B, Llama-3.2-1B, Llama-3.2-3B, and Llama-3.1-8B.

Key Insights and Ideas

  • Reconstruction Error is an Incomplete Proxy: The paper reveals that standard reconstruction error and diagonal input scores are simply mathematically "reduced" versions of the full quantization price. They only preserve correct configuration rankings if downstream curvature or cross-channel input covariances happen to be constant across all candidates—which is rarely true.
  • A Unified Language for PTQ: Different PTQ mechanisms are often viewed as distinct techniques. This framework unifies them: changing finite formats or granularities alters the perturbation moments, while equivalent transformations (like rotations or scaling) alter the input metric and coordinate system. Both ultimately manifest as changes to the same error covariance matrix $\boldsymbol{\Sigma}$ being priced by the reference model.
  • Linear Decomposition Holds: Controlled perturbation experiments confirm that the local, linearized price decomposition accurately tracks the global KL drift of the model, validating the use of localized layer-wise pricing.

Key Results

  • Strong Alignment with Actual Drift: The implemented trace price correlates exceptionally well with actual measured full-model KL drift, achieving log-scale correlation coefficients ($\rho$) between $0.92$ and $0.95$ across different architectures.
Figure 1: Realized quantization price (8) (left two panels) and implemented trace price (18) (right two panels) versus full-precision-to-quantized KL drift (2) under controlled perturbations. Each point is a candidate configuration, with marker styles indicating transformation constraints and colors indicating bitwidth or granularity choices. The reported ρ summarizes the log-scale alignment.
  • Superior Performance at Lower Search Cost: When applied to bit allocation on Llama-3.2-1B, the price-guided selector outperformed the Hessian-based HIGGS method and matched or exceeded the search-based AMQ method in downstream task accuracy, while being orders of magnitude faster to compute.
Table 1: Price-guided configuration selection results on Llama-3.2-1B. The FP16 row is the unquan- tized reference. PPL is evaluated on WikiText2. Selection time reports the core configuration decision procedure, which excludes the subsequent quantization and evaluation pass. The best and second-best results are highlighted in bold and underline, respectively.
  • Robustness Across Scales: The advantages held true as models scaled up to 3B and 8B parameters, with the price-guided selector consistently identifying the best transformation and granularity configurations to minimize perplexity degradation.

Limitations and Future Work

  • Weight-Space Scope: The primary framework is strictly scoped to weight-space PTQ. While the authors outline a theoretical "Weight-Activation Extension" in the appendix, joint weight-activation quantization, KV-cache quantization, and Quantization-Aware Training (QAT) introduce first-order biases and non-local effects that require more complex modeling.
  • Extreme Low-Bit Nonlocality: The quadratic price relies on a local Taylor expansion. In ultra-low-bit regimes (e.g., $<2$ bits) where quantization errors are massive and highly non-local, the Taylor remainder terms may become significant, potentially degrading the predictor's accuracy.

Summary updated

BibTeX
@inproceedings{qiu2026predicting,
  author = {Junbin Qiu and Jian Mu and Weitong Zhang and Yao Shu},
  title = {{Predicting Quantization Price for Selecting PTQ Configurations Before Deployment}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=LWK4LetKST},
}
Figure