Muon 使第一个专家混合层的平衡更困难
Muon Makes the First Mixture-of-Experts Layer Harder to Balance
AI总结:
该研究发现,Muon 会使 MoE 语言模型的第一个专家混合层的平衡难度显著提升,通过调整输入均值或学习率可缓解该问题,且在该规模下路由器保留在 Muon 上效果更好。
摘要:
许多开放的专家混合(MoE)语言模型使用 Muon 而非 AdamW 进行训练,多数模型通过对每个专家的路由分数施加偏置来平衡负载,且该偏置会在每一步后调整。不同模型的训练方案在 Muon 是否也应训练路由器的问题上存在分歧。在具有 5500 万和 1.08 亿激活参数的模型中,我们测量了优化器如何改变这些偏置的跨度(层中最大值与最小值的差值)。当所有 token 都倾向于相同的专家时,跨度会增大,因此它可用于衡量层的平衡难度。在针对短运行调优的学习率下,Muon 在所有随机种子下都提高了第一个 MoE 层的跨度,平均约翻倍,而其他层的变化则小得多。这种提升来自网络其余部分的 Muon,无论路由器使用哪种优化器。在这些运行中,第一个路由器的输入共享一个方向,预热后不久,其最繁忙的专家平均获得了其公平份额的 4 至 7 倍。在最初的 3000 步中,从这些输入中减去批次均值可消除这种过载,同时几乎不改变损失。在较小的模型中,将 Muon 的学习率减半可消除大部分提升,并略微改善损失。仅将路由器切换为 AdamW 会使负载在预热期间发生更多变化,并略微提高损失,因此在该规模下,结果支持将路由器保留在 Muon 上。
英文摘要:
Many open mixture-of-experts (MoE) language models train with Muon instead of AdamW. Most balance the load with a bias on each expert's routing score, adjusted after every step. Their recipes disagree on whether Muon should also train the router. In models with 55M and 108M active parameters, we measure how the optimizer changes the span of these biases, the largest minus the smallest in a layer. The span grows when all tokens favor the same experts, so it shows how hard a layer is to balance. At learning rates tuned on shorter runs, Muon raised the span of the first MoE layer at every seed, roughly doubling it on average, while the other layers changed much less. The rise came from Muon on the rest of the network, whichever optimizer trained the router. In those runs, the inputs to the first router shared a direction, and soon after the warmup its busiest expert averaged four to seven times its fair share. Over the first 3,000 steps, subtracting the batch mean from these inputs removed this overload while barely changing the loss. On the smaller model, halving Muon's learning rate removed most of the rise and slightly improved the loss. Moving only the router to AdamW made the loads shift more during the warmup and slightly raised the loss, so at this scale the results favor keeping the router on Muon.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。