Papers › LayerKV: Optimizing Large Language Model Serving with Layer-wise KV Cache Management

LayerKV: Optimizing Large Language Model Serving with Layer-wise KV Cache Management

1 Oct 2024arXiv:2410.00428archive 2025-07-28

Yi Xiong, Hao Wu, Changxu Shao, Ziqing Wang, Rui Zhang, Yuhong Guo, Junping Zhao, Ke Zhang, Zhenxuan Pan

The expanding context windows in large language models (LLMs) have greatly enhanced their capabilities in various applications, but they also introduce significant challenges in maintaining low latency, particularly in Time to First Token (TTFT). This paper identifies that the sharp rise in TTFT as context length increases is predominantly driven by queuing delays, which are caused by the growing demands for GPU Key-Value (KV) cache allocation clashing with the limited availability of KV cache blocks. To address this issue, we propose LayerKV, a simple yet effective plug-in method that effectively reduces TTFT without requiring additional hardware or compromising output performance, while seamlessly integrating with existing parallelism strategies and scheduling techniques. Specifically, LayerKV introduces layer-wise KV block allocation, management, and offloading for fine-grained control over system memory, coupled with an SLO-aware scheduler to optimize overall Service Level Objectives (SLOs). Comprehensive evaluations on representative models, ranging from 7B to 70B parameters, across various GPU configurations, demonstrate that LayerKV improves TTFT latency up to 69x and reduces SLO violation rates by 28.7%, significantly enhancing the user experience.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2410.00428")

Code

Syntology Ran 5 of 14 code samples harvested from 1 repository linked to this paper; 9 have no recorded run. Of those that ran: 5 ran with no contract checked.

By repository: community (archive-listed): 14 samples from 1 repository, 5 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

intelligent-machine-learning/glake mentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 5 ran; 0 honoured the contract we drafted; 9 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

5ran
9unverified

Licence: 0 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from intelligent-machine-learning/glake. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

async_request_deepspeed_mii intelligent-machine-learning/glake/GLakeServe/benchmarks/backend_request_func.py community (archive-listed) ran Apache-2.0 (permissive) · 5109c385e92b727e · report
async_request_tgi intelligent-machine-learning/glake/GLakeServe/benchmarks/backend_request_func.py community (archive-listed) ran Apache-2.0 (permissive) · 23a62a462a38f854 · report
async_request_trt_llm intelligent-machine-learning/glake/GLakeServe/benchmarks/backend_request_func.py community (archive-listed) ran Apache-2.0 (permissive) · fa581ebc13cb414d · report
run_and_read_all intelligent-machine-learning/glake/GLakeServe/collect_env.py community (archive-listed) ran Apache-2.0 (permissive) · 5ae630bfc3821b6e · report
sample_requests intelligent-machine-learning/glake/GLakeServe/benchmarks/benchmark_throughput.py community (archive-listed) ran Apache-2.0 (permissive) · f55439b30be97107 · report
awq_dequantize intelligent-machine-learning/glake/GLakeServe/vllm/_custom_ops.py community (archive-listed) unverified Apache-2.0 (permissive) · c382c6353e8cccb0 · report
awq_gemm intelligent-machine-learning/glake/GLakeServe/vllm/_custom_ops.py community (archive-listed) unverified Apache-2.0 (permissive) · f3fcfeaca594c86f · report
get_served_model_name intelligent-machine-learning/glake/GLakeServe/vllm/config.py community (archive-listed) unverified Apache-2.0 (permissive) · 355e5d19707b7c81 · report
gptq_gemm intelligent-machine-learning/glake/GLakeServe/vllm/_custom_ops.py community (archive-listed) unverified Apache-2.0 (permissive) · 4def2cf22c36f4e8 · report
run intelligent-machine-learning/glake/GLakeServe/collect_env.py community (archive-listed) unverified Apache-2.0 (permissive) · 6b73fe0480a96ad9 · report
run_and_parse_first_match intelligent-machine-learning/glake/GLakeServe/collect_env.py community (archive-listed) unverified Apache-2.0 (permissive) · ce7a62e37fe78c0d · report
run_hf intelligent-machine-learning/glake/GLakeServe/benchmarks/benchmark_throughput.py community (archive-listed) unverified Apache-2.0 (permissive) · 0745e2813903bd8d · report
run_vllm intelligent-machine-learning/glake/GLakeServe/benchmarks/benchmark_throughput.py community (archive-listed) unverified Apache-2.0 (permissive) · f44718a5d7ec296f · report
sample_requests intelligent-machine-learning/glake/GLakeServe/benchmarks/benchmark_serving.py community (archive-listed) unverified Apache-2.0 (permissive) · 8abfc7dfff3ebb06 · report

Tasks

Language ModelingLanguage ModellingLarge Language ModelManagementScheduling

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections