AWQ's Strategic Scaling: Protecting Salient Weights

To 'protect' the identified salient weights, AWQ applies a per-channel scaling factor to them, effectively increasing their dynamic range before quantization. This makes them more distinguishable in low-bit formats, and the inverse scaling is applied to activations during inference, preserving accuracy without needing mixed-precision storage.

The top 3

  1. How AWQ's Per-Channel Scaling Factors Are Derived: AWQ computes channel-specific scaling factors by averaging the magnitudes of elements within each column of the activation matrix (X) during an offline calibration phase. These FP16 scaling factors are then applied to the weight channels (W) before quantization, and inversely to the activation matrix (X) during inference, to ensure output accuracy is preserved.
  2. Why Protecting Just 1% of Weights is Key to AWQ's Accuracy: AWQ's fundamental discovery is that preserving the precision of approximately 1% of the most 'salient' weight channels, identified by their large activation magnitudes, can drastically reduce quantization error. This approach recovers nearly all the accuracy of unquantized FP16 models, as these few critical weights disproportionately impact overall model performance.
  3. AWQ's Output Distribution Preservation: Key to Accuracy: By strategically protecting salient weights through activation-aware scaling, AWQ ensures the quantized model's output distribution closely matches the full-precision model, effectively minimizing performance degradation and maintaining high accuracy in low-bit LLMs.

Sources

Open the full topic