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

按序列而非token路由专家

Route Experts by Sequence, not by Token

Stony Brook University(石溪大学);Xidian University(西安电子科技大学);MIT(麻省理工学院);Yale University(耶鲁大学)

Tiansheng Wen, Yifei Wang, Aosong Feng, Long Ma, Xinyang Liu, Yifan Wang, Lixuan Guo, Bo Chen, Stefanie Jegelka, Chenyu You

AI总结:

本文提出SeqTopK方法,通过将专家预算从token层面转移到序列层面,实现动态分配,提升大语言模型在数学、编程、法律和写作任务中的性能,尤其在高稀疏度下表现更优。

摘要:

混合专家(MoE)架构通过仅激活每个token的子集专家来扩展大语言模型(LLMs),但标准TopK路由将相同固定数量的专家分配给所有token,忽略了它们的复杂性变化。先前的自适应路由方法引入了额外模块和超参数,通常需要从头开始重新训练。我们提出Sequence-level TopK(SeqTopK),这是一种最小的修改,将专家预算从token级别转移到序列级别。通过在所有T个token中选择前T·K个专家,SeqTopK实现了端到端学习的动态分配——为困难token分配更多专家,为容易token分配更少的专家——同时保持相同的总体预算。SeqTopK只需几行代码,添加不到1%的开销,并且完全兼容预训练的MoE模型。在数学、编程、法律和写作任务上的实验显示,SeqTopK在TopK和先前无参数自适应方法上表现一致,随着稀疏度增加,增益显著增大(最高达16.9%)。这些结果突显SeqTopK作为一种简单、高效且可扩展的路由策略,特别适用于下一代LLM的极端稀疏度场景。代码可在https://github.com/Y-Research-SBU/SeqTopK上获得。

英文摘要:

Mixture-of-Experts (MoE) architectures scale large language models (LLMs) by activating only a subset of experts per token, but the standard TopK routing assigns the same fixed number of experts to all tokens, ignoring their varying complexity. Prior adaptive routing methods introduce additional modules and hyperparameters, often requiring costly retraining from scratch. We propose Sequence-level TopK (SeqTopK), a minimal modification that shifts the expert budget from the token level to the sequence level. By selecting the top $T \cdot K$ experts across all $T$ tokens, SeqTopK enables end-to-end learned dynamic allocation -- assigning more experts to difficult tokens and fewer to easy ones -- while preserving the same overall budget. SeqTopK requires only a few lines of code, adds less than 1% overhead, and remains fully compatible with pretrained MoE models. Experiments across math, coding, law, and writing show consistent improvements over TopK and prior parameter-free adaptive methods, with gains that become substantially larger under higher sparsity (up to 16.9%). These results highlight SeqTopK as a simple, efficient, and scalable routing strategy, particularly well-suited for the extreme sparsity regimes of next-generation LLMs. Code is available at https://github.com/Y-Research-SBU/SeqTopK.

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

↑