SmartGen: Seamless Disaggregated LLM Inference with Selective KV Cache Transfer
Abstract
Disaggregating the prefill and decoding stages of large language model (LLM) inference into two separate sets of nodes is widely adopted in today's LLM serving systems. However, such an architecture poses significant challenges for self-hosted LLM deployments on rented cloud instances, since transferring enormous key-value (KV) caches between disaggregated nodes can easily saturate the limited inter-node network bandwidth. In this paper, we propose to mitigate the network bottleneck by selectively transferring essential KV cache entries across the two stages. There are two challenges to achieve selective KV cache transfer, i.e., accurate KV selection during the prefill stage, and efficient KV fetching during the decoding stage. To address these challenges, we design SmartGen, a KV cache transfer engine that allows seamless disaggregated LLM inference with three data transfer paths. Specifically, we leverage 1) a profile-based proactive transfer path to identify and push essential KV cache entries to the decoding node during the prefill stage, 2) a parallel on-demand transfer path to simultaneously fetch remote and local KV cache entries during the decoding stage, and 3) a speculative transfer path to finally deliver all KV caches to the decoding node. Experimental results show that SmartGen reduces time-to-second-token by up to 4.3x compared with the typical full KV cache transfer approach while offering comparable subsequent decoding performance and accuracy.
Create a lesson
Related papers
Norn: Context-Length-Aware Optimization of Weight and KV Cache Placement for Offloaded LLM Inference
Shared title terminologycs.DCNaoto Sugiura, Hiroki Matsutani
CCAMoE: Cache-Conditioned Adaptive Inference for Offloaded MoE
Shared title terminologycs.DCXuan Zhang, Haisheng Tan, Han Tian et al.
Twindex: Index Cache Offloading with Coarse-to-Fine Selection for Long-Context Sparse-Attention Serving
Shared title terminologycs.DCYuxuan Xia, Jiakun Fan, Han Meng et al.
Callo: Serving Cache-Miss Requests with Speculative Decoding on Invalidated KV under Prefill-Decode Disaggregation
Shared title terminologycs.DCJianjun Ou, Matthew Lentz
When Does Disaggregation Pay? Simulating Prefill--Decode--Attention--FFN Specialization for Agentic LLM Inference
Shared title terminologycs.DCPrzemyslaw Forys, Haoran Wu, Can Xiao et al.
Efficient Multi-round LLM Inference over Disaggregated Serving
Shared title terminologycs.DCWenhao He, Youhe Jiang, Penghao Zhao et al.