LLM Quantization Calibration: From Min-Max to GPTQ and AWQ
A practical guide to quantization calibration for large language models. This article explains why naive quantization destroys accuracy, breaks down four mainstream calibration methods—global Min-Max, group-wise Min-Max, GPTQ, and AWQ—compares their precision, cost, and hardware compatibility, and offers concrete selection advice for INT4 and INT8 deployment.
1. Quantization in Practice: The Accuracy Challenge
Large language models carry billions to hundreds of billions of parameters. Take a 7B model: storing weights in 32-bit floating point requires 4 bytes per parameter, pushing total memory usage past 28GB—far beyond what consumer hardware can handle. Quantization maps high-precision floats to low-bit integers (such as 4-bit or 8-bit), cutting memory footprint to a quarter or even an eighth of the original while accelerating inference through integer arithmetic. But quantization is not lossless compression. At its core, it re-expresses a continuous weight distribution within a limited set of discrete values—like repainting an oil painting with a handful of pigments—so some information loss is inevitable.
Consider INT4: only 16 values are available (typically -8 to 7 or 0 to 15), while the original FP32 range is effectively unbounded. With a naive linear mapping, extreme weight values stretch the entire quantization range, squeezing the bulk of the weights into a narrow band of integers. Large numbers of intermediate values get rounded to the same integer, and model accuracy drops sharply. This is the central pain point of quantization: how do you find the optimal mapping so that the low-precision representation stays as close as possible to the original weight distribution? The answer is calibration.
Calibration is essentially about determining two key parameters: the scale and the zero point. The scale defines the ratio between floating-point values and integers; the zero point corrects for offset when the distribution is asymmetric. A good calibration algorithm adapts these mapping parameters to the actual weight distribution, striking the best balance between compression ratio and accuracy retention. This article walks through four mainstream calibration algorithms—their principles, costs, and best-fit scenarios—and traces the path that takes low-bit quantization from theory to production.
2. From Naive to Refined: The Evolution of Four Calibration Algorithms
2.1 Global Min-Max: The Simplest Baseline
The most straightforward approach is to record the minimum and maximum of the entire weight tensor and divide that range evenly across the integer intervals:
scale = (max - min) / (qmax - qmin)zero_point = qmin - round(min / scale)
Here qmin and qmax are the integer bounds (e.g., -8 and 7 for INT4). The method is trivial to implement—calibration takes a single pass over the weights—and the computational cost is negligible. Its fatal weakness, however, is sensitivity to outliers: if even a tiny number of extreme values sit far from the main distribution, they dominate the quantization range and force most weights into a narrow slice of integers. For example, if weights are concentrated in [-1, 1] but a single weight equals 50, the global range is stretched so severely that the effective step size for the main body of weights degrades drastically. Global Min-Max is therefore only suitable for fairly uniform distributions without obvious outliers—such as 8-bit quantization or some fully connected layers—and is practically unusable for INT4.
2.2 Group-wise Min-Max: The Foundation of INT4 Quantization
To fix the shortcomings of global calibration, researchers introduced grouping: split the weight matrix into groups by row or by channel, and compute Min-Max independently for each group, producing per-group scale factors. For a weight matrix of shape [out_features, in_features], you can group by row (i.e., per output channel) or by smaller blocks (e.g., every 64 weights). Finer granularity adapts better to local distributions but adds storage overhead—each group needs its own scale and zero point. In practice, group sizes of 32, 64, or 128 are common, balancing accuracy against extra cost.
The core advantage of group-wise Min-Max is that it respects distribution differences across channels. In deep models, weight distributions vary widely between output features—some channels have large magnitudes, others small—and a single global scale flattens those differences. With grouping, each group gets a quantization step matched to its own range, so the available integer values are used far more effectively. This is why group-wise calibration has become the de facto standard for INT4 quantization, adopted by default in nearly all mainstream quantization frameworks. Note, however, that group-wise Min-Max still cannot handle outliers within a group—if a group contains an extreme value, the rest of that group’s weights still suffer. That gap motivated more sophisticated error-compensation methods.
2.3 GPTQ: Iterative Compensation Based on Second-Order Error
GPTQ (Generative Pre-trained Transformer Quantization) treats quantization as an optimization problem: choose a set of quantized weights that minimizes the impact on model outputs. It leverages a second-order Taylor expansion of the loss, using the Hessian matrix to measure each weight’s sensitivity to the output. The core idea is to quantize weights column by column (or group by group), and after each step, adjust the remaining unquantized weights to compensate for the quantization error introduced so far.
The workflow, simplified: first compute an approximate inverse Hessian for the weight matrix, then process columns in order. For each column, perform quantization and use the inverse Hessian information to update all subsequent weights, so that the output error caused by quantizing that column is absorbed by the weights that follow. This “update-and-compensate” mechanism allows GPTQ to retain high accuracy even at very low bit widths (such as 4-bit), working much like error feedback in lossy compression. The trade-off: GPTQ needs a substantial amount of representative calibration data (typically training or fine-tuning samples) to estimate the Hessian, carries higher computational complexity, and requires forward passes during calibration, demanding decent memory and compute. Still, compared with retraining or fine-tuning from scratch, GPTQ is an efficient post-training quantization method—well suited to teams that want fast deployment and have a reasonable calibration dataset available.
2.4 AWQ: Activation-Aware Channel Protection
AWQ (Activation-aware Weight Quantization) takes a different angle: instead of looking only at weight distributions, it uses activation (input feature) distributions to decide which weight channels matter most. The key observation is that input channels contribute very unevenly to model outputs. A few “salient channels” may have small weight magnitudes but correspond to high-magnitude activations, making them extremely sensitive to quantization error. Quantizing all channels uniformly produces significant errors on these critical channels and degrades overall performance.
AWQ’s method is remarkably lightweight: it first measures the average activation magnitude per input channel on calibration data, then applies stronger protection to high-magnitude channels—effectively shrinking the quantization scale (giving a smaller quantization step) for the weights tied to those channels. In other words, it deliberately “favors” important channels at the expense of less important ones. Unlike GPTQ, AWQ requires no backpropagation or Hessian computation—just one forward pass for statistics—so it is extremely fast and needs only a small amount of calibration data. Experiments show that at the same bit width, AWQ often outperforms group-wise Min-Max and even approaches GPTQ accuracy, while costing an order of magnitude less compute. AWQ is also frequently combined with group-wise calibration, adjusting scaling within each group by channel importance to close the remaining accuracy gap.
3. Going Deeper: Weight Utilization and Hybrid Strategies
Whether via grouping or error compensation, the ultimate goal of all these methods is to improve weight utilization—how effectively INT4’s 16 discrete values are actually covered. If most weights map to only a handful of integers after quantization (say, heavily concentrated at -1 and 0), the mapping doesn’t match the distribution and the information entropy is low. High utilization means quantized values spread as evenly as possible across the integer domain, maximizing expressive capacity. Group-wise calibration naturally improves utilization, while AWQ actively reallocates value ranges by weighting channels, letting important channels occupy more distinct integers.
Engineering practice also allows mixed-precision strategies: keep higher bit widths (INT8 or FP16) for sensitive layers such as the Q, K, and V matrices in attention, and use INT4 for less sensitive layers such as parts of the FFN. Combined with group-wise Min-Max or AWQ calibration, this drives accuracy loss close to zero while adding only a marginal increase in overall memory usage. Quantization-aware training (QAT) is another path, but it is expensive and typically reserved for extreme compression cases. Post-training quantization (PTQ), with its plug-and-play nature and no retraining requirement, remains the mainstream choice for LLM deployment.
4. Side-by-Side Comparison and Selection Guide
The table below compares the four algorithms across five dimensions:
| Algorithm | Accuracy Retention | Compute Cost | Calibration Data | Hardware Compatibility | Best For |
|---|---|---|---|---|---|
| Global Min-Max | Low | Very low | None | Excellent | 8-bit quantization; layers with uniform distributions |
| Group-wise Min-Max | Medium | Low | None | Excellent | Baseline for INT4; broadly applicable |
| GPTQ | High | High | Sufficient calibration data required | Good | Maximum accuracy; offline processing acceptable |
| AWQ | High | Medium | Small calibration set | Good | Fast deployment; high accuracy with limited compute |
Selection guidance:
- If you only need to compress a model from FP16 to INT8 quickly, global Min-Max is enough.
- If your target is INT4 with maximum generality, group-wise Min-Max is the default starting point.
- If accuracy loss exceeds expectations, try AWQ first—it delivers significant gains at low cost.
- If you have ample calibration data and latency during quantization is not a concern, GPTQ can push accuracy even closer to the original, especially for one-off offline quantization.
5. Practical Tips and Future Trends
When putting a quantization calibration pipeline into production, keep the following in mind:
- Calibration data should reflect the distribution of real inference scenarios; avoid noise samples unrelated to the task.
- Run accuracy checks on a small validation set after quantization; if specific layers show anomalies, raise the bit width for those layers individually.
- Finer grouping is not always better—overly fine groups inflate scale-factor storage overhead and erode memory savings. Group sizes of 64 or 128 are usually a good choice.
- Inference engines that support dynamic quantization (e.g., per-layer activation quantization) can further reduce memory bandwidth pressure, at the cost of added computational complexity.
As LLMs move toward on-device deployment, even lower bit widths (3-bit, 2-bit) and mixed-precision quantization are active research areas. Calibration algorithms are also evolving from static statistics toward gradient-driven dynamic optimization, with the long-term goal of quantization that requires no calibration data at all. The fundamentals, however, never change: understanding weight distributions, activation distributions, and how errors propagate is the essence of every accuracy-preservation scheme. With a solid grasp of the four calibration algorithms covered here, you can flexibly combine them to build the optimal quantization strategy for your hardware and accuracy requirements—freeing LLMs from the constraints of cloud servers and powering the next wave of edge AI applications.
