학술

xInfer: Elastic Parallelism and Load Balancing for Long-Tail Offline LLM Inference

arXiv CS.AI
CC BY
이 매체는 공공·자유 라이선스로 본문을 직접 표시합니다.

Abstract

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 candidate-layout makespans and switch only when the expected gain outweighs the reconfiguration cost. Dedicated re-sharding optimizations further shrink this cost by 2.6x. Layout adaptation alone cannot fix load imbalance across instances, so a two-level Distributed Overflow Queue redistributes requests within and across nodes off the critical decode path. To our knowledge, xInfer is the first inference system to drive runtime parallelism switching with a performance model grounded in arithmetic intensity. Across three long-tail offline workloads with Qwen3-8B/14B/32B on up to 32 H100 GPUs, xInfer achieves end-to-end speedups of up to 1.46x over vLLM and 1.49x over SGLang.
Additional Features

관련 뉴스