RankCast: Phase-Aware Rank Balancing in MoE Serving
Kaidi Fu, Xu-Hao Lu, Pingwei Sun, Jianchao Tan, Yuchen Xie, Xunliang Cai
Abstract
Modern large language model (LLM) inference increasingly adopts disaggregated architectures that separate Prefill (P) and Decode (D) phases. Meanwhile, Expert Parallelism (EP) has been widely adopted in large Mixture-of-Experts (MoE) model serving. However, load imbalance still slows down MoE inference because each layer must wait for the busiest EP rank. The main source of latency differs between prefill and decode. Prefill is compute-bound, and its MoE layers' latency is determined by the maximum token count of the busiest rank. At the same time, under moderate batch sizes, Decode is memory-bound, so the latency is dominated by the maximum active-expert count across ranks. To solve both problems under a unified framework, we present RankCast, a system that reduces rank-level maximum token counts during prefill and active-expert counts during decode. For every token, RankCast preserves the predicted Top-p experts and chooses the remaining k-p from its Top-L candidates (L > k). In prefill, RankCast yields a price per rank that steers flexible assignments to less loaded ranks. In decode, RankCast closes experts on the busiest ranks while preserving the constraints for each token. Both paths are implemented and tested in the state-of-the-art inference frameworks SGLang and DeepEP. We overlap RankCast's kernels with model execution and reuse the existing DeepEP communication channel for metadata transmission. On Qwen3-235B-A22B with EP=8 and Qwen3.5-397B-A17B with EP=16, RankCast removes over 75% of the busiest rank's excess prefill load, improves prefill input throughput by up to 19%, and reduces decode time per output token by up to 10%. The quality cost is below one percentage point.
Create a lesson
Metadata
- Categories
- cs.DC, cs.AI, cs.LG
- Comments
- 23 pages, 4 figures, 11 tables
Related papers
RankServe: Rank-Aware CPU-GPU Scheduling for Memory-Constrained MoE Serving
Shared title terminologycs.DCHengyi Zhu, Zhendong Mi, Pu Zhao et al.
Scalable Placement for Disaggregated LLM Serving on Heterogeneous Edge Fleets
Shared title terminologycs.DCTruong-Thanh Le, Hoang-Loc La, Amir Taherkordi et al.
RePrism: Joint Request and Representation Scheduling for LLM Agent Serving
Shared title terminologycs.DCXijiang Shen, Aoli Zhu, Yanbo Tan et al.
Reliability-aware AI Agent Execution in Collaborative Edge Computing: A World Model Approach
Shared title terminologycs.DCXiangchun Chen, Jiannong Cao, Longxiang Gao et al.
Norn: Context-Length-Aware Optimization of Weight and KV Cache Placement for Offloaded LLM Inference
Shared title terminologycs.DCNaoto Sugiura, Hiroki Matsutani
CGSpec: Consistency-Guided Speculative Decoding with Overlap-Aware Verification Scheduling for Edge-Cloud Inference
Shared title terminologycs.DCYuanbing Ouyang, Xiaoli Liu, Shirong Wei et al.