arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.09825cs.LGcs.AI
收藏

使用MXFP4在原生FP4硬件上预训练大型语言模型

Pretraining large language models with MXFP4 on Native FP4 Hardware

The Pennsylvania State University(宾夕法尼亚州立大学);Advanced Micro Devices, Inc.(先进微器件公司)

Musa Cim, Sarthak Arora, Poovaiah Palangappa, Miro Hodak, Ravi Dwivedula, Meena Arunachalam, Mahmut Taylan Kandemir

AI总结:

研究发现FP4训练不稳定主要由梯度路径的结构微缩放误差引起,通过MXFP4量化在Transformer训练中的受控研究,揭示了FP4在Fprop和Dgrad中对收敛影响较小,而Wgrad量化导致收敛退化。

摘要:

为什么在全管道FP4训练大型语言模型时经常发散,即使前向激活和激活梯度保持稳定?我们通过MXFP4量化在Transformer训练中的受控研究来回答这个问题,逐步在前向传播(Fprop)、激活梯度(Dgrad)和权重梯度(Wgrad)中启用FP4,同时保持其他因素不变。在使用C4数据集对Llama 3.1-8B进行全预训练时,我们发现量化Wgrad是收敛退化的主因,而Fprop和Dgrad中的FP4仅引入少量额外的token需求。为了解释这种行为,我们在受控实验设置下评估了结构化和随机干预。我们发现随机取整和随机Hadamard旋转在Wgrad量化后无法稳定训练,而确定性Hadamard旋转始终恢复稳定的优化。这些结果表明,FP4训练不稳定是由敏感梯度路径上的结构微缩放误差驱动的,而不是由不足的随机性引起。我们使用支持MXFP4的AMD Instinct MI355X GPU运行实验,从而在无需软件模拟的情况下进行受控研究。

英文摘要:

Why does full-pipeline FP4 training of large language models often diverge, even when forward activations and activation gradients remain stable? We address this question through a controlled study of MXFP4 quantization in transformer training, progressively enabling FP4 across forward propagation (Fprop), activation gradients (Dgrad), and weight gradients (Wgrad) while holding all other factors fixed. In full pretraining of Llama 3.1-8B on the C4 dataset, we observe that quantizing Wgrad is the primary driver of convergence degradation, whereas FP4 in Fprop and Dgrad alone introduces only modest additional token requirements. To interpret this behavior, we evaluate both structured and stochastic interventions under a controlled experimental setting. We find that stochastic rounding and randomized Hadamard rotations fail to stabilize training once Wgrad is quantized, whereas deterministic Hadamard rotations consistently restore stable optimization. These results suggest that FP4 training instability is driven by structured micro-scaling errors along sensitive gradient paths, rather than by insufficient stochasticity. We run experiments with native MXFP4 support on AMD Instinct MI355X GPUs, enabling controlled investigation of these effects without reliance on software emulation.

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

↑