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

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Pan, Xinglin, Lin, Wenxiang, Zhang, Lin, Shi, Shaohuai, Tang, Zhenheng, Wang, Rui, Li, Bo, Chu, Xiaowen
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866910789368020992
author Pan, Xinglin
Lin, Wenxiang
Zhang, Lin
Shi, Shaohuai
Tang, Zhenheng
Wang, Rui
Li, Bo
Chu, Xiaowen
author_facet Pan, Xinglin
Lin, Wenxiang
Zhang, Lin
Shi, Shaohuai
Tang, Zhenheng
Wang, Rui
Li, Bo
Chu, Xiaowen
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2501_10714
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle FSMoE: A Flexible and Scalable Training System for Sparse Mixture-of-Experts Models
Pan, Xinglin
Lin, Wenxiang
Zhang, Lin
Shi, Shaohuai
Tang, Zhenheng
Wang, Rui
Li, Bo
Chu, Xiaowen
Machine Learning
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.
title FSMoE: A Flexible and Scalable Training System for Sparse Mixture-of-Experts Models
topic Machine Learning
url https://arxiv.org/abs/2501.10714