Skip to main content
QUICK REVIEW

[논문 리뷰] Mixed Precision Training

Paulius Micikevicius, Sharan Narang|arXiv (Cornell University)|2017. 10. 10.
Model Reduction and Neural Networks참고 문헌 27인용 수 866
한 줄 요약

이 논문은 FP16 저장 및 산술을 FP32 마스터 가중치 사본, 손실 스케일링, FP16 누적을 사용하여 다양한 모델과 작업에 걸쳐 FP32 수준의 정확도를 유지하는 방법을 보여준다.

ABSTRACT

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 누적을 사용하여 감소 및 누적을 수행합니다.
  • 가능한 경우 FP32 누적으로 메모리에 축적하는 FP16 연산을 텐서 코어로 가속하고 FP16 연산을 활용합니다.

실험 결과

연구 질문

  • RQ1FP32 마스터 가중치 사본, 손실 스케일링 및 FP16에서 FP32로의 누적을 사용한 FP16 학습이 다양한 모델에서 FP32에 상당하는 정확도를 달성할 수 있을까?
  • RQ2학습 중 FP16에서 정보 손실을 방지하기 위해 필요한 실제 요건(기법, 스케일링 인자)은 무엇일까?
  • RQ3CNN, RNN, GAN에서 혼합 정밀도 학습은 FP32 기준과 비교하여 어떤 성능을 보이나?
  • RQ4작업과 아키텍처 전반에 걸친 메모리 사용량 및 학습 속도에 어떤 영향이 있을까?

주요 결과

모델기준혼합 정밀도참조
AlexNet56.77%56.93%Krizhevsky et al., 2012
VGG-D65.40%65.43%Simonyan and Zisserman, 2014
GoogLeNet (Inception v1)68.33%68.43%Szegedy et al., 2015
Inception v270.03%70.02%Ioffe and Szegedy, 2015
Inception v373.85%74.13%Szegedy et al., 2016
Resnet5075.92%76.04%He et al., 2016b
  • FP32 마스터 가중치를 갖춘 FP16 저장은 AlexNet, VGG-D, GoogLeNet, Inception 변형 및 ResNet-50에 대해 CNN에서 ILSVRC 분류 정확도와 일치한다.
  • 손실 스케일링은 FP16을 사용할 때 탐지 및 기타 작업에 대해 안정적인 학습을 가능하게 한다.
  • FP16 산술과 FP32 누적, 선택적 FP32 축소를 혼합하면 중요한 그래디언트 정보를 보존한다.
  • CNN, RNN, GAN 전체에서 혼합 정밀도 학습은 FP32에 비해 비슷한 정확도를 달성하면서 상당한 메모리 절감을 제공한다.
  • Volta GPU에서 메모리 또는 산술 바운드 작업에 대해 학습 속도 향상이 최대 2배~8배 가능하고, 전체 네트워크 속도향상은 라이브러리/프레임워크에 따라 다르다.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.