Replicas-as-Variables: A Planner for Throughput-Optimal Routing in LLM Deployment

Shaojiang Wang, Geer Yang, Wenbo Wang, Pengcheng Wang, Bin WuNeurIPS 2026

TL;DR

Trying to run a massive LLM across a mismatched collection of cloud GPUs is usually like forcing square pegs into round holes—traditional deployment templates lock you into rigid pipelines that leave your best hardware sitting idle. ReVar (Replicas-as-Variables) throws out the rulebook, treating every individual piece of a model—whether a standard dense block or a specialized Mixture-of-Experts module—as an independent variable in a global optimization puzzle. The result is bespoke, multipath routing plans that pool fragmented memory and squeeze up to 22%–50% more throughput out of messy, real-world GPU clusters.

What Problem Does This Paper Address?

In an ideal world, we’d all serve LLMs on pristine pods of identical H100s wired together with ultra-fast interconnects. In reality, cloud availability and hardware upgrades leave most engineering teams with heterogeneous fleets: a patchwork of older and newer GPUs with uneven VRAM, wildly different compute speeds, and asymmetric network bottlenecks.

While modern serving engines (like vLLM) are brilliant at managing memory and batching requests after a model is deployed, the upstream planning step is usually rigid. Standard templates like pipeline parallelism commit to fixed stages and links before knowing where the hardware bottlenecks actually lie. If one stage lands on a slow GPU or crosses a narrow network link, the fast GPUs upstream simply stall. And while Mixture-of-Experts (MoE) systems sometimes replicate popular "experts," standard dense layers often become the hidden bottleneck and need that exact same flexibility.

Rigid templates leave fast GPUs waiting on bottleneck stages in heterogeneous clusters.

Methods

Instead of choosing from pre-baked deployment templates, ReVar turns cluster planning into a single Mixed-Integer Linear Program (MILP).

First, it breaks an LLM down into a unit graph—a directed acyclic graph where nodes are deployable compute blocks (dense layers, MoE routers, individual experts) and edges represent activation transfers. Because MoE models dynamically branch a single model token into multiple paths, ReVar introduces an internal accounting unit called a "token copy" (tokc) to keep flow conservation mathematically airtight across stochastic, branching layers.

ReVar maps the model's unit graph and cluster hardware profile into a joint MILP.

Next, ReVar profiles the cluster’s compute rates, memory limits (accounting for in-flight activations via Little's Law), and directed link bandwidths. The MILP solver then jointly optimizes three things to maximize end-to-end token throughput:

  1. Replica counts: How many copies of each unit live on each GPU.
  2. Execution rates: How hard each GPU works on its assigned units.
  3. Activation flows: How traffic splits and routes across GPU-to-GPU links.

Standard pipeline, full-replication, and expert-parallel setups naturally emerge as restricted special cases of this math—meaning ReVar is guaranteed to do at least as well as conventional layouts, while unlocking uneven replication and crossing multipath routes when hardware gets weird. During actual autoregressive decoding, a stateful runtime pins each sequence (and its KV cache) to a chosen path so states don't get scrambled.

An instantiated ReVar plan showing uneven replication of both dense blocks and experts alongside crossing multipath routes.

Datasets

Rather than evaluating text accuracy on NLP datasets, this systems paper benchmarks throughput and latency using profiled execution harnesses (synthetic GEMM/cuBLAS operations and real CPU/GPU tensor transfers over Gloo and NCCL). They evaluate five model architectures (Llama-3-8B, Mistral-7B, DeepSeek-V2-Lite, Mixtral-8x7B, and Mixtral-8x22B) across three hardware testbeds:

  • Group I: Controlled simulations of 6 cluster topologies on an 8-H200 node.
  • Group II: A physical 6-node cluster with 8 L20s and 1 P4 GPU.
  • Group III: A physical 9-node, 38-GPU cluster across four availability zones mixing five GPU generations (A10, V100, P100, T4, and P4).

Key Insights and Ideas

  • Dense blocks deserve MoE treatment: Prior work treated MoE experts as the natural unit of flexible replication. ReVar shows that letting dense stages replicate unevenly alongside experts is critical when pooling memory across mismatched hardware.
  • Multipath routing quadratically beats fixed pairs across slow boundaries: The authors prove mathematically that when splitting stages across a slow network boundary with independent pairwise links, traditional 1-to-1 pipeline pairing scales bandwidth at $O(N)$, whereas ReVar’s crossing multipath routing utilizes complete bipartite links to achieve $\Theta(N^2)$ throughput scaling.
  • Coarse graphs solve fast without losing optimality: MILP is NP-hard, which sounds scary for big models. However, grouping layers coarsens the graph dramatically: a 4-group Mixtral graph retains 99.9924% of the layer-by-layer optimal throughput while cutting solver wall time from ~40 seconds down to 2.2 seconds.

Key Results

  • Simulated Heterogeneous Fleets (Group I): ReVar achieves the highest (or tied-highest) throughput in 14 of 15 configurations, beating the strongest baseline by 15.8% on Mixtral-8x7B in a mixed H100/A10 setup.
  • 6-Node L20/P4 Cluster (Group II): ReVar delivers massive gains on MoE models, outperforming the best comparators by 33.3% on DeepSeek-V2-Lite (29,550 vs. 22,160 tok/s) and 49.6% on Mixtral-8x7B (16,432 vs. 10,982 tok/s).
  • 9-Node, 5-GPU-Type Cluster (Group III): On Mixtral-8x22B—a massive model whose BF16 weights cannot fit into any single GPU-type pool in the cluster—most template baselines fail completely to find a feasible layout. ReVar pools fragmented memory across pools to hit ~4,480 tok/s, beating the strongest feasible comparator by ~22%.

Limitations and Future Work

  • Planning Complexity: Solving the exact placement MILP is NP-hard, with variables scaling quadratically with the number of GPUs ($\Theta(|U||G| + |E||G|^2)$). Large fleets require graph coarsening or pod-based decomposition rather than one giant global solve.
  • Steady-State Expectations: The core MILP models MoE gating and token flows as steady-state averages in expectation, relying on runtime calibration, admission control, and backpressure to absorb real-world execution jitter and fragmentation.
  • (Note: Explicit future research directions are not discussed in the main text of the paper.)

Summary updated

BibTeX
@inproceedings{wang2026replicas,
  author = {Shaojiang Wang and Geer Yang and Wenbo Wang and Pengcheng Wang and Bin Wu},
  title = {{Replicas-as-Variables: A Planner for Throughput-Optimal Routing in LLM Deployment}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=EUSU1DpVqc},
}
Figure