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

MELL:通过多GPU KV缓存管理实现内存高效的大语言模型服务

Mell: Memory-Efficient Large Language Model Serving via Multi-GPU KV Cache Management

Liu Qianli, Hong Zicong, Chen Fahao, Li Peng, Guo Song

AI总结:

针对大语言模型服务中KV缓存内存占用大、GPU负载不均的问题,本文提出MELL系统,通过自适应请求迁移机制和支持迁移的多GPU调度在线算法,实现内存高效服务,最多可减少31%GPU用量、提升43%GPU利用率。

摘要:

为海量用户提供大语言模型(LLM)服务面临着瞬态状态(即键值(KV)缓存)内存占用巨大的挑战,该缓存的规模随序列长度和请求数量增长。无需租赁或购买更多昂贵的GPU,GPU间KV缓存的负载不均衡,加之GPU间通信技术的最新进展,为通过请求迁移承载更多请求提供了契机。然而,较高的迁移开销和不可预测的请求模式使其颇具挑战。因此,本文提出MELL,一种通过多GPU KV缓存管理实现内存高效的LLM服务系统。该系统通过考量动态KV缓存负载与成本高昂的请求迁移,减少系统所需的GPU数量。具体而言,我们首先提出了一种自适应请求迁移机制,以平衡计算与通信开销,并适配多样化的资源条件。随后,我们设计了一种适配多LLM请求、支持迁移的多GPU调度问题的在线算法,其目标是在限制迁移次数的同时,最小化所需GPU数量。最后,我们实现了MELL的原型系统,实验表明,与现有LLM服务系统相比,它最多可减少31%的GPU使用量,最高可提升43%的GPU利用率。

英文摘要:

Serving large language models (LLMs) for massive users is challenged by the significant memory footprint of the transient state, known as the key-value (KV) cache, which scales with sequence length and number of requests. Instead of renting or buying more expensive GPUs, the load imbalance of the KV cache across GPUs, coupled with recent advances in inter-GPU communication, provides an opportunity to serve more requests via request migration. However, high migration overhead and unpredictable request patterns make it challenging. Therefore, this paper proposes MELL, a memory-efficient LLM serving system via multi-GPU KV cache management. It saves the number of GPUs needed in the system by considering the dynamic KV cache load and the costly request migration. Specifically, we first develop an adaptive request migration mechanism to balance the computational and communication overheads and adapt to diverse resource conditions. Then, we design an online algorithm tailored to a multi-LLM request and multi-GPU scheduling problem with migration enabled. It aims to minimise the required GPUs while limiting the number of migrations. Finally, we implement a prototype of MELL and demonstrate that it reduces the number of GPUs by 31% and increases the GPU utilization by 43% at most compared to existing LLM serving systems.

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

↑