Mixed Precision Training
Paulius Micikevicius, Sharan Narang, Jonah Alben et al. · arXiv (Cornell University) · 2017
Deep neural networks have enabled progress in a wide variety of applications. Growing the size of the neural network typically results in improved accuracy. As model sizes grow, the memory and compute requirements for training these models also increases. We introduce a technique to train deep neural networks using half precision floating point numbers. In our technique, weights, activations and gradients are stored in IEEE half-precision format. Half-precision floating numbers have limited numerical range compared to single-precision numbers. We propose two techniques to handle this loss of information. Firstly, we recommend maintaining a single-precision copy of the weights that accumulates the gradients after each optimizer step. This single-precision copy is rounded to half-precision format during training. Secondly, we propose scaling the loss appropriately to handle the loss of information with half-precision gradients. We demonstrate that this approach works for a wide variety of models including convolution neural networks, recurrent neural networks and generative adversarial networks. This technique works for large scale models with more than 100 million parameters trained on large datasets. Using this approach, we can reduce the memory consumption of deep learning models by nearly 2x. In future processors, we can also expect a significant computation speedup using half-precision hardware units.
Cited by 938 works. doi:10.48550/arxiv.1710.03740 Open-access PDF
Authors
- Paulius Micikevicius
- Sharan Narang
- Jonah Alben
- Gregory Diamos
- Erich Elsen
- Boris Ginsburg
- Oleksii Kuchaiev
- Ganesh Venkatesh
- Hao Wu
References
- Long Short-Term Memory
- Very Deep Convolutional Networks for Large-Scale Image Recognition
- Going deeper with convolutions
- ImageNet Large Scale Visual Recognition Challenge
- Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift
- Rethinking the Inception Architecture for Computer Vision
- SSD: Single Shot MultiBox Detector
- Caffe: Convolutional Architecture for Fast Feature Embedding
- Identity Mappings in Deep Residual Networks
- Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation