Mixture-of-Parallelisms: Towards Memory-Efficient Training Stack for Mixture-of-Experts Models

· Source: Artificial Intelligence · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Cloud Computing & IT Infrastructure · Depth: Expert, quick

Summary

The Mixture-of-Parallelisms (MoP) training stack introduces a memory-efficient paradigm for Mixture-of-Experts (MoE) models. This approach integrates various existing and novel parallelism techniques across different layers and stages of the MoE training pipeline. MoP is designed to maximize efficiency by optimizing for physical constraints including CPU, GPU HBM memory, and communication bandwidths. It features a novel optimizer step for high throughput and memory efficiency, enabling lossless pre-training/fine-tuning of trillion-parameter models at a million context length. Experiments show MoP achieves 4.7x--8.2x higher per-GPU throughput than a strongly-tuned FSDP2 baseline, sustaining training at context lengths up to 1M tokens where FSDP2 runs out of memory beyond 64--128K, using just under 12 8x H200 GPU nodes.

Key takeaway

For ML Engineers training trillion-parameter Mixture-of-Experts (MoE) models with long context lengths, adopting the Mixture-of-Parallelisms (MoP) stack is crucial. It enables lossless pre-training/fine-tuning on under 12 8x H200 GPU nodes, delivering significantly higher throughput and memory efficiency than FSDP2, allowing you to scale models previously limited by memory and context length.

Key insights

Mixture-of-Parallelisms (MoP) optimizes MoE model training by combining diverse parallelism techniques for memory and throughput efficiency.

Principles

Method

MoP integrates various parallelism techniques at different MoE training stages, including a novel optimizer step, to optimize for CPU, GPU HBM, and communication bandwidth constraints.

In practice

Topics

Best for: MLOps Engineer, Research Scientist, AI Engineer, AI Scientist, Machine Learning Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence.