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

Prediction Is All MoE Needs:专家负载分布从波动到稳定

Prediction Is All MoE Needs: Expert Load Distribution Goes from Fluctuating to Stabilizing

Peking University(北京大学)

Peizhuang Cong, Aomufei Yuan, Shimao Chen, Yuxuan Tian, Bowen Ye, Yilun Yao, Tong Yang

AI总结:

本研究分析了MoE模型训练中的专家负载波动问题,定义了瞬态与稳态,并部署三种经典预测算法实现准确负载预测,为专家放置与资源分配提供指导。

摘要:

MoE通过使模型的计算复杂度不再随参数增加而线性增长,促进大型模型的发展。学习稀疏门控网络为每个待处理token选择一组专家;然而,这可能导致在连续几次迭代中每个专家处理的token数量出现差异,即专家负载波动,从而降低计算并行化和资源利用率。为此,我们在本研究中追踪并分析了多个大型语言模型在训练迭代中各专家的负载,定义了具有“明显负载波动”的瞬态和具有“时间局部性”的稳态。此外,鉴于这两种状态的特征和计算开销,我们部署了三种经典预测算法,实现了准确的专家负载预测结果。对于GPT3 350M模型,预测未来1,000步和2,000步专家负载比例的平均误差率分别约为1.3%和1.8%。本研究可为MoE模型训练的专家放置或资源分配提供有价值的指导。基于本研究,我们将在后续工作中提出针对瞬态和稳态的专家放置方案。

英文摘要:

MoE facilitates the development of large models by making the computational complexity of the model no longer scale linearly with increasing parameters. The learning sparse gating network selects a set of experts for each token to be processed; however, this may lead to differences in the number of tokens processed by each expert over several successive iterations, i.e., the expert load fluctuations, which reduces computational parallelization and resource utilization. To this end, we traced and analyzed loads of each expert in the training iterations for several large language models in this work, and defined the transient state with "obvious load fluctuation" and the stable state with "temporal locality". Moreover, given the characteristics of these two states and the computational overhead, we deployed three classical prediction algorithms that achieve accurate expert load prediction results. For the GPT3 350M model, the average error rates for predicting the expert load proportion over the next 1,000 and 2,000 steps are approximately 1.3% and 1.8%, respectively. This work can provide valuable guidance for expert placement or resource allocation for MoE model training. Based on this work, we will propose an expert placement scheme for transient and stable states in our coming work.

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

↑