arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.07524cs.CLcs.AIcs.LG
收藏

将大语言模型升级改造为混合专家模型

Upcycling Large Language Models into Mixture of Experts

NVIDIA

Ethan He, Abhinav Khattar, Ryan Prenger, Vijay Korthikanti, Zijie Yan, Tong Liu, Shiqing Fan, Ashwath Aithal, Mohammad Shoeybi, Bryan Catanzaro

AI总结:

针对大模型升级为MoE的最优技术不明确的问题,提出虚拟组初始化与权重缩放方法,经实验验证升级改造效果优于稠密持续训练,还优化了路由策略与粒度选择,为构建MoE大模型提供实践参考。

摘要:

将预训练稠密语言模型升级改造为稀疏混合专家(Mixture of Experts, MoE)模型,是提升已训练模型容量的高效方法。然而,大规模升级改造的最优技术仍不明确。本研究针对十亿参数规模的语言模型,对升级改造方法及超参数开展了广泛研究。我们提出一种新颖的“虚拟组”初始化方案与权重缩放方法,以实现向细粒度MoE架构的升级改造。通过消融实验,我们发现升级改造的效果优于持续的稠密模型训练。此外,我们表明“先softmax再topK”的专家路由策略优于“先topK再softmax”的方法,且更高粒度的MoE有助于提升准确率。最后,我们在1T token上对Nemotron-4 15B进行升级改造,并将其与在相同1T token上持续训练的同版本模型进行对比:持续训练模型的MMLU准确率为65.3%,而升级改造后的模型达到67.6%。我们的研究结果为有效利用升级改造技术构建MoE语言模型提供了洞见与最佳实践。相关代码已公开。

英文摘要:

Upcycling pre-trained dense language models into sparse mixture-of-experts (MoE) models is an efficient approach to increase the model capacity of already trained models. However, optimal techniques for upcycling at scale remain unclear. In this work, we conduct an extensive study of upcycling methods and hyperparameters for billion-parameter scale language models. We propose a novel "virtual group" initialization scheme and weight scaling approach to enable upcycling into fine-grained MoE architectures. Through ablations, we find that upcycling outperforms continued dense model training. In addition, we show that softmax-then-topK expert routing improves over topK-then-softmax approach and higher granularity MoEs can help improve accuracy. Finally, we upcycled Nemotron-4 15B on 1T tokens and compared it to a continuously trained version of the same model on the same 1T tokens: the continuous trained model achieved 65.3% MMLU, whereas the upcycled model achieved 67.6%. Our results offer insights and best practices to effectively leverage upcycling for building MoE language models. Code is available.

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

↑