Efficient KV Cache Migration for Geo-Distributed LLM Inference in Collaborative Edge Computing
Mingjin Zhang, Jiannong Cao, Tao Wu, Xiangchun Chen, Ne Wang
Abstract
Large Language Models (LLMs) have shown exceptional capabilities but rely heavily on centralized cloud GPU clusters, leading to high bandwidth costs, latency, and privacy issues. Edge computing offers a solution by deploying LLMs closer to users on edge servers, yet single edge servers often cannot meet LLMs' heavy computational demands. Collaborative Edge Computing (CEC) addresses this challenge by integrating resources of multiple geo-distributed heterogeneous edge servers, which jointly host small model shards and associated Key-Value (KV) cache for distributed inference. However, edge servers may disconnect or easily become overloaded, making it essential to migrate stateful KV cache to other servers for ensuring continuous service. Existing cloud-based KV cache management methods, such as direct cross-GPUs transmission and recomputation from input tokens are ill-suited for bandwidth-constrained and resource-limited edge environments. In this work, we propose EdgeFlow, a novel hybrid KV cache migration scheme that integrates direct KV cache transmission with activation-based recomputation, leveraging parallel computation and communication to minimize migration time. On this basis, we formulate a multi-node KV migration optimization problem and design a 2-approximation algorithm based on improved linear programming relaxation and bipartite graph techniques. Extensive experiments on a real-world distributed LLM inference platform demonstrate that EdgeFlow reduces migration time by up to 45%, significantly enhancing the robustness and efficiency of distributed LLM inference in collaborative edge computing.
Create a lesson
Related papers
RISK-KV: Quality-Aware Selective KV Cache Reconstruction for Distributed LLM Inference
Shared title terminology · Wang Yuekai
TideCache: Efficient Hybrid LLM Serving with Transparent Cache Management and Layer-Wise Streaming
Shared title terminology · Jinbin Luo, Xiaozhe Yao, Shang Yang et al.
Matching Architecture to Workload: Comparing RISC-V Parallel Accelerators for Energy-Efficient Embedded Computing
Shared title terminology · Luca Colombo, Luigi Ghionda, Amirhossein Kiamarzi et al.
LEDGE: An Efficient Simulator for Distributed LLM Serving on Heterogeneous Edge Devices
Shared title terminology · Zihao Wang, Ye Tian, Tajana Rosing et al.
Lower Bounds for the Distributed Computation of Degeneracy and k-Core
Shared title terminology · Lélia Blin, Yan S. Couto, Cristina G. Fernandes et al.
NVFP4-MLA: Unified FP4 KV-Cache Storage and Attention Computation for Multi-Head Latent Attention
Shared title terminology · Chao Ni, Qi Zhang, Xiao Wang et al.