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

面向视觉Transformer的振荡减少MXFP4训练

Oscillation-Reduced MXFP4 Training for Vision Transformers

Dept. of Comp. Sci. and Tech., Institute for AI, BNRist Center, THBI Lab, Tsinghua-Bosch Joint ML Center, Tsinghua University(计算机科学与技术系,人工智能研究所,BNRist中心,THBI实验室,清华-博世联合机器学习中心,清华大学);Zhili College, Tsinghua University(智理学院,清华大学);University of California, Berkeley(加州大学伯克利分校)

Yuxiang Chen, Haocheng Xi, Jun Zhu, Jianfei Chen

AI总结:

针对MXFP4训练中权重振荡导致的精度下降,提出TetraJet方法,结合Q-EMA和Q-Ramping减少振荡,在Vision Transformers上显著降低精度损失,甚至媲美全精度训练。

摘要:

以FP4精度预训练Transformer正成为一种有望获得大幅加速的方法,但随之而来的是显著的精度损失。微缩放(MX)数据格式提供了一种细粒度的逐组量化方法,以提升FP4格式的表示能力,并得到下一代Blackwell GPU架构的支持。然而,使用MXFP4数据格式进行训练仍会导致显著的性能下降,且缺乏对其原因的系统性研究。\n\n在本工作中,我们提出了一种新颖的训练方法TetraJet,以实现更精确的FP4训练。我们全面评估了训练中涉及的所有量化器,并识别出前向传播中的权重振荡问题是MXFP4训练性能下降的主要来源。因此,我们引入了两种新方法:EMA量化器(Q-EMA)和自适应斜坡优化器(Q-Ramping),以解决振荡问题。在Vision Transformers上的大量实验表明,TetraJet持续优于现有的4比特训练方法,且Q-EMA与Q-Ramping通过有效减少振荡提供了额外的性能提升。与基线相比,我们将精度下降减少了超过50%,甚至可以达到与全精度训练相媲美的性能。代码可在https://github.com/thu-ml/TetraJet-MXFP4Training获取。

英文摘要:

Pre-training Transformers in FP4 precision is becoming a promising approach to gain substantial speedup, but it comes with a considerable loss of accuracy. Microscaling (MX) data format provides a fine-grained per-group quantization method to improve the representation ability of the FP4 format and is supported by the next-generation Blackwell GPU architecture. However, training with MXFP4 data format still results in significant degradation and there is a lack of systematic research on the reason. In this work, we propose a novel training method TetraJet for a more accurate FP4 training. We comprehensively evaluate all of the quantizers involved in the training, and identify the weight oscillation problem in the forward pass as the main source of the degradation in MXFP4 training. Therefore, we introduce two novel methods, EMA Quantizer (Q-EMA) and Adaptive Ramping Optimizer (Q-Ramping), to resolve the oscillation problem. Extensive experiments on Vision Transformers demonstrate that TetraJet consistently outperforms the existing 4-bit training methods, and Q-EMA & Q-Ramping can provide additional enhancement by effectively reducing oscillation. We decreased the accuracy degradation by more than $50\%$ compared to the baseline, and can even achieve competitive performance compared to full precision training. The codes are available at https://github.com/thu-ml/TetraJet-MXFP4Training

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

↑