Replicas-as-Variables: A Planner for Throughput-Optimal Routing in LLM Deployment
Abstract
Deploying large language models on heterogeneous GPU clusters requires coordinating memory placement, compute allocation, and communication. Fixed pipeline and replication templates restrict these decisions before the hardware bottlenecks are known. We introduce ReVar, a planner that treats component replica counts as decision variables for both dense stages and mixture-of-experts modules. A mixed-integer linear program jointly selects replicas, execution rates, and activation flows on a modular unit graph. The formulation provides throughput bounds under a profiled resource model, includes common deployment templates as restricted cases, and admits allocation laws in compute- and bandwidth-dominated regimes. Evaluation combines controlled topology simulation on an eight-H200 platform with experiments on six-node and nine-node heterogeneous clusters. On the nine-node, 38-GPU cluster, CUDA/NCCL execution for memory-fragmented Mixtral-8x22B improves throughput by approximately 22% over the strongest feasible comparator. Together, these results characterize when flexible replication and routing improve resource utilization and how the resulting plans connect to execution.