2025-09-30 · 专家 · 自然语言处理 · 机器学习

Pretraining Large Language Models with NVFP4

这篇论文提出了一种使用NVFP4格式稳定且准确地训练大型语言模型(LLMs)的新方法,实现了在4位精度下与FP8相当的训练损失和下游任务准确性。

更新于 2025-10-01。作者: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。

中文摘要

大型语言模型(LLMs)如今在众多领域都是强大的问题解决者,随着模型规模、训练集规模和训练集质量的扩大,它们的力量也在不断增强,这一点得到了整个行业广泛的研究和实验证明。如今训练前沿模型需要达到数十到数百Yottaflops的算力,这是一项巨大的时间、计算和能源投资。因此,提高预训练效率对于实现下一代更强大的LLMs至关重要。尽管8位浮点(FP8)训练现在已被广泛采用,但过渡到更窄的精度,如4位浮点(FP4),可以解锁计算速度和资源利用的额外改进。然而,在这一层面的量化对训练稳定性、收敛性和实现提出了挑战,尤其是在训练时间跨度较长的长标记序列的大规模模型中。在本研究中,我们提出了一种使用NVFP4格式稳定且精确训练大型语言模型(LLMs)的新方法。我们的方法集成了随机Hadamard变换(RHT)以限制块级异常值,采用二维量化方案以确保正向和反向传递中的统一表示,利用随机舍入进行无偏梯度估计,并纳入选择性高精度层。我们通过在10万亿个标记上训练一个120亿参数的模型来验证我们的方法——这是迄今为止4位精度中记录的最长训练运行。我们的结果表明,使用基于NVFP4的预训练技术的模型在训练损失和下游任务准确性方面与FP8基线相当。这些发现突显了NVFP4结合我们的训练方法在窄精度LLM训练算法方面取得了重大进展。

英文摘要

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.

解读

一句话总结

这篇论文提出了一种使用NVFP4格式稳定且准确地训练大型语言模型(LLMs)的新方法,实现了在4位精度下与FP8相当的训练损失和下游任务准确性。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt