通过动态分流长短请求,显著降低大模型推理成本与崩溃风险。
Dual-Pool Token-Budget Routing for Cost-Efficient and Reliable LLM Serving
- 将请求按预估令牌量分入短/长上下文专用池,智能调度
- 实测节省31%-42% GPU小时,年省超286万美元,崩溃率降5.4倍
- 无需分词器、低延迟,适配现有优化技术,适合生产部署
生产级vLLM集群通常按最坏情况的上下文长度配置实例,导致KV缓存严重浪费和并发利用率低下。实际中80%-95%的请求为短文本,却仍按长上下文配置服务,造成4-8倍吞吐能力浪费,并引发OOM崩溃、抢占和拒绝等问题。我们识别出根本原因:配置与流量不匹配。提出双池令牌预算路由机制,将同质集群划分为高吞吐短上下文池和高容量长上下文池。每个请求根据估算的总令牌预算路由,使用基于在线指数移动平均学习的字节转令牌比率,无需分词器。我们还构建了简单分析模型,可预测工作负载特征下的成本节约,便于部署前评估。在Azure LLM推理数据集和LMSYS-Chat-1M真实流量上,服务Llama-3-70B于A100 GPU,结果表明该方法减少GPU小时31%-42%,对应规模下年省286万美元,预占率下降5.4倍,P99 TTFT提升6%。对Qwen3-235B-A22B在AMD MI300X以1万请求/秒的案例研究显示,年节省达1540万美元。该方法仅增加O(1)调度开销,自动适应异构负载,且与PagedAttention、连续批处理、预填充-解码解耦等现有优化无缝兼容。
原文摘要 · Abstract (English)
Production vLLM fleets typically provision each instance for the worst-case context length, leading to substantial KV-cache over-allocation and under-utilized concurrency. In practice, 80-95% of requests are short, yet are served under configurations optimized for long contexts, wasting 4-8$\times$ throughput capacity and triggering reliability issues such as OOM crashes, preemption, and request rejections. We identify a common root cause for these inefficiencies: configuration-traffic mismatch. We propose dual-pool token-budget routing, a lightweight dispatch mechanism that partitions a homogeneous fleet into two specialized pools: a high-throughput short-context pool and a high-capacity long-context pool. Each request is routed based on its estimated total token budget, computed using a per-category bytes-to-token ratio that is learned online via exponential moving average from usage.prompt_tokens feedback, eliminating the need for a tokenizer. We also develop a simple analytical model that predicts fleet-level cost savings from workload characteristics and measured throughput differences, enabling practitioners to estimate benefits prior to deployment. Evaluations on real-world traces from the Azure LLM Inference Dataset and LMSYS-Chat-1M, serving Llama-3-70B on A100 GPUs, show that our approach reduces GPU-hours by 31-42%, corresponding to \$2.86M annual savings at fleet scale, while lowering preemption rates by 5.4$\times$ and improving P99 TTFT by 6%. A case study with Qwen3-235B-A22B on AMD MI300X at 10,000 req/s projects \$15.4M in annual savings. The method incurs only O(1) dispatch overhead, adapts automatically to heterogeneous workloads, and composes seamlessly with existing optimizations such as PagedAttention, continuous batching, and prefill-decode disaggregation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。