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

将FP8训练扩展到万亿级token大语言模型

Scaling FP8 training to trillion-token LLMs

Intel(英特尔公司);Technion(以色列理工学院)

Maxim Fishman, Brian Chmiel, Ron Banner, Daniel Soudry

AI总结:

首次用FP8精度在2万亿token数据集上训练大语言模型,发现SwiGLU激活函数在长时间训练中放大异常值导致不稳定性,提出Smooth-SwiGLU解决该问题,结合Adam矩FP8量化,7B模型训练结果与BF16相当且吞吐量提升34%。

摘要:

我们首次使用FP8精度在多达2万亿token的数据集上训练大语言模型,相比之前的限制提升了20倍。通过这些扩展训练,我们发现了FP8训练中关键的不稳定性,这在早期短时长的工作中未被观察到。我们将这些不稳定性追溯到SwiGLU激活函数对异常值的放大。有趣的是,我们通过分析和实证表明,这种放大仅在长时间训练中发生,并将其与SwiGLU权重对齐过程关联。为解决这一新发现的问题,我们引入Smooth-SwiGLU,这是一种确保FP8训练稳定且不改变函数行为的新修改。我们还首次展示了Adam优化器矩的FP8量化。结合这些创新,我们在256个Intel Gaudi2加速器上成功用FP8精度训练了7B参数模型,结果与BF16基线相当,同时吞吐量提升高达约34%。参考实现见https://github.com/Anonymous1252022/Megatron-DeepSpeed。

英文摘要:

We train, for the first time, large language models using FP8 precision on datasets up to 2 trillion tokens -- a 20-fold increase over previous limits. Through these extended training runs, we uncover critical instabilities in FP8 training that were not observable in earlier works with shorter durations. We trace these instabilities to outlier amplification by the SwiGLU activation function. Interestingly, we show, both analytically and empirically, that this amplification happens only over prolonged training periods, and link it to a SwiGLU weight alignment process. To address this newly identified issue, we introduce Smooth-SwiGLU, a novel modification that ensures stable FP8 training without altering function behavior. We also demonstrate, for the first time, FP8 quantization of both Adam optimizer moments. Combining these innovations, we successfully train a 7B parameter model using FP8 precision on 256 Intel Gaudi2 accelerators, achieving on-par results with the BF16 baseline while delivering up to a $\sim 34 \%$ throughput improvement. A reference implementation is supplied in https://github.com/Anonymous1252022/Megatron-DeepSpeed.

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

↑