arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2310.00811cs.LGcs.AIcs.CLcs.CV
收藏

用于MoE训练的稀疏反向传播

Sparse Backpropagation for MoE Training

Microsoft Research(微软研究院);Microsoft Azure AI(微软Azure人工智能部门)

Liyuan Liu, Jianfeng Gao, Weizhu Chen

AI总结:

针对MoE模型反向传播需稠密计算与稀疏专家路由不匹配的问题,提出基于数值ODE框架中点法的SparseMixer梯度估计器,可低开销近似被忽略的梯度项,在Switch Transformer任务中使训练收敛速度最高提升2倍。

摘要:

混合专家(Mixture-of-Expert, MoE)模型的一个核心特征是能够通过专家路由执行稀疏计算,因此具备出色的可扩展性。然而,作为深度学习基石的反向传播需要稠密计算,这给MoE的梯度计算带来了挑战。本文提出SparseMixer,这是一种可扩展的梯度估计器,填补了反向传播与稀疏专家路由之间的空白。常规MoE训练为了实现稀疏计算和可扩展性,会策略性地忽略某些梯度项;而SparseMixer不同,它能为这些梯度项提供可扩展的梯度近似,从而在MoE训练中实现可靠的梯度估计。SparseMixer基于数值常微分方程(ODE)框架,利用中点法(一种二阶ODE求解器)来提供精确的梯度近似,且计算开销可忽略不计。将SparseMixer应用于Switch Transformer的预训练和机器翻译任务中,其性能提升显著,训练收敛速度最高可提升2倍。

英文摘要:

One defining characteristic of Mixture-of-Expert (MoE) models is their capacity for conducting sparse computation via expert routing, leading to remarkable scalability. However, backpropagation, the cornerstone of deep learning, requires dense computation, thereby posting challenges in MoE gradient computations. Here, we introduce SparseMixer, a scalable gradient estimator that bridges the gap between backpropagation and sparse expert routing. Unlike typical MoE training which strategically neglects certain gradient terms for the sake of sparse computation and scalability, SparseMixer provides scalable gradient approximations for these terms, enabling reliable gradient estimation in MoE training. Grounded in a numerical ODE framework, SparseMixer harnesses the mid-point method, a second-order ODE solver, to deliver precise gradient approximations with negligible computational overhead. Applying SparseMixer to Switch Transformer on both pre-training and machine translation tasks, SparseMixer showcases considerable performance gain, accelerating training convergence up to 2 times.

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

↑