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.
The top 3
- Alpha's Spectrum: From RTN to Over-Protection: The 'alpha' hyperparameter in AWQ directly modulates per-channel scaling: an alpha of 0 defaults to basic Round-to-Nearest (RTN) quantization, offering no special protection, while an alpha of 1 makes scales directly proportional to activation magnitudes, often over-protecting outliers. Optimal values typically range from 0.5 to 0.8 per layer.
- Alpha's Calibration: Fast Grid Search for Precision: AWQ efficiently determines the optimal 'alpha' for each layer through a rapid grid search across 20 values in the [0, 1] interval. This calibration process involves running around 128 samples, calculating per-channel activation magnitudes, and selecting the 'alpha' that minimizes FP16 layer output reconstruction error, completing in seconds per layer.
- Alpha's Scaling Equation: Empowering Salient Weights: The 'alpha' parameter in AWQ defines per-channel scaling factors as s_i = a_i^alpha, where a_i is the average activation magnitude for a channel. This mechanism allows AWQ to effectively 'scale up' salient weight channels before quantization, granting them more effective precision without resorting to hardware-unfriendly mixed-precision formats.
Sources
Open the full topic