NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Unit Scaling: Out-of-the-Box Low-Precision Training

Charlie Blake, Douglas Orr, Carlo Luschi

Introduction

Training large-scale deep learning models is computationally intensive. To mitigate costs, researchers are increasingly adopting low-precision numerical formats such as FP16 and the newer 8-bit FP8. However, these formats possess a significantly narrower representable range compared to standard FP32. Without careful management, activations and gradients can easily underflow to zero or overflow to infinity (NaN).

The prevailing industry solution is Loss Scaling, which applies a global multiplier to gradients to shift them into a representable range. While effective, loss scaling often requires manual hyperparameter tuning, can be unstable, and fails to address the varying scales across different network layers. This paper introduces Unit Scaling, a principled design paradigm that ensures all tensors maintain a standard deviation of approximately one, enabling stable low-precision training without manual intervention.

The Unit Scaling Paradigm

The core philosophy of Unit Scaling is to treat tensor scale as a primary architectural design constraint. By ensuring that every activation, weight, and gradient has a variance of approximately one at initialization, the model's values are centered in the "logarithmic sweet spot" of floating-point formats.

Comparison of exponent distributions between standard Loss Scaling and the proposed Unit Scaling. Unit Scaling keeps values centered around zero (unit variance), preventing underflow and overflow.

Methodology

To maintain unit variance throughout the network, the authors propose several modifications to standard model components:

  1. Scaled Operations: Standard operations like matrix multiplications (matmul) and activation functions (e.g., GeLU) are redefined to include fixed scaling factors. For instance, a matmul is scaled by $m^{-1/2}$ to preserve output variance.
  2. Constraint-Scaled Graphs: A mathematical framework identifies "cut-edges" in the computational graph, allowing for independent scaling of different paths while preserving the underlying calculus.
  3. Weighted Residual Connections: Standard residual additions ($x + f(x)$) are replaced with weighted interpolations ($\sqrt{1-\tau}x + \sqrt{\tau}f(x)$) to prevent variance accumulation.

Theoretical Justification

The choice of unit variance ($\sigma = 1$) is not arbitrary. As shown in Figure 3, $\sigma = 1$ (or $2^0$) represents the center of the high Signal-to-Noise Ratio (SNR) region for FP16 and FP8 formats. Centering distributions here provides maximum headroom for values to fluctuate during training without encountering range limits.

Signal-to-Noise Ratio (SNR) across different scales for various floating-point formats. Unit scaling targets the peak SNR region around $\sigma = 2^0$.

Experimental Results

The authors validated Unit Scaling across diverse architectures (Attention, RNN, CNN) and benchmarks, including WikiText-103 and English Wikipedia.

BERT-Large in FP8

A key highlight of the work is the successful training of BERT-Large in FP8 (using E4M3 and E5M2 formats) without any loss scaling. The resulting models showed zero accuracy degradation on downstream tasks like SQuAD v1.1 and v2.0 compared to FP16 baselines.

Efficiency and Robustness

Unit Scaling introduces negligible computational overhead—approximately 0.2% for BERT-Large—as scaling factors are fixed scalars that can be fused into existing kernels. The method proved robust across different optimizers, including SGD, Adam, and LAMB.

Conclusion

Unit Scaling offers a robust, "out-of-the-box" alternative to traditional loss scaling for low-precision training. By embedding scale management directly into the model architecture, it simplifies the training pipeline and paves the way for wider adoption of 8-bit and even lower-precision formats in large-scale AI. Future work may explore automated "drop-in" implementations for existing deep learning frameworks and the interaction of unit scaling with extremely deep architectures.

Summary updated

BibTeX
@inproceedings{blake2023unit,
  author = {Charlie Blake and Douglas Orr and Carlo Luschi},
  title = {{Unit Scaling: Out-of-the-Box Low-Precision Training}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=A8HOsNfish},
}
Figure