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

Charlie Blake, Douglas Orr, Carlo Luschi
3/20/2023
cs.LG

No official code found. Best implementation: graphcore-research/unit-scaling-demo (16 stars, MIT, TensorFlow, last commit 2024-03-12).

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.

View on arXivView PDF

Code Implementations(1)

TensorFlowMIT

Unit Scaling demo and experimentation code

161Shell, PythonMar 14, 20232 years agoMIT
deep-learningkeraslanguage-modellow-precision-training

Similar Papers

Cite this paper

@article{blake2023unit,
  title  = {Unit Scaling: Out-of-the-Box Low-Precision Training},
  author = {Charlie Blake and Douglas Orr and Carlo Luschi},
  year   = {2023},
  eprint = {2303.11257},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2303.11257v2},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.11257.svg)](https://codeofpaper.com/paper/2303.11257)

Discussion