AWQ's 1D Search Objective: Minimizing Layer Output Error

The 1D grid search in AWQ primarily optimizes scaling factors by minimizing the layer-output reconstruction error on a small calibration dataset, ensuring the quantized model's output closely matches the full-precision version.

The top 3

  1. AWQ's Error Metric: FP16 Reconstruction Loss: AWQ's 1D grid search minimizes the reconstruction error by comparing the quantized layer's output to its full-precision (FP16) counterpart, ensuring the scaled-and-quantized layer's output closely matches the original.
  2. Scaling Factor, Not Weights: AWQ's Optimization Target: Unlike GPTQ, which directly optimizes quantized weights, AWQ's 1D search focuses on finding the optimal *scaling factor* (alpha or 's') for weights. This factor shifts the dynamic range, allowing naive INT4 rounding to achieve better accuracy by effectively giving salient weights more precision.
  3. Rapid Calibration: 1D Search with Minimal Data: AWQ's 1D search for optimal scaling factors is highly efficient, typically completing in seconds per layer by evaluating around 20 'alpha' values. It utilizes a small calibration dataset (16-128 samples) to gather activation statistics without requiring complex gradient computations.

Sources

Open the full topic