arXiv:2501.10714cs.LG2025-01被引 28

FSMoE提升稀疏专家模型训练效率,支持多种路由方式并加速通信与计算协同。

FSMoE: A Flexible and Scalable Training System for Sparse Mixture-of-Experts Models

  • 统一抽象与在线分析MoE模块,实现跨架构灵活调度
  • 通过共调度通信与计算,降低通信开销达1.42倍提速
  • 自适应梯度分片与流水线调度,适合大规模语言模型训练

近期大语言模型趋向采用稀疏性减少计算量,使用稀疏激活的专家混合(MoE)技术。MoE引入四个关键模块:令牌路由、令牌通信、专家计算和专家并行,影响模型质量与训练效率。为支持MoE模型的多样化应用,本文提出FSMoE,一个灵活可扩展的训练系统,通过三项新技术优化任务调度:1)对MoE模块进行统一抽象与在线性能分析,实现跨多种MoE实现的任务调度;2)将节点内与节点间通信与计算协同调度,以最小化通信开销;3)设计自适应梯度分区方法用于梯度聚合,并制定动态流水线策略以协调通信与计算。我们在两个GPU集群上对配置的MoE层及真实世界中的MoE模型(基于GPT-2和Mixtral)进行了广泛实验。结果表明:1)FSMoE支持四种主流的MoE路由函数,较现有实现效率更高(最高提速1.42×);2)在1458个MoE层上,相比最先进系统DeepSpeed-MoE与Tutel,FSMoE提速1.18×–1.22×;在真实模型上,提速1.19×–3.01×,使用常见路由函数。

原文摘要 · Abstract (English)

Recent large language models (LLMs) have tended to leverage sparsity to reduce computations, employing the sparsely activated mixture-of-experts (MoE) technique. MoE introduces four modules, including token routing, token communication, expert computation, and expert parallelism, that impact model quality and training efficiency. To enable versatile usage of MoE models, we introduce FSMoE, a flexible training system optimizing task scheduling with three novel techniques: 1) Unified abstraction and online profiling of MoE modules for task scheduling across various MoE implementations. 2) Co-scheduling intra-node and inter-node communications with computations to minimize communication overheads. 3) To support near-optimal task scheduling, we design an adaptive gradient partitioning method for gradient aggregation and a schedule to adaptively pipeline communications and computations. We conduct extensive experiments with configured MoE layers and real-world MoE models on two GPU clusters. Experimental results show that 1) our FSMoE supports four popular types of MoE routing functions and is more efficient than existing implementations (with up to a 1.42$\times$ speedup), and 2) FSMoE outperforms the state-of-the-art MoE training systems (DeepSpeed-MoE and Tutel) by 1.18$\times$-1.22$\times$ on 1458 MoE layers and 1.19$\times$-3.01$\times$ on real-world MoE models based on GPT-2 and Mixtral using a popular routing function.

MoE训练系统稀疏模型分布式

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。