Scaling AI Models with Mixture of Experts (MOE): Design Principles and Real-World Applications

Scaling AI Models with Mixture of Experts (MOE): Design Principles and Real-World Applications

1h 56mIntermediate2025-10-08

Authors

Vaibhava Lakshmi Ravideshik

Vaibhava Lakshmi Ravideshik

Course details

Mixture of Experts (MoE) is a cutting-edge neural network architecture that enables efficient model scaling by routing inputs through a small subset of expert subnetworks. In this course, instructor Vaibhava Lakshmi Ravideshik explores the inner workings of MoE, from its core components to advanced routing strategies like top-k gating. The course balances theoretical understanding with hands-on coding using PyTorch to implement a simplified MoE layer. Along the way, you’ll also get a chance to review real-world applications of MoE in state-of-the-art models like GPT-4 and Mixtral.

Learning objectives
Define the structure and core components of a Mixture of Experts (MoE) model, including experts and gating mechanisms.
Distinguish between various MoE architectures (token-wise, layer-wise, hierarchical) and gating strategies (soft, hard, and top-k).
Implement a basic MoE layer in PyTorch and integrate it within a transformer-based architecture.
Analyze trade-offs in MoE design and apply them in scaling large language models efficiently.
Identify real-world applications of MoE in large-scale AI models such as GShard, Switch Transformer, and Mixtral.

Skills covered

GPTPyTorchSoftware ArchitectureOpenAIPythonArtificial Intelligence (AI)Open SourceSoftware DevelopmentOne-Off

Concepts

Introduction

  • Scaling AI models with mixture of experts (MoE)

Introduction to Mixture of Experts (MoE)

  • What is MoE
  • Why MoE, though
  • The challenges of MoE
  • Final thoughts

MoE Architecture Breakdown

  • Intro to MoE architecture
  • MoE components
  • Gating mechanisms, part 1
  • Gating mechanisms, part 2
  • Types of MoE architectures
  • Routing trade-offs, part 1
  • Routing trade-offs, part 2
  • Fine-tuning MoEs
  • Instruction-tuning MoE
  • Final thoughts on MoE architecture

Hands-On MoE Implementation

  • Basic implementation of MoE, part 1
  • Basic implementation of MoE, part 2
  • Introducing load balancing
  • Hierarchical MoE - Hands-on

Applications and Future of MoE

  • Introduction to MoE applications
  • Multimodal MoEs
  • UniMoE
  • Google GateM2Former
  • Federated MoE
  • FedMoE
  • FedMoE-DA
  • Adaptive MoEs
  • Adap-MoE
  • SwiftMoE

Conclusion

  • Next steps in your MoE journey
40,000 Toman