ChatPaper.aiChatPaper

FP8-LM: FP8 대규모 언어 모델 학습

FP8-LM: Training FP8 Large Language Models

October 27, 2023
저자: Houwen Peng, Kan Wu, Yixuan Wei, Guoshuai Zhao, Yuxiang Yang, Ze Liu, Yifan Xiong, Ziyue Yang, Bolin Ni, Jingcheng Hu, Ruihang Li, Miaosen Zhang, Chen Li, Jia Ning, Ruizhe Wang, Zheng Zhang, Shuguang Liu, Joe Chau, Han Hu, Peng Cheng
cs.AI

초록

본 논문에서는 대규모 언어 모델(LLM)의 효율적인 학습을 위한 FP8 저비트 데이터 포맷을 탐구합니다. 우리의 핵심 통찰은 LLM 학습 과정에서의 대부분의 변수들, 예를 들어 그래디언트와 옵티마이저 상태 등이, 모델 정확도를 저하시키지 않으면서도 하이퍼파라미터 변경 없이 저정밀도 데이터 포맷을 사용할 수 있다는 점입니다. 구체적으로, 우리는 LLM 학습을 위한 새로운 FP8 자동 혼합 정밀도 프레임워크를 제안합니다. 이 프레임워크는 LLM의 혼합 정밀도 및 분산 병렬 학습을 간소화하기 위해 세 가지 수준의 FP8 활용 방식을 제공합니다. 이는 8비트 그래디언트, 옵티마이저 상태, 그리고 분산 학습을 점진적으로 통합하는 방식입니다. 실험 결과에 따르면, H100 GPU 플랫폼에서 GPT-175B 모델을 학습하는 동안, 우리의 FP8 혼합 정밀도 학습 프레임워크는 실제 메모리 사용량을 42%나 줄이는 놀라운 성과를 거두었을 뿐만 아니라, 널리 사용되는 BF16 프레임워크(예: Megatron-LM)보다 64% 더 빠르게 동작하여 Nvidia Transformer Engine의 속도를 17% 앞질렀습니다. 이는 대규모 기반 모델의 학습 비용을 크게 절감합니다. 더 나아가, 우리의 FP8 혼합 정밀도 학습 방법론은 일반적입니다. 이는 LLM 지시 튜닝 및 인간 피드백을 통한 강화 학습과 같은 다른 작업에도 원활하게 적용될 수 있으며, 미세 조정 비용을 절약할 수 있습니다. 우리의 FP8 저정밀도 학습 프레임워크는 {https://github.com/Azure/MS-AMP}{aka.ms/MS.AMP}에서 오픈소스로 제공됩니다.
English
In this paper, we explore FP8 low-bit data formats for efficient training of large language models (LLMs). Our key insight is that most variables, such as gradients and optimizer states, in LLM training can employ low-precision data formats without compromising model accuracy and requiring no changes to hyper-parameters. Specifically, we propose a new FP8 automatic mixed-precision framework for training LLMs. This framework offers three levels of FP8 utilization to streamline mixed-precision and distributed parallel training for LLMs. It gradually incorporates 8-bit gradients, optimizer states, and distributed learning in an incremental manner. Experiment results show that, during the training of GPT-175B model on H100 GPU platform, our FP8 mixed-precision training framework not only achieved a remarkable 42% reduction in real memory usage but also ran 64% faster than the widely adopted BF16 framework (i.e., Megatron-LM), surpassing the speed of Nvidia Transformer Engine by 17%. This largely reduces the training costs for large foundation models. Furthermore, our FP8 mixed-precision training methodology is generic. It can be seamlessly applied to other tasks such as LLM instruction tuning and reinforcement learning with human feedback, offering savings in fine-tuning expenses. Our FP8 low-precision training framework is open-sourced at {https://github.com/Azure/MS-AMP}{aka.ms/MS.AMP}.
PDF332December 15, 2024