xInfer: Elastic Parallelism and Load Balancing for Long-Tail Offline LLM Inference
Offline LLM inference issues a fixed batch of requests at once and optimizes whole-batch completion time rather than the latency of any single request. It underpins many LLM applications, e.g., data curation, model evaluation, and reinforcement-learning rollout. Their highly skewed, long-tail output lengths expose two weaknesses in inference engines whose TP/DP layout is fixed at launch: (I) low arithmetic intensity: the growing KV-Cache shrinks the runnable batch, pushing it below the hardware ridge point and leaving decode memory-bound. (II) load imbalance: a few long requests keep running after their peers finish, and since generation lengths are unpredictable, no static schedule can avoid it. We present xInfer, an inference system that adapts both its parallel layout and its request placement at runtime. To raise arithmetic intensity, Flexible Parallelism Switching consolidates data-parallel replicas into larger tensor-parallel groups at the price of extra intra-node all-reduce communication. Whether this trade pays off depends on the evolving workload, so a performance model fitted ahead of time (five-fold cross-validated R^2 >= 0.96) lets the runtime coordinator predict…
- arXiv
- 2612.05145
- Authors
- Ao Sun, Yinghao Chen, Shiju Wang, Weilin Zhao, Yuxiang Huang and 3 more
- Categories
- cs.DC · cs.AI · cs.PF