FFN Layers with GLU: Activation Spikes Cause Errors
Feed-Forward Network (FFN) layers, especially those incorporating Gated Linear Unit (GLU) variants common in models like LLaMA, frequently exhibit 'activation spikes' – extreme activation values. These spikes, often concentrated in early and late layers and specific tokens, lead to severe local quantization errors and considerable performance degradation in quantized LLMs.
The top 3
- GLU's Multiplicative Gating: Source of FFN Spikes: Modern LLMs' SwiGLU and GeGLU variants, common in FFNs, use multiplicative gating which amplifies intermediate values, systematically generating extreme activation spikes that challenge quantization.
- Activation Spikes: Token-Specific & Layer-Bound in FFNs: These problematic activation spikes in FFN layers are not uniform but occur predominantly in specific early and late layers, and are concentrated on a few individual tokens rather than being broadly distributed.
- FFN Quantization Bottleneck: Spikes Degrade LLM Accuracy: Excessive activation magnitudes in GLU-based FFNs cause severe local quantization errors, significantly degrading quantized LLM performance and making these layers a primary accuracy bottleneck for low-bit inference.
Sources
Open the full topic