arXiv:2506.20752cs.LGcs.AR2025-06被引 4

发现大模型训练中低精度格式会导致随机崩溃,提出中途调优可稳定训练。

Characterization and Mitigation of Training Instabilities in Microscaling Formats

  • 用小模型模拟大模型,发现层归一化参数量化引发梯度偏差
  • 在2千亿到4800万亿次浮点运算下,损失突然剧烈波动
  • 训练中动态调整精度方案,可避免崩溃并接近全精度效果

大规模语言模型训练成本高昂,需反复进行。为降低开销,新一代硬件支持如NVIDIA Blackwell架构中的微缩放(MX)格式,通过块内共享比例扩展表示范围,并以更低精度执行前向/反向GEMM操作。本文研究了此类块缩放精度格式在训练中的可行性。我们在从头训练的近一千个语言模型上展开实验,计算量覆盖 $2 \times 10^{17}$ 到 $4.8 \times 10^{19}$ FLOPs,测试多种权重-激活精度组合,一致观察到在高算力规模下,使用MX格式时损失出现尖锐且随机的不稳定性。通过控制实验与消融分析,在一个行为相似的小型代理模型上,我们发现由层归一化仿射参数及少量激活量化的乘法梯度偏差可引发发散。通过原位干预实验,证明在训练中调整精度策略可规避或延缓不稳定性。基于此,我们在大语言模型设置中评估稳定化方法,表明某些混合配置可恢复与全精度训练相当的性能。代码已开源。

原文摘要 · Abstract (English)

Training large language models is an expensive, compute-bound process that must be repeated as models scale, algorithms improve, and new data is collected. To address this, next-generation hardware accelerators increasingly support lower-precision arithmetic formats, such as the Microscaling (MX) formats introduced in NVIDIA's Blackwell architecture. These formats use a shared scale within blocks of parameters to extend representable range and perform forward/backward GEMM operations in reduced precision for efficiency gains. In this work, we investigate the challenges and viability of block-scaled precision formats during model training. Across nearly one thousand language models trained from scratch -- spanning compute budgets from $2 \times 10^{17}$ to $4.8 \times 10^{19}$ FLOPs and sweeping over a broad range of weight-activation precision combinations -- we consistently observe that training in MX formats exhibits sharp, stochastic instabilities in the loss, particularly at larger compute scales. To explain this phenomenon, we conduct controlled experiments and ablations on a smaller proxy model that exhibits similar behavior as the language model, sweeping across architectural settings, hyperparameters, and precision formats. These experiments motivate a simple model in which multiplicative gradient bias introduced by the quantization of layer-norm affine parameters and a small fraction of activations can trigger runaway divergence. Through \emph{in situ} intervention experiments on our proxy model, we demonstrate that instabilities can be averted or delayed by modifying precision schemes mid-training. Guided by these findings, we evaluate stabilization strategies in the LLM setting and show that certain hybrid configurations recover performance competitive with full-precision training. We release our code at https://github.com/Hither1/systems-scaling.

大模型训练低精度计算稳定性硬件加速

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。