arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2512.02010cs.CLcs.LG
收藏

六分之四:更准确的NVFP4量化方法通过自适应块缩放

Four Over Six: More Accurate NVFP4 Quantization with Adaptive Block Scaling

Massachusetts Institute of Technology(麻省理工学院);NVIDIA(英伟达)

Jack Cook, Junxian Guo, Guangxuan Xiao, Yujun Lin, Keith Wyss, Mahdi Nazemi, Asit Mishra, Carlo del Mundo, Tijmen Blankevoort, Song Han

AI总结:

本文提出4/6方法,通过自适应块缩放改进NVFP4量化,减少量化误差,提升模型性能。

摘要:

随着大语言模型的增长,人们对低精度数值格式如NVFP4的兴趣增加,以提高速度和减少内存使用。然而,将模型量化到NVFP4仍然具有挑战性,因为精度的缺乏通常会降低模型性能。在本工作中,我们通过Four Over Six(4/6)对块缩放的NVFP4量化算法进行了修改,从而减少了量化误差。与整数格式不同,浮点格式具有非均匀的步长,这在较大的值上会产生更大的量化误差。4/6利用这一点,通过自适应地将某些块缩放为更小的FP4值,使可表示值的分布更加均匀,从而减少接近最大值的量化误差。我们证明,4/6可以在现代硬件加速器上高效实现,从而在预训练和推理过程中带来性能提升,同时计算开销极低。在使用Nemotron 3 Nano 30B-A3B模型架构的预训练实验中,我们发现4/6使训练损失更接近BF16,相比使用当前最先进的NVFP4训练配方的模型。我们的代码可在https://github.com/mit-han-lab/fouroversix上获取。

英文摘要:

As large language models have grown larger, interest has grown in low-precision numerical formats such as NVFP4 as a way to improve speed and reduce memory usage. However, quantizing models to NVFP4 remains challenging as the lack of precision generally degrades model performance. In this work, we address this issue with Four Over Six (4/6), a modification to the block-scaled NVFP4 quantization algorithm that yields reduced quantization error. Unlike integer formats, floating point formats have non-uniform step sizes which create larger quantization error on larger values. 4/6 takes advantage of this by adaptively scaling some blocks to smaller FP4 values, making the distribution of representable values more uniform and reducing quantization error for near-maximal values. We show that 4/6 can be implemented efficiently on modern hardware accelerators, resulting in performance gains during both pre-training and inference with minimal computational overhead. In pre-training experiments with the Nemotron 3 Nano 30B-A3B model architecture, we find that 4/6 brings training loss closer to BF16 compared to models trained with current state-of-the-art NVFP4 training recipes. Our code is available at https://github.com/mit-han-lab/fouroversix.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑