NVFP4를 사용한 대규모 언어 모델 사전 학습
Pretraining Large Language Models with NVFP4
September 29, 2025
저자: NVIDIA, Felix Abecassis, Anjulie Agrusa, Dong Ahn, Jonah Alben, Stefania Alborghetti, Michael Andersch, Sivakumar Arayandi, Alexis Bjorlin, Aaron Blakeman, Evan Briones, Ian Buck, Bryan Catanzaro, Jinhang Choi, Mike Chrzanowski, Eric Chung, Victor Cui, Steve Dai, Bita Darvish Rouhani, Carlo del Mundo, Deena Donia, Burc Eryilmaz, Henry Estela, Abhinav Goel, Oleg Goncharov, Yugi Guvvala, Robert Hesse, Russell Hewett, Herbert Hum, Ujval Kapasi, Brucek Khailany, Mikail Khona, Nick Knight, Alex Kondratenko, Ronny Krashinsky, Ben Lanir, Simon Layton, Michael Lightstone, Daniel Lo, Paulius Micikevicius, Asit Mishra, Tim Moon, Deepak Narayanan, Chao Ni, Abhijit Paithankar, Satish Pasumarthi, Ankit Patel, Mostofa Patwary, Ashwin Poojary, Gargi Prasad, Sweta Priyadarshi, Yigong Qin, Xiaowei Ren, Oleg Rybakov, Charbel Sakr, Sanjeev Satheesh, Stas Sergienko, Pasha Shamis, Kirthi Shankar, Nishant Sharma, Mohammad Shoeybi, Michael Siu, Misha Smelyanskiy, Darko Stosic, Dusan Stosic, Bor-Yiing Su, Frank Sun, Nima Tajbakhsh, Shelby Thomas, Przemek Tredak, Evgeny Tsykunov, Gandhi Vaithilingam, Aditya Vavre, Rangharajan Venkatesan, Roger Waleffe, Qiyu Wan, Hexin Wang, Mengdi Wang, Lizzie Wei, Hao Wu, Evan Wu, Keith Wyss, Ning Xu, Jinze Xue, Charlene Yang, Yujia Zhai, Ruoxi Zhang, Jingyang Zhu, Zhongbo Zhu
cs.AI
초록
오늘날 대형 언어 모델(LLMs)은 다양한 분야에서 강력한 문제 해결사로 자리 잡고 있으며, 모델 크기, 훈련 데이터셋 크기, 훈련 데이터셋 품질이 확장됨에 따라 그 성능이 지속적으로 향상되고 있습니다. 이는 산업 전반에 걸친 광범위한 연구와 실험을 통해 입증된 바입니다. 최첨단 모델을 훈련시키기 위해서는 수십에서 수백 요타플롭스(yottaflops) 규모의 계산 자원이 필요하며, 이는 시간, 컴퓨팅 자원, 에너지 측면에서 막대한 투자를 요구합니다. 따라서 더욱 강력한 차세대 LLMs를 개발하기 위해서는 사전 훈련(pre-training) 효율성을 개선하는 것이 필수적입니다. 현재 8비트 부동소수점(FP8) 훈련이 널리 채택되고 있지만, 4비트 부동소수점(FP4)과 같이 더 좁은 정밀도로 전환하면 계산 속도와 자원 활용 측면에서 추가적인 개선을 이끌어낼 수 있습니다. 그러나 이러한 수준의 양자화(quantization)는 훈련 안정성, 수렴성, 구현 측면에서 특히 긴 토큰 시퀀스로 훈련된 대규모 모델에 있어서 도전 과제를 제기합니다.
본 연구에서는 NVFP4 형식을 사용하여 대형 언어 모델(LLMs)을 안정적이고 정확하게 훈련시키는 새로운 접근 방식을 소개합니다. 우리의 방법은 블록 수준 이상치(outliers)를 제한하기 위해 랜덤 하다마드 변환(Random Hadamard Transforms, RHT)을 통합하고, 순방향 및 역방향 전파에서 일관된 표현을 위해 2차원 양자화 방식을 채택하며, 편향되지 않은 그래디언트 추정을 위해 확률적 반올림(stochastic rounding)을 활용하고, 선택적 고정밀도 레이어를 포함합니다. 우리는 10조 개의 토큰으로 120억 개의 파라미터를 가진 모델을 훈련시켜 이 접근 방식을 검증했습니다. 이는 현재까지 공개된 문서 중 4비트 정밀도로 수행된 가장 긴 훈련 과정입니다. 우리의 결과는 NVFP4 기반 사전 훈련 기술로 훈련된 모델이 FP8 기준선과 유사한 훈련 손실 및 다운스트림 작업 정확도를 달성함을 보여줍니다. 이러한 결과는 NVFP4가 우리의 훈련 접근 방식과 결합될 때, 좁은 정밀도 LLM 훈련 알고리즘에서 큰 진전을 이루었음을 강조합니다.
English
Large Language Models (LLMs) today are powerful problem solvers across many
domains, and they continue to get stronger as they scale in model size,
training set size, and training set quality, as shown by extensive research and
experimentation across the industry. Training a frontier model today requires
on the order of tens to hundreds of yottaflops, which is a massive investment
of time, compute, and energy. Improving pretraining efficiency is therefore
essential to enable the next generation of even more capable LLMs. While 8-bit
floating point (FP8) training is now widely adopted, transitioning to even
narrower precision, such as 4-bit floating point (FP4), could unlock additional
improvements in computational speed and resource utilization. However,
quantization at this level poses challenges to training stability, convergence,
and implementation, notably for large-scale models trained on long token
horizons.
In this study, we introduce a novel approach for stable and accurate training
of large language models (LLMs) using the NVFP4 format. Our method integrates
Random Hadamard transforms (RHT) to bound block-level outliers, employs a
two-dimensional quantization scheme for consistent representations across both
the forward and backward passes, utilizes stochastic rounding for unbiased
gradient estimation, and incorporates selective high-precision layers. We
validate our approach by training a 12-billion-parameter model on 10 trillion
tokens -- the longest publicly documented training run in 4-bit precision to
date. Our results show that the model trained with our NVFP4-based pretraining
technique achieves training loss and downstream task accuracies comparable to
an FP8 baseline. These findings highlight that NVFP4, when combined with our
training approach, represents a major step forward in narrow-precision LLM
training algorithms.