← All questions
LLM FoundationsHard· Mixture of Experts· Distributed Training

Why do you need both a per-expert and a per-device bala...

Per-expert and per-device balancing losses are distinct requirements. Expert-level balance is a model quality concern, ensuring all parameter sets are trained uniformly. Device-level balance is a throughput concern, ensuring uniform GPU utilization. Even if experts are perfectly balanced, a GPU can still become a critical path if all its assigned experts are simultaneously popular. Therefore, both are necessary when using expert parallelism.

Code playground (Python)