[Paper Review] Infinite-LLM: Efficient LLM Service for Long Context with DistAttention and Distributed KVCache
Introduces DistAttention and DistKV-LLM to enable efficient cloud-based LLM serving with long contexts by distributed KV cache management across data-center GPUs/CPUs, improving throughput and enabling much longer contexts.
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.
Motivation & Objective
- Address memory and computation challenges of cloud-based LLM services with extremely long context lengths.
- Propose distributed KV cache management and attention processing to utilize all data-center memory resources.
- Enable dynamic, scalable resource allocation without frequent live migrations or over-provisioning.
- Evaluate system performance across multi-node cloud setups with long-context benchmarks.
Proposed method
- Propose DistAttention to partition KV caches into rBlocks and compose Micro Attentions for distributed computation.
- Develop DistKV-LLM to coordinate memory usage across distributed GPUs/CPUs via rManager and gManager.
- Introduce DGFM to mitigate memory fragmentation by recalling and swapping blocks based on a debt-graph approach.
- Define a contract protocol with a global debt ledger for scalable, coherent cross-instance memory management.
- Overlap computation and remote data transfer to minimize communication overhead during prefill and auto-regressive phases.
Experimental results
Research questions
- RQ1How can KV Cache management be distributed across a data center to support very long context lengths in LLM serving?
- RQ2Can DistAttention and DistKV-LLM improve end-to-end throughput and context length scalability in cloud LLM services?
- RQ3What mechanisms ensure memory coherence, locality, and low overhead in a distributed KV cache system?
- RQ4What are the performance gains when deploying on multi-node GPU clusters for long-context tasks?
Key findings
- 1.03-2.4x end-to-end throughput improvements over state-of-the-art on 32 NVIDIA A100 GPUs.
- Support for 2-19x longer context lengths than current state-of-the-art LLM service systems.
- Validated across 18 datasets with context lengths up to 1,900K.
- Efficiently utilizes distributed GPU/CPU memory to handle long-context KV caches.
- Reduced data transfer volume in attention computation by enabling remote macro-attentions.
- Demonstrates robust scalability from 2 to 32 instances in a cloud environment.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.