Normalization Layers: Sensitive to Statistic Perturbation
Normalization layers (e.g., LayerNorm, RMSNorm) are highly susceptible to quantization errors because low-precision activations can significantly distort the calculated mean, variance, or RMS statistics, leading to network instability. RMSNorm, by not centering activations, can exacerbate issues as its outputs may drift from a zero mean, impacting optimal quantization.
The top 3
- LayerNorm vs. RMSNorm: Quantization Robustness: Layer Normalization generally offers better stability in low-bit quantization for LLMs due to its mean-centering property, while RMS Normalization, though computationally faster, can be more susceptible to activation shifts.
- Top 2 Statistics Quantization Disrupts in Norm Layers: Quantization primarily perturbs the mean and variance of activations, which are crucial for normalization layers like LayerNorm, directly causing shifts in the output distribution and potential model instability.
- Top 3 Techniques for Robust Quantized Norm Layers: Quantization-Aware Training (QAT), mixed-precision quantization (leaving sensitive layers in higher precision), and fusing normalization operations with linear layers are key strategies to maintain accuracy in low-bit normalized layers.
Sources
Open the full topic