arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.05516cs.LGcs.DC
收藏

基于Pensieve的有状态大语言模型服务

Stateful Large Language Model Serving with Pensieve

New York University(纽约大学)

Lingfan Yu, Jinkun Lin, Jinyang Li

AI总结:

针对现有无状态LLM服务系统处理多轮对话存在重复计算的问题,设计了带多层缓存和改进PagedAttention内核的有状态服务系统Pensieve,吞吐量达vLLM和TensorRT-LLM的1.14-3.0倍且显著降延迟。

摘要:

大语言模型(LLM)如今应用极为广泛,高效提供模型服务至关重要。现有LLM服务系统在不同请求间是无状态的。因此,当LLM用于多轮对话这一常见场景时,服务系统必须在每轮请求中一并处理不断增长的对话历史日志,导致重复计算。\n本文设计了Pensieve,一种针对多轮对话LLM服务优化的系统。Pensieve通过缓存已处理的历史信息来跨请求维护对话状态,避免重复处理。其多层缓存策略可同时利用GPU和CPU内存,高效存储与检索缓存数据。Pensieve还改进了近期的PagedAttention内核,支持GPU缓存分布在非连续内存时多个输入token间的注意力计算。实验评估表明,Pensieve的吞吐量可达vLLM和TensorRT-LLM的1.14-3.0倍,并显著降低延迟。

英文摘要:

Large Language Models (LLMs) are wildly popular today and it is important to serve them efficiently. Existing LLM serving systems are stateless across requests. Consequently, when LLMs are used in the common setting of multi-turn conversations, a growing log of the conversation history must be processed alongside any request by the serving system at each turn, resulting in repeated processing. In this paper, we design $Pensieve$, a system optimized for multi-turn conversation LLM serving. $Pensieve$ maintains the conversation state across requests by caching previously processed history to avoid duplicate processing. $Pensieve$'s multi-tier caching strategy can utilize both GPU and CPU memory to efficiently store and retrieve cached data. $Pensieve$ also generalizes the recent PagedAttention kernel to support attention between multiple input tokens with a GPU cache spread over non-contiguous memory. Our evaluation shows that $Pensieve$ can achieve $1.14$-$3.0\times$ the throughput of vLLM and TensorRT-LLM and significantly reduce latency.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑