DeepSpeed와 Megatron을 이용한 대규모 생성 언어 모델 Megatron-Turing NLG 530B 학습
Using DeepSpeed and Megatron to Train Megatron-Turing NLG 530B, A Large-Scale Generative Language Model
사전 학습된 범용 언어 모델은 제로샷(zero-shot), 퓨샷(few-shot) 및 미세 조정(fine-tuning) 기술을 통해 다운스트림 작업에 적응함으로써 다양한 자연어 처리 도메인에서 최첨단 정확도를 달성할 수 있습니다. 이러한 성공으로 인해 모델의 크기가 급격히 증가했으며, 이처럼 거대한 모델을 학습시키기 위해서는 고성능 하드웨어, 소프트웨어 및 알고리즘 기술이 필요하게 되었습니다. Microsoft와 NVIDIA의 협력 결과로서, 우리는 5,300억 개의 파라미터를 보유한 가장 큰 단일 트랜스포머 기반 언어 모델인 Megatron-Turing NLG 530B(MT-NLG)의 학습에 대한 세부 정보를 제시합니다. 본 논문에서는 먼저 DeepSpeed와 Megatron을 사용하여 이 모델을 학습시키는 데 활용된 인프라와 3D 병렬화 방법론에 중점을 둡니다. 다음으로, 모델 성공의 핵심 요소라고 판단되는 학습 과정, 학습 코퍼스 설계 및 데이터 큐레이션 기술에 대해 자세히 설명합니다. 마지막으로, 다양한 평가 결과와 함께 MT-NLG가 보여주는 흥미로운 관찰 결과 및 새로운 특성에 대해 논의합니다. 우리는 MT-NLG가 여러 NLP 벤치마크에서 우수한 제로샷, 원샷 및 퓨샷 학습 정확도를 달성하고 새로운 최고 성능(state-of-the-art)을 수립했음을 입증합니다. 우리의 기여가 대규모 학습 인프라, 대규모 언어 모델 및 자연어 생성 분야의 발전에 도움이 되기를 기대합니다.
Pretrained general-purpose language models can achieve state-of-the-art accuracies in various natural language processing domains by adapting to downstream tasks via zero-shot, few-shot and fine-tuning techniques. Because of their success, the size of these models has increased rapidly, requiring high-performance hardware, software, and algorithmic techniques to enable training such large models. As the result of a joint effort between Microsoft and NVIDIA, we present details on the training of the largest monolithic transformer based language model, Megatron-Turing NLG 530B (MT-NLG), with 530 billion parameters. In this paper, we first focus on the infrastructure as well as the 3D parallelism methodology used to train this model using DeepSpeed and Megatron. Next, we detail the training process, the design of our training corpus, and our data curation techniques, which we believe is a key ingredient to the success of the model. Finally, we discuss various evaluation results, as well as other interesting observations and new properties exhibited by MT-NLG. We demonstrate that MT-NLG achieves superior zero-, one-, and few-shot learning accuracies on several NLP benchmarks and establishes new state-of-the-art results. We believe that our contributions will help further the development of large-scale training infrastructures, large-scale language models, and natural language generations.
AI Analysis
Korean Summary
Key Innovations
- 데이터, 텐서, 파이프라인 병렬화를 결합하여 메모리와 연산 효율을 극대화한 '3D 병렬화(3D Parallelism)' 기법
- 하드웨어의 대역폭 특성을 고려하여 GPU 간 통신 병목을 최소화한 '토폴로지 인식 3D 매핑(Topology-Aware 3D Mapping)'
- DeepSpeed와 Megatron-LM의 강점을 통합한 확장 가능한 학습 소프트웨어 스택
- Common Crawl 및 The Pile 데이터에 대한 정교한 필터링 및 퍼지(fuzzy) 중복 제거를 통한 고품질 학습 데이터셋 구축
- 대규모 모델의 사회적 편향성(성별, 인종 등) 및 문맥 내 학습(In-Context Learning) 특성에 대한 심층 분석
Learning & Inference Impact
학습 측면에서는 수천 개의 GPU를 활용해 수천억 파라미터 규모의 모델을 효율적으로 학습시킬 수 있는 시스템적 기반을 마련하여, 기존의 메모리 및 통신 병목 현상을 해결했습니다. 추론 측면에서는 모델의 규모가 커짐에 따라 별도의 파인튜닝 없이도 프롬프트만으로 복잡한 자연어 이해, 상식 추론, 코드 생성 등이 가능한 강력한 문맥 내 학습 능력을 보여주었습니다. 이는 초대형 모델이 퓨샷 학습 설정에서 좁은 분포의 데이터에 과적합되지 않고 일반화된 성능을 낼 수 있음을 시사합니다.
Technical Difficulty
Estimated implementation complexity based on methodology.