arXiv:2508.01002cs.LGcs.DC2025-08被引 11

提出高效调度算法,显著降低大模型推理延迟并提升吞吐量。

Optimal Scheduling Algorithms for LLM Inference: Theory and Practice

  • 基于最优分块与动态资源分配原理设计调度策略
  • 实测将首令牌生成延迟降低53%,最大服务容量提升26%
  • 适合关注低延迟、高并发大模型部署的工程师

随着ChatGPT、Perplexity、Gemini等基于大语言模型(LLM)工具在各行业广泛应用,高效推理系统的需求日益增长。这些系统处理请求具有独特的两阶段计算结构:预填充阶段处理完整输入提示,解码阶段逐个自回归生成标记。这一特性需要新的请求路由与调度策略。本文构建了理论框架,建模LLM推理中的路由与调度问题,识别出两个关键设计原则——最优分块与动态资源分配,是实现高吞吐量的核心。基于此,提出资源感知动态(RAD)调度器,并证明其在温和条件下达到吞吐量最优。为应对不同时间间隔(TBT)约束的服务等级目标(SLO),设计了面向SLO的LLM推理(SLAI)调度器。SLAI利用实时测量优先处理接近错过TBT截止时间的解码请求,并根据已知提示长度重排预填充请求,进一步减少首令牌时间(TTFT)延迟。在Openchat ShareGPT4数据集上,使用Mistral-7B模型和NVIDIA RTX ADA 6000 GPU进行评估,相比Sarathi-Serve,SLAI将中位数TTFT降低53%,最大服务容量提升26%,使中位数TTFT低于0.5秒,同时满足尾部TBT延迟约束。

原文摘要 · Abstract (English)

With the growing use of Large Language Model (LLM)-based tools like ChatGPT, Perplexity, and Gemini across industries, there is a rising need for efficient LLM inference systems. These systems handle requests with a unique two-phase computation structure: a prefill-phase that processes the full input prompt and a decode-phase that autoregressively generates tokens one at a time. This structure calls for new strategies for routing and scheduling requests. In this paper, we take a comprehensive approach to this challenge by developing a theoretical framework that models routing and scheduling in LLM inference systems. We identify two key design principles-optimal tiling and dynamic resource allocation-that are essential for achieving high throughput. Guided by these principles, we propose the Resource-Aware Dynamic (RAD) scheduler and prove that it achieves throughput optimality under mild conditions. To address practical Service Level Objectives (SLOs) such as serving requests with different Time Between Token (TBT) constraints, we design the SLO-Aware LLM Inference (SLAI) scheduler. SLAI uses real-time measurements to prioritize decode requests that are close to missing their TBT deadlines and reorders prefill requests based on known prompt lengths to further reduce the Time To First Token (TTFT) delays. We evaluate SLAI on the Openchat ShareGPT4 dataset using the Mistral-7B model on an NVIDIA RTX ADA 6000 GPU. Compared to Sarathi-Serve, SLAI reduces the median TTFT by 53% and increases the maximum serving capacity by 26% such that median TTFT is below 0.5 seconds, while meeting tail TBT latency constraints.

大模型推理调度优化延迟降低吞吐量提升

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