Online quantization derives a fresh scaling factor from the current tensor or batch instead of historical statistics. This addresses rapidly changing data distributions: stale scales can cause overflow when values grow or underflow and precision loss when values shrink. section 5.6.5
The implementation follows a short runtime calibration pass:
- Inspect the current activations or weights and find their maximum absolute value. section 5.6.5
- Derive the scaling factor from that online maximum. section 5.6.5
- Quantize the current tensor using the freshly calculated factor. section 5.6.5
- Pay a small maximum-finding overhead to obtain more accurate scaling before the expensive matrix multiplications. section 5.6.5
The result is a scale tailored to the exact dynamic range being processed, avoiding instability from stale historical information. Online quantization functions as one component of a broader FP8 design alongside mixed precision, fine-grained quantization, higher-precision accumulation, and mantissa-focused format choices. section 5.6.5 section 5.7
