AWQ's Per-Channel Scaling: How Activations Protect Weights
AWQ determines per-channel scaling factors for weights by analyzing activation magnitudes, typically averaging them across a calibration dataset, to shrink the dynamic range of salient weights before quantization and reduce error. This scaling is then absorbed into the model for efficient low-bit inference. [2, 4, 5, 6, 7, 8]
The top 3
- AWQ's Output-Preserving Algebraic Scaling: AWQ 'protects' critical weights by scaling them down per-channel before quantization, reducing their dynamic range for lower error. To maintain the original output, activations are inversely scaled during inference, often fused into preceding operations, leveraging an algebraic identity.
- AWQ's Edge Over Mixed Precision & GPTQ: AWQ achieves accuracy comparable to mixed-precision (1% FP16) without hardware inefficiencies. It also calibrates 5-10x faster than GPTQ by avoiding computationally intensive Hessian matrix approximations, making it a preferred choice for INT4 weight-only quantization.
- Alpha's Role in AWQ's Precision-Efficiency Balance: AWQ's per-channel scaling factors are modulated by a tunable hyperparameter, 'alpha' (α), which balances the protection of salient versus non-salient channels. The optimal alpha, typically found via grid search between 0.5 and 0.8, is crucial for balancing accuracy and compression.
Sources
Open the full topic