通过混合缓存与自适应调度,大幅提升大模型推理的吞吐量。
Apt-Serve: Adaptive Request Scheduling on Hybrid Cache for Scalable LLM Inference Serving
- 采用混合缓存,结合键值对与隐藏状态缓存,提升批处理规模。
- 动态优化请求批次组成,使有效吞吐量最高提升8.8倍。
- 适合高并发大模型服务场景,尤其适用于资源受限部署。
大规模语言模型(LLM)推理服务系统是各类基于LLM应用的核心。随着服务需求持续增长,如何在满足延迟SLO的前提下扩展系统以应对高请求率,即实现高有效吞吐量,变得至关重要。然而,现有系统普遍难以提升有效吞吐量,主要原因是首次词元时间(TTFT)SLO达标率显著下降。我们识别出两大瓶颈:(1) 内存密集型的键值(KV)缓存限制了在GPU内存约束下的批大小扩展;(2) 默认先到先服务调度策略强制固定的批组成。本文提出Apt-Serve,一个可扩展的框架,旨在提升LLM推理服务的有效吞吐量。Apt-Serve引入新型混合缓存机制,将KV缓存与内存高效的隐藏状态缓存相结合,用于复用输入的隐藏状态向量,从而支持更大批处理规模并提高请求并发性。基于该混合缓存,Apt-Serve设计了一种自适应运行时调度机制,动态优化批组成。我们形式化定义了自适应调度优化问题,并提出一种具有理论保证的高效算法。在三个真实世界数据集及参数量从13B到66B的多个LLM上的大量评估表明,Apt-Serve相比最先进推理系统,有效吞吐量最高提升8.8倍。
原文摘要 · Abstract (English)
Large language model (LLM) inference serving systems are essential to various LLM-based applications. As demand for LLM services continues to grow, scaling these systems to handle high request rates while meeting latency Service-Level Objectives (SLOs), referred to as effective throughput, becomes critical. However, existing systems often struggle to improve effective throughput, primarily due to a significant decline in Time To First Token (TTFT) SLO attainment. We identify two major causes of this bottleneck: (1) memory-intensive KV cache that limits batch size expansion under GPU memory constraints, and (2) rigid batch composition enforced by the default First-Come-First-Serve scheduling policy. In this paper, we introduce Apt-Serve, a scalable framework designed to enhance effective throughput in LLM inference serving. Apt-Serve features a new hybrid cache scheme that combines KV cache with a memory-efficient hidden cache for reusable input hidden state vectors, allowing large batch sizes and improving request concurrency. Based on the hybrid cache, Apt-Serve employs an adaptive runtime scheduling mechanism that dynamically optimizes batch composition. We formally define the adaptive scheduling optimization problem and propose an efficient algorithm with theoretical guarantees. Extensive evaluations on three real-world datasets and LLMs ranging from 13B to 66B parameters demonstrate that Apt-Serve achieves up to 8.8x improvement in effective throughput compared to the state-of-the-art inference serving systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。