Papers › InfiniGen: Efficient Generative Inference of Large Language Models with Dynamic KV...

InfiniGen: Efficient Generative Inference of Large Language Models with Dynamic KV Cache Management

28 Jun 2024arXiv:2406.19707archive 2025-07-28

Wonbeom Lee, Jungi Lee, Junghwan Seo, Jaewoong Sim

Transformer-based large language models (LLMs) demonstrate impressive performance across various natural language processing tasks. Serving LLM inference for generating long contents, however, poses a challenge due to the enormous memory footprint of the transient state, known as the key-value (KV) cache, which scales with the sequence length and batch size. In this paper, we present InfiniGen, a novel KV cache management framework tailored for long-text generation, which synergistically works with modern offloading-based inference systems. InfiniGen leverages the key insight that a few important tokens that are essential for computing the subsequent attention layer in the Transformer can be speculated by performing a minimal rehearsal with the inputs of the current layer and part of the query weight and key cache of the subsequent layer. This allows us to prefetch only the essential KV cache entries (without fetching them all), thereby mitigating the fetch overhead from the host memory in offloading-based LLM serving systems. Our evaluation on several representative LLMs shows that InfiniGen improves the overall performance of a modern offloading-based system by up to 3.00x compared to prior KV cache management methods while offering substantially better model accuracy.

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="2406.19707")

Code

Syntology Ran 4 of 15 code samples harvested from 1 repository linked to this paper; 11 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 3 ran · fixture could not drive it.

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

snu-comparch/infinigen 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

15 samples harvested; 4 ran; 0 honoured the contract we drafted; 11 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.

1ran · our draft was wrong
3ran · fixture could not drive it
11unverified

Licence: 0 of the 15 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 snu-comparch/infinigen. “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.

repeat_kv snu-comparch/infinigen/accuracy/src/modeling_llama_orig.py community (archive-listed) ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 30d7eec482ebf6b1 · report
apply_rotary_pos_emb snu-comparch/infinigen/accuracy/src/modeling_llama_ours.py community (archive-listed) ran · fixture could not drive it Apache-2.0 (permissive) · 9b4dff79d5e6102c · report
apply_rotary_pos_emb snu-comparch/infinigen/accuracy/src/modeling_llama_orig.py community (archive-listed) ran · fixture could not drive it Apache-2.0 (permissive) · 37fc3129c3d06e0c · report
rotate_half snu-comparch/infinigen/accuracy/src/modeling_llama_orig.py community (archive-listed) ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · b99eea6376d1e212 · report
cut_indices snu-comparch/infinigen/speedup/flexgen/infinigen/pytorch_backend.py community (archive-listed) unverified Apache-2.0 (permissive) · 58fb93e90d4ca515 · report
get_choice snu-comparch/infinigen/speedup/flexgen/infinigen/flex_opt.py community (archive-listed) unverified Apache-2.0 (permissive) · 66b0a9c4c8b9fac3 · report
get_filename snu-comparch/infinigen/speedup/flexgen/infinigen/flex_opt.py community (archive-listed) unverified Apache-2.0 (permissive) · aa4fd60bcb4735f7 · report
partial_weight_index_generation snu-comparch/infinigen/speedup/infinigen/infinigen/partial_weight_generation_controller.py community (archive-listed) unverified Apache-2.0 (permissive) · 68b8c44fbdc6b0bd · report
reform_hidden_states snu-comparch/infinigen/speedup/infinigen/infinigen/skewing_controller.py community (archive-listed) unverified Apache-2.0 (permissive) · 60c756ef5ff6bb68 · report
select_kv snu-comparch/infinigen/speedup/infinigen/infinigen/kv_selection_controller.py community (archive-listed) unverified Apache-2.0 (permissive) · dc50e1d3317233bc · report
set_partial_cache snu-comparch/infinigen/speedup/infinigen/infinigen/partial_weight_generation_controller.py community (archive-listed) unverified Apache-2.0 (permissive) · c48042fd1baff5fa · report
set_partial_weight snu-comparch/infinigen/speedup/infinigen/infinigen/partial_weight_generation_controller.py community (archive-listed) unverified Apache-2.0 (permissive) · 8bd8cf4ddbf1f17b · report
skew snu-comparch/infinigen/speedup/infinigen/infinigen/skewing_controller.py community (archive-listed) unverified Apache-2.0 (permissive) · 7523546807dfeacd · report
speculate_attention snu-comparch/infinigen/speedup/infinigen/infinigen/kv_selection_controller.py community (archive-listed) unverified Apache-2.0 (permissive) · 9e45f95449a51acf · report
weight_bias_concat snu-comparch/infinigen/speedup/infinigen/infinigen/skewing_controller.py community (archive-listed) unverified Apache-2.0 (permissive) · 65c813943048c026 · report

Tasks

ManagementText Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

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