[論文レビュー] Mixed Precision Training
本論文は、FP16ストレージと演算を用い、FP32マスターウェイトのコピー、損失スケーリング、FP16の蓄積により、多様なモデルとタスク全体でFP32レベルの精度を維持する深層ネットワークの訓練方法を示している。
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.
研究の動機と目的
- 大規模ニューラルネットワークの訓練におけるメモリと計算の要求を削減する。
- 低精度(FP16)で訓練する際にFP32レベルの精度を維持する。
- 多様なアーキテクチャとタスクに適用可能な、実用的でハイパーパラメータに依存しないアプローチを提供する。
提案手法
- 順伝播/逆伝播の間、ウェイト、活性化、勾配をFP16で格納する。
- ウェイトのFP32マスターコピーを安全に更新の蓄積用に維持する。
- FP16で小さな勾配値を保持するために損失スケーリングを適用する。
- 必要に応じて、FP16演算を行い、FP32で還元・蓄積を行う(例:ドット積、リダクション)。
- 利用可能な場合はTensor Core対応のFP16演算を使用し、FP32の蓄積をメモリへ。
実験結果
リサーチクエスチョン
- RQ1FP32マスターウェイトコピー、損失スケーリング、およびFP16からFP32への蓄積を用いたFP16訓練は、多様なモデル全体でFP32相当の精度を達成できるか?
- RQ2訓練中にFP16で情報喪失を防ぐために必要な実践的要件(技術・スケーリング因子)は何か?
- RQ3FP32ベースラインと比較して、CNN、RNN、GANにおける混合精度訓練の性能はどうか?
- RQ4タスクとアーキテクチャ全体でメモリ使用量と訓練速度への影響はどのようか?
主な発見
| モデル | ベースライン | 混合精度 | 参考文献 |
|---|---|---|---|
| AlexNet | 56.77% | 56.93% | Krizhevsky et al., 2012 |
| VGG-D | 65.40% | 65.43% | Simonyan and Zisserman, 2014 |
| GoogLeNet (Inception v1) | 68.33% | 68.43% | Szegedy et al., 2015 |
| Inception v2 | 70.03% | 70.02% | Ioffe and Szegedy, 2015 |
| Inception v3 | 73.85% | 74.13% | Szegedy et al., 2016 |
| Resnet50 | 75.92% | 76.04% | He et al., 2016b |
- FP16ストレージとFP32マスターウェイトは、AlexNet、VGG-D、GoogLeNet、Inception系、およびResNet-50に対するILSVRC分類でFP32精度と同等である。
- 検出など他のタスクでFP16を使用する際、損失スケーリングは安定した訓練を可能にする。
- FP16演算とFP32蓄積および選択的FP32リダクションを組み合わせることで、重要な勾配情報を保持する。
- CNNs、RNNs、GANs において、混合精度訓練はFP32と同等の精度を達成しつつ、著しいメモリ節約を実現する。
- Volta GPUでは、メモリ依存または演算依存のワークロードで2x〜8xの訓練速度向上が可能; 完全なネットワークの速度向上はライブラリ/フレームワークに依存する。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。