SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.14442 · 2024

A Systematic Study of Cross-Layer KV Sharing for Efficient LLM Inference

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2410.14442.json · badge: /api/ran/2410.14442.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
whyNLP/LCKV canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
clear_chat_history Ran
ran; our contract draft was wrong, not the code
whyNLP/LCKV/run_chat.py
pointer only (licence: NONE) · get_code("259b212edddd369f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, whyNLP/LCKV when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_default_filename Ran
ran; our contract draft was wrong, not the code
whyNLP/LCKV/run_chat.py
pointer only (licence: NONE) · get_code("b28eddb4feb75e0f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, whyNLP/LCKV when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

prepare_ctrl_input Ran
ran; our contract draft was wrong, not the code
whyNLP/LCKV/run_generation.py
pointer only (licence: NONE) · get_code("a766a95b9fd5ee9c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, whyNLP/LCKV when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

prepare_xlm_input Ran
ran; our contract draft was wrong, not the code
whyNLP/LCKV/run_generation.py
pointer only (licence: NONE) · get_code("b7bf53f6b6b11a4b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, whyNLP/LCKV when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

prepare_xlnet_input Ran
ran; our contract draft was wrong, not the code
whyNLP/LCKV/run_generation.py
pointer only (licence: NONE) · get_code("80844fa7cfa6e8d8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, whyNLP/LCKV when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

save_chat Ran
ran; our contract draft was wrong, not the code
whyNLP/LCKV/run_chat.py
pointer only (licence: NONE) · get_code("66dd156d52d85aae")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, whyNLP/LCKV when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

tinyllama_get_lr Ran
ran, honoured the contract we drafted
whyNLP/LCKV/run_clm.py
pointer only (licence: NONE) · get_code("25136b330739fb24")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, whyNLP/LCKV when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

flash_attention_forward Not yet run
unverified (harvested, no recorded run)
whyNLP/LCKV/models/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from wuyou2002/YOCO-plus, is pointer only (licence: NONE) · get_code("92eac4dd828162e7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, whyNLP/LCKV when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

liger_rotary Not yet run
unverified (harvested, no recorded run)
whyNLP/LCKV/models/kernel.py
pointer only (licence: NONE); the stored copy get_code serves, from wuyou2002/YOCO-plus, is pointer only (licence: NONE) · get_code("daa55e6ce848f98f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, whyNLP/LCKV when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 5 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
prepare_ctrl_input 11 other papers
9 dated earlier, 2 later
1910.03771 (2019-10)
HuggingFace's Transformers: State-of-the-art Natural Language Processing
2009.14259 (2020-09)
Visually-Grounded Planning without Vision: Language Models Infer Detailed Plans from High-level Instructions
2106.06168 (2021-06)
Generate, Annotate, and Learn: NLP with Synthetic Text
and 8 more not named here
prepare_xlm_input 11 other papers
9 dated earlier, 2 later
1910.03771 (2019-10)
HuggingFace's Transformers: State-of-the-art Natural Language Processing
2009.14259 (2020-09)
Visually-Grounded Planning without Vision: Language Models Infer Detailed Plans from High-level Instructions
2106.06168 (2021-06)
Generate, Annotate, and Learn: NLP with Synthetic Text
and 8 more not named here
prepare_xlnet_input 8 other papers
6 dated earlier, 2 later
1910.03771 (2019-10)
HuggingFace's Transformers: State-of-the-art Natural Language Processing
2210.15097 (2022-10)
Contrastive Decoding: Open-ended Text Generation as Optimization
2305.01625 (2023-05)
Unlimiformer: Long-Range Transformers with Unlimited Length Input
and 5 more not named here
flash_attention_forward 1 other paper
1 later
2604.13556 (2026-04)
YOCO++: Enhancing YOCO with KV Residual Connections for Efficient LLM Inference
liger_rotary 1 other paper
1 later
2604.13556 (2026-04)
YOCO++: Enhancing YOCO with KV Residual Connections for Efficient LLM Inference

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recently, sharing key-value (KV) cache across layers has been found effective in efficient inference of large language models (LLMs). To systematically investigate different techniques of cross-layer KV sharing, we propose a unified framework that covers several recent methods and their novel variants. We conduct comprehensive experiments on all the configurations of the framework, evaluating their generation throughput and performance in language modeling and downstream tasks. We find that when reducing the size of the KV cache by 2$\times$, most configurations can achieve higher throughput than standard transformers while maintaining competitive performance. When further reducing the size of the KV cache, however, pairing queries of all layers with KVs of upper layers performs better, at the expense of additional training cost and prefilling latency. We hope that this work will help users make more informed choices of cross-layer KV sharing approaches and facilitate future research on efficient LLM inference.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2410.14442")
get_code_for_paper("2410.14442")
have("2410.14442")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2410.14442.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2410.14442.svg)](https://syntology.ai/paper/2410.14442)

Connect an agent — have() is free.