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

Microscaling格式中训练不稳定性的表征与缓解

Characterization and Mitigation of Training Instabilities in Microscaling Formats

Kempner Institute for the Study of Natural and Artificial Intelligence, Harvard University(自然与人工智能研究学院,哈佛大学);Department of Computer Science, Harvard University(计算机科学系,哈佛大学)

Huangyuan Su, Mujin Kwun, Stephanie Gil, Sham Kakade, Nikhil Anand

AI总结:

本文研究了Microscaling格式在大型语言模型训练中引发的急剧随机失稳问题,通过代理模型实验发现其由量化引入的乘性梯度偏差导致,并提出混合精度配置策略以恢复与全精度训练相媲美的性能。

摘要:

训练大型语言模型是一个昂贵且受限于计算能力的过程,随着模型规模扩大、算法改进和新数据的收集,这一过程必须不断重复。为了解决这个问题,下一代硬件加速器越来越支持低精度算术格式,例如NVIDIA Blackwell架构中引入的Microscaling (MX)格式。这些格式在参数块内使用共享比例因子来扩展可表示范围,并以降低的精度执行前向/后向GEMM运算,从而提高效率。在这项工作中,我们研究了块缩放精度格式在模型训练期间的挑战和可行性。在从头训练的近一千个语言模型中——计算预算从$2 \ imes 10^{17}$到$4.8 \ imes 10^{19}$ FLOPs,并遍历了广泛的权重-激活精度组合——我们始终观察到,在MX格式中训练会在损失上表现出急剧的、随机的失稳,尤其是在较大的计算规模下。为了解释这一现象,我们在一个表现出与语言模型类似行为的较小代理模型上进行了受控实验和消融研究,遍历了各种架构设置、超参数和精度格式。这些实验启发了一个简单的模型,在该模型中,由layer-norm仿射参数和一小部分激活值的量化引入的乘性梯度偏差会触发失控的发散。通过在代理模型上进行原位干预实验,我们证明了在训练中途修改精度方案可以避免或延迟失稳。在这些发现的指导下,我们在LLM设置中评估了稳定化策略,并表明某些混合配置能够恢复与全精度训练相媲美的性能。我们在 https://github.com/Hither1/systems-scaling 发布了代码。

英文摘要:

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.

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

↑