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

Charlie Blake, Douglas Orr, Carlo Luschi
Proceedings of the 40th International Conference on Machine Learning, PMLR 202:2548-2576, 2023.

Abstract

We present unit scaling, a paradigm for designing deep learning models that simplifies the use of low-precision number formats. Training in FP16 or the recently proposed FP8 formats offers substantial efficiency gains, but can lack sufficient range for out-of-the-box training. Unit scaling addresses this by introducing a principled approach to model numerics: seeking unit variance of all weights, activations and gradients at initialisation. Unlike alternative methods, this approach neither requires multiple training runs to find a suitable scale nor has significant computational overhead. We demonstrate the efficacy of unit scaling across a range of models and optimisers. We further show that existing models can be adapted to be unit-scaled, training BERT-Large in FP16 and then FP8 with no degradation in accuracy.

Cite this Paper


BibTeX
@InProceedings{pmlr-v202-blake23a, title = {Unit Scaling: Out-of-the-Box Low-Precision Training}, author = {Blake, Charlie and Orr, Douglas and Luschi, Carlo}, booktitle = {Proceedings of the 40th International Conference on Machine Learning}, pages = {2548--2576}, year = {2023}, editor = {Krause, Andreas and Brunskill, Emma and Cho, Kyunghyun and Engelhardt, Barbara and Sabato, Sivan and Scarlett, Jonathan}, volume = {202}, series = {Proceedings of Machine Learning Research}, month = {23--29 Jul}, publisher = {PMLR}, pdf = {https://proceedings.mlr.press/v202/blake23a/blake23a.pdf}, url = {https://proceedings.mlr.press/v202/blake23a.html}, abstract = {We present unit scaling, a paradigm for designing deep learning models that simplifies the use of low-precision number formats. Training in FP16 or the recently proposed FP8 formats offers substantial efficiency gains, but can lack sufficient range for out-of-the-box training. Unit scaling addresses this by introducing a principled approach to model numerics: seeking unit variance of all weights, activations and gradients at initialisation. Unlike alternative methods, this approach neither requires multiple training runs to find a suitable scale nor has significant computational overhead. We demonstrate the efficacy of unit scaling across a range of models and optimisers. We further show that existing models can be adapted to be unit-scaled, training BERT-Large in FP16 and then FP8 with no degradation in accuracy.} }
Endnote
%0 Conference Paper %T Unit Scaling: Out-of-the-Box Low-Precision Training %A Charlie Blake %A Douglas Orr %A Carlo Luschi %B Proceedings of the 40th International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2023 %E Andreas Krause %E Emma Brunskill %E Kyunghyun Cho %E Barbara Engelhardt %E Sivan Sabato %E Jonathan Scarlett %F pmlr-v202-blake23a %I PMLR %P 2548--2576 %U https://proceedings.mlr.press/v202/blake23a.html %V 202 %X We present unit scaling, a paradigm for designing deep learning models that simplifies the use of low-precision number formats. Training in FP16 or the recently proposed FP8 formats offers substantial efficiency gains, but can lack sufficient range for out-of-the-box training. Unit scaling addresses this by introducing a principled approach to model numerics: seeking unit variance of all weights, activations and gradients at initialisation. Unlike alternative methods, this approach neither requires multiple training runs to find a suitable scale nor has significant computational overhead. We demonstrate the efficacy of unit scaling across a range of models and optimisers. We further show that existing models can be adapted to be unit-scaled, training BERT-Large in FP16 and then FP8 with no degradation in accuracy.
APA
Blake, C., Orr, D. & Luschi, C.. (2023). Unit Scaling: Out-of-the-Box Low-Precision Training. Proceedings of the 40th International Conference on Machine Learning, in Proceedings of Machine Learning Research 202:2548-2576 Available from https://proceedings.mlr.press/v202/blake23a.html.

Related Material