开源工具库LibMoE让专家混合模型研究更高效可复现
LIBMoE: A Library for comprehensive benchmarking Mixture of Experts in Large Language Models
- 构建统一框架支持预训练与稀疏升级两种模式
- 揭示路由动态、初始化对负载均衡的影响及训练方式差异
- 适合想深入研究MoE架构的开发者和研究人员
专家混合(MoE)架构已成为大规模语言模型(如GPT-OSS、DeepSeek-V3、Llama-4、Gemini-2.5)的核心组件,但其系统性研究受限于高昂的训练与评估成本。本文提出LibMoE,一个统一、可复现、高效且可扩展的MoE研究框架,支持预训练与稀疏升级两种范式。该框架提供透明的分析工具,用于探究路由机制与专家动态。基于此,我们从三个维度展开全面分析:(i) 路由动态,包括专家选择模式、路由稳定性与最优性,以及路由熵如何反映任务专精与专家多样性;(ii) 轻量级初始化对负载均衡的影响,展示路由器初始化微调如何塑造早期专家利用率;(iii) 训练范式差异,发现稀疏升级与全量预训练在路由模式与稳定性上存在显著区别。通过降低研究门槛、标准化评估流程,LibMoE拓展了MoE研究的可及性,并建立了可靠基准以指导未来创新。项目主页:https://github.com/Fsoft-AIC/LibMoE。
原文摘要 · Abstract (English)
Mixture of experts (MoE) architectures have become a cornerstone for scaling up and are a key component in most large language models such as GPT-OSS, DeepSeek-V3, Llama-4, and Gemini-2.5. However, systematic research on MoE remains severely constrained by the prohibitive computational costs of training and evaluation, restricting large-scale studies accessible to most researchers. We introduce LibMoE, a unified framework for reproducible, efficient, and extensible MoE research that supports both pretraining and sparse-upcycling regimes. Beyond unified implementations, the framework provides transparent analytical tools for probing routing and expert dynamics. Leveraging this foundation, we conduct a comprehensive analysis along three dimensions: (i) routing dynamics, covering expert selection patterns, routing stability and optimality, and how routing entropy reveals task specialization and expert diversity; (ii) the effect of lightweight initialization on load balancing, demonstrating how subtle changes in router initialization shape early expert utilization; and (iii) training regime differences, revealing how sparse upcycling and full pretraining exhibit distinct routing patterns and stability profiles. By lowering the barrier to entry and standardizing evaluation, along with our comprehensive analysis, LibMoE broadens access to MoE research and establishes a reliable benchmark to guide future innovations. GitHub: \href{https://github.com/Fsoft-AIC/LibMoE}{https://github.com/Fsoft-AIC/LibMoE}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。