Skip to main content
QUICK REVIEW

[Paper Review] MoESys: A Distributed and Efficient Mixture-of-Experts Training and Inference System for Internet Services

Dianhai Yu, Liang Shen|arXiv (Cornell University)|May 20, 2022
Advanced Neural Network ApplicationsComputer Science12 citations
TL;DR

SE-MoE is a distributed, efficient Mixture-of-Experts (MoE) training and inference system that enhances load balancing, communication efficiency, and memory utilization through 2D prefetching, hierarchical storage fusion, and CPU-GPU memory ring-based inference. It achieves 33% higher training throughput and 13% higher inference throughput than DeepSpeed, with 64% higher throughput and 18% lower memory under unbalanced MoE workloads, successfully training a 12B-parameter UFO model in 8 days on 48 A100 GPUs.

ABSTRACT

While modern internet services, such as chatbots, search engines, and online advertising, demand the use of large-scale deep neural networks (DNNs), distributed training and inference over heterogeneous computing systems are desired to facilitate these DNN models. Mixture-of-Experts (MoE) is one the most common strategies to lower the cost of training subject to the overall size of models/data through gating and parallelism in a divide-and-conquer fashion. While DeepSpeed has made efforts in carrying out large-scale MoE training over heterogeneous infrastructures, the efficiency of training and inference could be further improved from several system aspects, including load balancing, communication/computation efficiency, and memory footprint limits. In this work, we present a novel MoESys that boosts efficiency in both large-scale training and inference. Specifically, in the training procedure, the proposed MoESys adopts an Elastic MoE training strategy with 2D prefetch and Fusion communication over Hierarchical storage, so as to enjoy efficient parallelisms. For scalable inference in a single node, especially when the model size is larger than GPU memory, MoESys builds the CPU-GPU memory jointly into a ring of sections to load the model, and executes the computation tasks across the memory sections in a round-robin manner for efficient inference. We carried out extensive experiments to evaluate MoESys, where MoESys successfully trains a Unified Feature Optimization (UFO) model with a Sparsely-Gated Mixture-of-Experts model of 12B parameters in 8 days on 48 A100 GPU cards. The comparison against the state-of-the-art shows that MoESys outperformed DeepSpeed with 33% higher throughput (tokens per second) in training and 13% higher throughput in inference in general. Particularly, under unbalanced MoE Tasks, e.g., UFO, MoESys achieved 64% higher throughput with 18% lower memory footprints.

Motivation & Objective

  • To address the inefficiencies in distributed MoE training and inference caused by load imbalance, communication bottlenecks, and high memory footprints.
  • To enable scalable, high-throughput MoE training and inference on heterogeneous GPU-CPU clusters.
  • To reduce memory pressure and improve system utilization when deploying MoE models larger than GPU memory capacity.
  • To optimize communication and computation workloads in MoE systems through novel system-level techniques.
  • To support production-scale deployment of large MoE models in internet services with minimal resource overhead.

Proposed method

  • Introduces Elastic MoE training with 2D prefetching to improve data and model parallelism efficiency across devices.
  • Employs Fusion communication over Hierarchical storage to reduce inter-node communication overhead and improve bandwidth utilization.
  • Uses a CPU-GPU memory ring structure to enable efficient, round-robin inference for MoE models exceeding GPU memory capacity.
  • Applies embedding partitioning in data parallelism to reduce GPU memory consumption and improve training throughput.
  • Leverages hierarchical storage and memory management to minimize data movement and D2H/H2D overhead.
  • Integrates optimized routing and load-balancing strategies to mitigate expert imbalance during MoE training.

Experimental results

Research questions

  • RQ1How can MoE training and inference be made more efficient in distributed, heterogeneous computing environments?
  • RQ2What system-level optimizations can reduce communication and memory bottlenecks in MoE training?
  • RQ3How can MoE models larger than GPU memory be efficiently executed during inference?
  • RQ4To what extent can load imbalance in MoE routing be mitigated through system-level design?
  • RQ5Can a unified system achieve both high throughput and low memory footprint in MoE training and inference?

Key findings

  • SE-MoE achieved 33% higher training throughput (tokens per second) compared to DeepSpeed on standard MoE workloads.
  • SE-MoE achieved 13% higher inference throughput than DeepSpeed across general MoE tasks.
  • Under unbalanced MoE workloads such as the UFO model, SE-MoE achieved 64% higher throughput and 18% lower memory footprint than DeepSpeed.
  • The system successfully trained a 12B-parameter Unified Feature Optimization (UFO) MoE model in 8 days using 48 A100 GPUs.
  • Embedding partitioning in data parallelism reduced GPU memory usage by up to 26.3% and increased throughput by up to 15.6% on V100 GPUs.
  • The CPU-GPU memory ring inference mechanism enabled efficient execution of MoE models exceeding GPU memory capacity through round-robin task scheduling.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.