TL;DR
UltraEP is the first real-time, exact-load balancer designed for large-scale Expert Parallelism (EP) in Mixture-of-Experts (MoE) models. By leveraging the high-bandwidth connectivity of Rack-Scale Nodes (RSNs), it dynamically rebalances workloads at the microbatch and layer level on the critical path, achieving up to 94.3% of ideal, perfectly balanced throughput.
What Problem Does This Paper Address?
Mixture-of-Experts (MoE) architectures scale model capacity efficiently by routing tokens to specialized "experts." However, this dynamic routing inherently causes severe expert load imbalance: certain experts become "hot spots" while others sit idle. This imbalance leads to computational stragglers, communication bottlenecks during token exchange, and massive spikes in activation memory.
Existing system-side balancers (like EPLB) try to mitigate this by predicting upcoming workloads based on historical routing statistics and periodically replicating popular experts. The core flaw is that expert workloads are highly non-stationary; popular experts shift rapidly across microbatches, layers, and data domains. Using stale history can actually worsen imbalance.
To achieve true balance, systems must switch to exact-load balancing based on real-time post-gating data. However, doing this on the critical path introduces massive overheads: online plan solving and heavy expert weight transfers. UltraEP tackles this challenge by co-designing a fast on-device planner with optimized communication tailored for Rack-Scale Nodes (RSNs).
Methods
UltraEP introduces two primary innovations to make hot-path balancing viable:
- Quota-Driven Planner (Control Plane): Instead of decoupling expert placement and token routing, UltraEP solves them jointly. It directly calculates the final token load quota for each expert instance using an efficient, GPU-native binary search. Replicas are only materialized if they carry a meaningful workload, preventing redundant transfers.
- RSN-Native Communication (Data Plane): Standard networks are too slow for real-time weight transfers, but RSNs provide high-bandwidth, scale-up connectivity across dozens of GPUs. UltraEP exploits this by streaming expert transfers as device-side tile-level tasks (Persistent Tile Streaming). For heavily replicated hot experts, it constructs chunk-streaming relay trees to distribute fan-out traffic across ranks with spare bandwidth, avoiding sender-side bottlenecks.
Additionally, UltraEP implements Cross-Layer Buffer Reuse, allowing redundant slots to share weight and gradient buffers across layers, reducing memory overhead by dozens of times.
Datasets
The system was evaluated using workloads derived from realistic reasoning tasks across two main domains:
- STEM: Includes coding tasks (Codeforces, SWE-bench), mathematics (DAPO-Math-17K), and scientific QA (GPQA, OpenScience).
- Mixed: Combines multi-task, long-context queries from LongBench.
- Training Data: A 200-billion-token subset of an in-house corpus was used for the training benchmarks.
Key Insights and Ideas
- History is a Poor Predictor: Real-time analysis shows that expert popularity shifts sharply and unpredictably. Relying on historical statistics to balance fine-grained MoEs under large EP degrees is fundamentally limited.
- RSNs Change the Design Space: The transition from standard RDMA clusters to Rack-Scale Nodes (which extend ultra-high bandwidth scale-up links across an entire rack) makes moving expert states on the hot path physically viable for the first time.
- On-Device Combinatorial Solving: By mapping the planning problem to a GPU-resident warp-level parallel search, UltraEP cuts the decision window down to ~0.1 ms, completely avoiding host-device synchronization bottlenecks.
Key Results
UltraEP was tested on up to 256 GPUs using frontier MoE models ranging from 106B to 671B parameters (including Qwen3-235B and DeepSeek-V3).
- Throughput: UltraEP achieves an average of 94.6% of ideal throughput in training and 93.9% in serving prefill. This represents a 1.42$\times$ speedup over Megatron-LM (training) and a 1.56$\times$ speedup over SGLang (serving).
- Load Balance: It successfully compresses inter-rank load imbalance from a skewed 1.30–4.01 down to a near-perfect 1.01–1.04.
- Communication Efficiency: The RSN-tailored communication backend accelerates expert replication by 3.1$\times$ to 5.5$\times$ compared to mainstream backends like PyTorch distributed or DeepEP.
- Memory Reduction: By flattening hot spots, UltraEP reduces the peak MoE activation memory by up to 2$\times$ in training and 11$\times$ in serving prefill compared to unbalanced baselines.
Limitations and Future Work
The primary limitation of UltraEP is its hardware dependency: it strictly requires Rack-Scale Nodes (RSNs) with high-bandwidth scale-up fabrics (like NVLink or UALink) spanning the entire EP group. On traditional RDMA clusters where inter-node traffic is bottlenecked by slower scale-out networks, the overhead of real-time expert replication would remain prohibitively expensive.
For future work, the authors note that the exact-load balancing abstraction can be naturally extended to reinforcement learning (RL) pipelines that alternate frequently between training and inference.
Summary updated