Efficiently harnessing GPU compute is critical to improving user experience and reducing operational costs in large language model (LLM) services. However, current inference engine schedulers overlook the attention backend's sensitivity to request-length heterogeneity within a batch. As state-of-the-art models now support context windows exceeding 128K tokens, this once-tolerable inefficiency has escalated into a primary system bottleneck, causing severe performance degradation through GPU underutilization and increased latency. We present CascadeInfer, a runtime system that dynamically reschedules requests across multiple instances serving the same LLM to mitigate per-instance length heterogeneity. CascadeInfer partitions these instances into length-specialized groups, each handling requests within a designated length range, naturally forming a pipeline as requests flow through them. CascadeInfer devises a dynamic programming algorithm to efficiently find the stage partition with the best QoE, employs runtime range refinement together with decentralized load (re)balance both across and within groups, achieving a balanced and efficient multi-instance service. Our evaluation shows that, under the same configuration, CascadeInfer reduces end-to-end latency by up to 67% and tail latency by up to 69%, while improving overall system throughput by up to 2.89 times compared to the state-of-the-art multi-instance scheduling systems.
翻译:高效利用GPU计算资源对于提升大语言模型(LLM)服务的用户体验、降低运营成本至关重要。然而,当前推理引擎调度器忽略了注意力后端对批处理中请求长度异质性的敏感度。随着最先进的模型现已支持超过128K token的上下文窗口,这种一度可容忍的低效已升级为主要系统瓶颈,导致GPU利用率不足和延迟增加,造成严重性能下降。我们提出CascadeInfer——一种运行时系统,通过在服务于同一LLM的多个实例间动态重调度请求,以缓解单实例的长度异质性。CascadeInfer将这些实例划分为长度专业化组,每个组处理指定长度范围内的请求,随着请求流经各组,自然形成流水线。CascadeInfer设计了一种动态规划算法,用于高效寻找最优QoE的阶段划分方案,并结合运行时范围精化与跨组及组内的分散式负载(再)均衡,实现均衡高效的多实例服务。评估表明,在相同配置下,与最先进的多实例调度系统相比,CascadeInfer将端到端延迟降低高达67%,尾延迟降低高达69%,同时将整体系统吞吐量提升高达2.89倍。