arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.05029cs.LGcs.AIcs.CL
收藏

MoE 的持续预训练:你的路由器有多稳健?

Continual Pre-training of MoEs: How robust is your router?

Université de Montréal(蒙特利尔大学);Mila – Quebec AI Institute(魁北克人工智能研究所);Concordia University(康科迪亚大学);University of Chicago(芝加哥大学);Capital One(Capital One公司)

Benjamin Thérien, Charles-Étienne Joseph, Zain Sarwar, Ashwinee Panda, Anirban Das, Shi-Xiong Zhang, Stephen Rawls, Sambit Sahu, Eugene Belilovsky, Irina Rish

AI总结:

本文通过大规模实验研究 MoE 大语言模型在持续预训练中的路由器稳健性,发现即使不进行重放,MoE 也能保持样本效率并接近完全重训性能。

摘要:

稀疏激活的专家混合(Mixture of Experts, MoE)Transformer 是基础模型中很有前景的架构。与每次前向传播需要相同浮点运算量(FLOPs)的稠密 Transformer 相比,MoE 在训练时具有更好的样本效率,并能取得更强的性能。因此,许多闭源和开源的前沿语言模型都采用了 MoE 架构。自然地,实践者会希望利用大量新收集的数据来扩展这些模型的能力,而无需完全重新训练它们。先前的工作表明,简单地结合重放、学习率重新预热和重新衰减,就能在稠密解码器专用 Transformer 的持续预训练(CPT)中实现与完全重新训练相比最小的性能下降。然而,对于仅解码器的 MoE Transformer,路由算法将如何影响持续预训练性能尚不清楚:1)相对于稠密模型,MoE Transformer 的路由器是否会加剧遗忘?2)在 CPT 之后,路由器能否在先前分布上保持均衡负载?3)应用于稠密模型的相同策略是否足以持续预训练 MoE 大语言模型?在下文中,我们进行了一项大规模研究,训练了一个 500M 参数的稠密 Transformer 和四个 500M 激活参数/2B 总参数的 MoE Transformer。每个模型都训练了 600B 个 token。我们的结果表明,使用 Sinkhorn-Balanced 和 Z-and-Aux-loss-balanced 路由算法的 MoE 对分布偏移具有令人惊讶的稳健性,即使在没有重放的情况下持续预训练的 MoE 也是如此。此外,我们表明 MoE 大语言模型在 CPT 期间保持了其样本效率(相对于 FLOPs 匹配的稠密模型),并且它们能够以一小部分成本达到完全重新训练的 MoE 的性能。

英文摘要:

Sparsely-activated Mixture of Experts (MoE) transformers are promising architectures for foundation models. Compared to dense transformers that require the same amount of floating-point operations (FLOPs) per forward pass, MoEs benefit from improved sample efficiency at training time and achieve much stronger performance. Many closed-source and open-source frontier language models have thus adopted an MoE architecture. Naturally, practitioners will want to extend the capabilities of these models with large amounts of newly collected data without completely re-training them. Prior work has shown that a simple combination of replay, learning rate re-warming, and re-decaying can enable the continual pre-training (CPT) of dense decoder-only transformers with minimal performance degradation compared to full re-training. In the case of decoder-only MoE transformers, however, it is unclear how the routing algorithm will impact continual pre-training performance: 1) do the MoE transformer's routers exacerbate forgetting relative to a dense model?; 2) do the routers maintain a balanced load on previous distributions after CPT?; 3) are the same strategies applied to dense models sufficient to continually pre-train MoE LLMs? In what follows, we conduct a large-scale study training a 500M parameter dense transformer and four 500M-active/2B-total parameter MoE transformers. Each model is trained for 600B tokens. Our results establish a surprising robustness to distribution shifts for MoEs using both Sinkhorn-Balanced and Z-and-Aux-loss-balanced routing algorithms, even in MoEs continually pre-trained without replay. Moreover, we show that MoE LLMs maintain their sample efficiency (relative to a FLOP-matched dense model) during CPT and that they can match the performance of a fully re-trained MoE at a fraction of the cost.

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

↑