arXiv:2409.15104cs.DCcs.LG2024-09被引 3

针对大模型推理中长短输入差异大的问题,提出可抢占的高效调度系统。

PecSched: Preemptive and Efficient Cluster Scheduling for LLM Inference

  • 通过抢占机制优先处理短输入请求,提升响应速度。
  • 缩短短请求队列延迟92%,吞吐提升595%,长请求完成时间基本不变。
  • 适合大规模语言模型服务部署,尤其高并发短请求场景。

随着基于Transformer的大语言模型(LLM)规模扩大,其上下文长度已超过10万标记。对近期Azure LLM推理追踪数据的分析显示,输入长度呈高度偏斜的长尾分布:约80%的输入不足2K标记。现有集群级调度策略(如FIFO、预留和优先级机制)主要针对2K以下短请求,无法应对这种异构性,导致队头阻塞、资源利用率低以及长输入请求饥饿。为此,我们提出PecSched——一种面向LLM推理的可抢占且高效的集群调度系统。其关键技术包括:1)优先处理短输入请求的抢占调度;2)协同预填充与解码的共置与拆分,减少抢占次数与持续时间;3)快速序列并行(SP)技术,显著降低长输入请求的预填充耗时,从而减少抢占概率。基于Azure LLM推理数据的评估表明,相比当前最优集群调度器,PecSched将短输入请求的99百分位排队延迟降低最高达92%,吞吐提升最高达595%,同时对长输入请求的任务完成时间(JCT)影响极小。代码已开源。

原文摘要 · Abstract (English)

The scaling of transformer-based Large Language Models (LLMs) has significantly expanded their context lengths, enabling applications where inputs exceed 100K tokens. Our analysis of a recent Azure LLM inference trace reveals a highly skewed long-tail distribution of input lengths, with approximately 80% of inputs shorter than 2K tokens. Long inputs constitute only a small fraction. Existing cluster-level LLM scheduling strategies, including First-In-First-Out (FIFO), reservation-based, and priority-based approaches, primarily target short-input requests with lengths below 2K and fail to address this heterogeneity, leading to inefficiencies such as head-of-line blocking, resource underutilization, and starvation of long-input requests. We propose PecSched, a Preemptive and Efficient Cluster SCHEDuling system for LLM inference. PecSched introduces the following key techniques: 1) preemptive scheduling that prioritizes short-input requests for their performance; 2) coordinated prefill-decode colocation and disaggregation, which reduces both the duration and frequency of preemptions; 3) fast Sequence Parallelism (SP) that minimizes the prefill time of long-input requests to further reduce the likelihood and frequency of preemptions. Evaluations based on Azure LLM inference trace show that, compared to state-of-the-art cluster-level LLM inference schedulers, PecSched reduces the 99th percentile queueing delay of short-input requests by up to 92% and improves their throughput by up to 595%, without significantly affecting the Job Completion Time (JCT) of long-input requests. We open-sourced our code.

调度系统大模型推理抢占调度性能优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。