Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Quantitative Finance · Begrippenlijst

Wat is Mixed-precision training, bfloat16?

Ook bekend als: mixed-precision training · bfloat16

Definition 23.3 Machine Learning for Markets · Hoofdstuk 23 — Training Infrastructure

Mixed-precision training runs the expensive operations (matrix products, convolutions) in a 16-bit format while keeping the weights, the loss and the optimiser’s state in 32 bits (Micikevicius and co-authors, 2018). bfloat16 is a 16-bit floating-point format with float32’s eight exponent bits and seven fraction bits: the same range as float32, and a machine epsilon (Book 4, chapter 25) of 2−7≈0.00782^{-7}\approx0.0078 instead of 2−232^{-23}, so no loss scaling is needed against underflow (Kalamkar and co-authors, 2019).

Training loss of the same network, same data order and same initialisation, in float32 and under bfloat16 autocast. Data: ml_train.run (fig_train.py).
Figure 23.2. Training loss of the same network, same data order and same initialisation, in float32 and under bfloat16 autocast. Data: ml_train.run (fig_train.py).
Lees in het hoofdstuk →