[论文解读] Infinite-LLM: Efficient LLM Service for Long Context with DistAttention and Distributed KVCache
引入 DistAttention 和 DistKV-LLM,通过跨数据中心 GPU/CPU 的分布式 KV 缓存管理,实现对长上下文的高效云端大语言模型服务,提升吞吐量并支持更长的上下文。
Large Language Models (LLMs) demonstrate substantial potential across a diverse array of domains via request serving. However, as trends continue to push for expanding context sizes, the autoregressive nature of LLMs results in highly dynamic behavior of the attention layers, showcasing significant differences in computational characteristics and memory requirements from the non-attention layers. This presents substantial challenges for resource management and performance optimization in service systems. Existing static model parallelism and resource allocation strategies fall short when dealing with this dynamicity. To address the issue, we propose Infinite-LLM, a novel LLM serving system designed to effectively handle dynamic context lengths. Infinite-LLM disaggregates attention layers from an LLM's inference process, facilitating flexible and independent resource scheduling that optimizes computational performance and enhances memory utilization jointly. By leveraging a pooled GPU memory strategy across a cluster, Infinite-LLM not only significantly boosts system throughput but also supports extensive context lengths. Evaluated on a dataset with context lengths ranging from a few to 2000K tokens across a cluster with 32 A100 GPUs, Infinite-LLM demonstrates throughput improvement of 1.35-3.4x compared to state-of-the-art methods, enabling efficient and elastic LLM deployment.
研究动机与目标
- 应对带有极长上下文长度的云端大语言模型服务的内存与计算挑战。
- 提出分布式 KV 缓存管理和注意力处理,以充分利用整个数据中心的内存资源。
- 实现动态、可扩展的资源分配,避免频繁的在线迁移或资源过剩。
- 在具有长上下文基准的多节点云环境中评估系统性能。
提出的方法
- 提出 DistAttention,将 KV 缓存划分为 rBlocks,并组合微注意力以实现分布式计算。
- 开发 DistKV-LLM,通过 rManager 和 gManager 协调跨分布式 GPU/CPU 的内存使用。
- 引入 DGFM,通过基于债务图的方法回忆和置换区块来缓解内存碎片。
- 定义具有全局债务分类账的契约协议,实现可扩展、连贯的跨实例内存管理。
- 在预填充和自回归阶段重叠计算与远程数据传输,以最小化通信开销。
实验结果
研究问题
- RQ1如何在数据中心内分布式管理 KV 缓存,以支持 LLM 服务中的极长上下文长度?
- RQ2DistAttention 与 DistKV-LLM 是否能提升云端 LLM 服务的端到端吞吐量和上下文长度的可扩展性?
- RQ3在分布式 KV 缓存系统中,哪些机制能确保内存一致性、局部性和低开销?
- RQ4在多节点 GPU 集群上部署以处理长上下文任务时,性能提升是多少?
主要发现
- 在 32 个 NVIDIA A100 GPU 上,相对于现有最先进方法,端到端吞吐量提升 1.03-2.4 倍。
- 支持比当前最先进 LLM 服务系统长 2-19 倍的上下文长度。
- 在 18 个数据集上验证,上下文长度高达 1,900K。
- 高效利用分布式 GPU/CPU 内存来处理长上下文 KV 缓存。
- 通过实现远程宏注意力来减少注意力计算中的数据传输量。
- 在云环境中展示了从 2 到 32 个实例的鲁棒扩展性。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。