arXiv:2607.23815cs.DBcs.AI2026-07

让大模型服务理解查询结构,实现中间结果缓存复用,提速近4.6倍。

Kalypso: Relational LLM Serving

  • 通过感知查询计划,实现语义算子间的流水线执行
  • 在多种负载下查询完成时间提升最高达4.57倍
  • 适合需要高效处理复杂查询的数据库与AI系统

大语言模型正被广泛用于过滤、提取、排序、连接和转换非结构化数据。现有语义查询系统采用请求中心的模型服务机制,未考虑查询计划,导致大量性能潜力未被挖掘。本文提出关系型大模型服务,使模型服务能够感知语义查询结构,同时保持查询语义和输出准确性。核心优势在于算子间流水线执行:当中间元组直接从一个算子流向下一个时,可复用其键值缓存(KV-cache)状态,避免重复计算。我们设计了Kalypso系统,提供语义查询计划接口,并采用自适应、内存感知的调度算法执行查询。该系统解决了一个新的在线调度问题——将流水线执行与GPU内存压力管理结合,提前在缓存被驱逐前复用状态。其调度器持续调整内存分配,平衡上游并行度、下游进展和GPU利用率。评估显示,相较于请求中心式服务,Kalypso在多样工作负载下显著降低查询完成时间,最快提速4.57倍,证明查询感知的大模型服务能大幅提升语义查询效率。

原文摘要 · Abstract (English)

Large language models are increasingly used as semantic operators for filtering, extracting, ranking, joining, and transforming unstructured data. Existing semantic query processing systems invoke request-centric LLM serving systems that are unaware of the query plan, leaving substantial performance opportunities unused. This paper introduces relational LLM serving, an abstraction that makes LLM serving aware of semantic query structure while preserving query semantics and output accuracy. The key opportunity is pipelined execution across semantic operators: when intermediate tuples flow directly from one operator to the next, their KV-cache state can be reused instead of recomputed. We present Kalypso, a relational LLM serving system that exposes an API for semantic query plans and executes them using an adaptive, memory-aware scheduling algorithm. Kalypso addresses a new online scheduling problem in which pipelined operator execution is coupled with GPU memory pressure management to reuse KV-cache state in the serving engine before eviction. Its scheduler continuously adjusts memory allocations to balance upstream parallelism, downstream progress, and GPU utilization. Our evaluation shows that Kalypso improves query completion time over baselines using request-centric LLM serving, with speedups up to 4.57x across diverse workloads, demonstrating that query-aware LLM serving can substantially improve the efficiency of semantic query execution.

大模型服务查询优化缓存复用流水线执行

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