CompilerKV: Risk-Adaptive KV Cache Compression via Offline Experience Compilation
Ning Yang, Chengzhi Wang, Yibo Liu, Baoliang Tian, Haijun Zhang
NeurIPS 2026
Abstract. Prefill-only KV compression freezes a token subset at the end of prefill and decodes from it without further eviction. The retention decision is therefore irreversible, yet existing methods estimate the corrective signals it relies on, per-head reliability and prompt-level compression sensitivity, online from a single noisy prompt. We argue this is the wrong statistical unit: these signals exhibit far higher cross-prompt regularity than within-prompt signal-to-noise. We introduce CompilerKV, a KV-retention policy whose corrective tables are compiled offline from a calibration corpus, reducing online correction after the standard observation-window scan to lookups plus a budget clamp. We find that compiled retention tables behave as portable architectural priors: rankings transfer across disjoint corpora on four backbones (mean Spearman ), and direct model-to-model table transfer costs only -- LongBench points on average. At a 512-token budget, CompilerKV attains compressed-SOTA on all four backbones, improving over the strongest prefill-only baseline by points on average (task-bootstrap 95% CI ). Pressure regimes amplify the gap: under a fixed cache ratio, \textsc{CompilerKV} remains the strongest compressed method through 128k RULER ( vs. FullKV , SnapKV ); on 32k NIAH it reaches vs. SnapKV ; and at 32k input, retaining only of the prefill KV, batch-16 serving remains feasible where FullKV is OOM. Code is available at https://github.com/Chengzhi-W/CompilerKV.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:45 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
This paper proposes CompilerKV, which moves the estimation of head reliability and prompt-level compression risk in prefill-only KV-cache compression from online estimation on individual prompts to offline compilation. The reviewers recognize the clear motivation, coherent design, and strong results under tight KV budgets.
The rebuttal substantially addressed the main technical and empirical questions by clarifying GQA head granularity, reporting compilation costs at 8B and 72B scale, and adding Qwen3-8B results, calibration analyses, a DuoAttention comparison, and a functional SGLang integration. The main remaining concerns are the incremental nature of the contribution and the scope of validation. DuoAttention already uses offline data for head-level decisions, while CompilerKV's primary advance is to compile richer corrective statistics and apply them under a more aggressive fixed-budget setting. Because the added comparison evaluates the two methods in substantially different operating regimes, it is better interpreted as an extreme-compression stress test and does not yet establish a general advantage over this predecessor. Moreover, the large-model results mainly characterize compilation cost rather than downstream effectiveness.
All three final assessments are Borderline Accept, reflecting that the paper is technically solid. Although the incremental nature of the contribution and the validation scope remain limited (the DuoAttention comparison is better interpreted as an extreme-compression stress test, and the large-model results mainly characterize compilation cost), the cross-prompt reframing is clean and falsifiable, offline compilation brings practical deployment benefits, and the remaining limitations are not technical flaws. In line with the positive consensus of all three reviewers, I recommend Accept, expecting the camera-ready to incorporate the rebuttal's new results and further clarify the method's positioning.
Final justification
The updated justification has been included.
- Final justification
- The updated justification has been included.
Read meta-review
Meta-review
This paper proposes CompilerKV, which moves the estimation of head reliability and prompt-level compression risk in prefill-only KV-cache compression from online estimation on individual prompts to offline compilation. The reviewers recognize the clear motivation, coherent design, and strong results under tight KV budgets.
The rebuttal substantially addressed the main technical and empirical questions by clarifying GQA head granularity, reporting compilation costs at 8B and 72B scale, and adding Qwen3-8B results, calibration analyses, a DuoAttention comparison, and a functional SGLang integration. The main remaining concerns are the incremental nature of the contribution and the scope of validation. DuoAttention already uses offline data for head-level decisions, while CompilerKV's primary advance is to compile richer corrective statistics and apply them under a more aggressive fixed-budget setting. Because the added comparison evaluates the two methods in substantially different operating regimes, it is better interpreted as an extreme-compression stress test and does not yet establish a general advantage over this predecessor. Moreover, the large-model results mainly characterize compilation cost rather than downstream effectiveness.
All three final assessments are Borderline Accept, reflecting that the paper is technically solid. Although the incremental nature of the contribution and the validation scope remain limited (the DuoAttention comparison is better interpreted as an extreme-compression stress test, and the large-model results mainly characterize compilation cost), the cross-prompt reframing is clean and falsifiable, offline compilation brings practical deployment benefits, and the remaining limitations are not technical flaws. In line with the positive consensus of all three reviewers, I recommend Accept, expecting the camera-ready to incorporate the rebuttal's new results and further clarify the method's positioning.
- Rating
- 4/6
- Confidence
- 2/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The authors propos CompilerKV, an offline-compiled policy for prefill-only KV-cache compression. The central motivation is that prefill-only retention decisions are irreversible, while existing methods estimate token importance, head reliability, and prompt sensitivity from noisy statistics of a single prompt. CompilerKV instead estimates reusable priors from a held-out calibration corpus. The method consists of three components: (1) a window-aggregated, value-norm-normalized token utility; (2) an offline-compiled table of continuous per-head reliability weights; and (3) a risk-adaptive threshold table indexed by attention entropy and local perplexity.
Strengths and weaknesses
Strengths:
-
Treating head reliability and prompt-compression risk as cross-prompt quantities is an interesting and practically relevant perspective. It directly addresses the irreversibility of prefill-only compression.
-
Good component-level ablations. Removing stabilized utility, head reliability, or the risk gate produces consistent degradation. The comparison between independent and coupled compilation also helps support the proposed design.
Questions
-
Offline compilation cost is missing. Compiling per-head weights by marginally perturbing each head, alternating the two tables, and evaluating continuation losses could require a very large number of model executions over 50K prompts. The paper reports inference efficiency but not compilation GPU hours, number of reward evaluations, convergence criteria, or storage cost. These quantities are necessary to judge whether “compile once” is practically viable.
-
It would be better to label CompilerKV as "Ours" in Figure 3.
Limitations
see questions
Formatting concerns
None
2 comments
Dear Reviewer wk2F, Thank you once again for your valuable comments on our submission. As the discussion phase is approaching its end, we would like to kindly confirm whether we have sufficiently addressed all of your concerns. Should there be any remaining questions requiring further clarification, please do not hesitate to let us know. If you are satisfied with our responses, we would greatly appreciate your consideration in adjusting the evaluation scores accordingly.
We sincerely look forward to your feedback.
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 2/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper studies prefill-only KV cache compression, where a token subset is frozen once at the end of prefill with no decode-time eviction. The central thesis: existing online selectors (SnapKV, PyramidKV, AdaKV, HeadKV, CAKE, ChunkKV) estimate the two corrective signals for this irreversible decision — per-head reliability and prompt-level compression sensitivity — from a single noisy prompt, which is the wrong statistical unit, since these signals show far higher cross-prompt regularity than within-prompt SNR.
CompilerKV therefore compiles the corrective signals into static tables offline, reducing online correction (after the standard observation-window scan) to O(1) lookups plus a budget clamp. Three components map one-to-one to three error sources: a parameter-free stabilized utility (E1), an offline-compiled Head Heterogeneity Table via CQL with weighted max-pool veto power (E2), and a Risk-Adaptive Threshold LUT mapping (attention entropy, local perplexity) to a retention threshold (E3). Headline results: cross-corpus head rankings transfer (mean Spearman ρ≈0.90); model-to-model transfer costs only 0.4–0.8 LongBench points; at a 512-token budget it is compressed-SOTA on four backbones (+1.67 avg, 95% CI [+1.08, +2.37]); gains amplify under pressure (128k RULER, 32k NIAH, batch-16 serving where FullKV is OOM).
Strengths and weaknesses
- Strengths
- A clean, falsifiable reframing. Moving the statistical unit from within-prompt to cross-prompt is a crisp argument, and Figure 1 grounds E1–E3 in observable phenomena.
- Components map to E1–E3 and are coupled, not merely stacked. The independent-vs-joint compilation probe (0.85–1.00 pt gap, Table 2) supports calibrating the head table and the gate under the same retention operator.
- Weaknesses
- Head granularity under GQA is unclear (key technical issue). All four backbones use GQA: attention A is per query head, while value norms ρ and the KV cache are per KV head. Does
Whead[l,h](and the max-pool) index query or KV heads? - Main-table baseline fairness. DuoAttention and KVzip also use offline data but appear only in the external Table A1 (different protocols). Since DuoAttention is the closest conceptual predecessor, a head-to-head under the controlled protocol would solidify the "first fully offline-compiled retention policy" novelty claim.
Questions
- Given the horizon-1 setting, is "penalized regression" not the more honest label? Does the CQL framing buy anything beyond the α penalty?
- How sensitive is downstream performance to the Dcal mixture?
Limitations
§6 and the checklist candidly discuss per-model compilation cost, untested cross-architecture sharing, and deferred streaming/multi-turn updates — a good-faith treatment.
Final justification
I maintain my post-rebuttal score of 4 (Borderline Accept). The rebuttal resolved my main technical concerns: the GQA head-granularity issue was clarified, the DuoAttention comparison was added under a controlled stress-test setting, and the authors gave a more honest interpretation of the horizon-1 CQL formulation as conservative regularized reward regression, supported by an alpha sweep. Some limitations remain, especially incomplete calibration-mixture sensitivity analysis and the need to integrate the new rebuttal results and clarifications into the paper. Overall, I assign more weight to the clean problem reframing, coupled component design, strong compressed-budget results, and constructive rebuttal than to the remaining limitations, but these limitations prevent me from recommending a stronger score.
Formatting concerns
None
3 comments
Rebuttal
We thank the reviewer for the careful technical reading. In particular, the GQA question exposed an ambiguity in our notation that is important for understanding E2, and we appreciate the opportunity to clarify it.
R2-W1: Head granularity under GQA
The reviewer's distinction between query-head attention statistics and KV-head cache states is exactly the right one.
In our implementation, the reliability weight is indexed by the query head.
For each query head , let denote its associated KV head under GQA. The value-norm component is computed from KV head , while the attention distribution and reliability weight remain query-head specific.
Thus, within a GQA group:
- query heads have distinct attention patterns;
- query heads have distinct ;
- they share the corresponding KV-head value statistic;
- no KV states are duplicated.
The weighted max-pool is then performed over query heads to construct a layer-level token score, after which a single retained set is used to gather the physical KV cache.
This granularity is important to E2. If reliability were first averaged at KV-head granularity, a retrieval-critical query head could be suppressed by other query heads sharing the same KV head. The max-pool is deliberately designed so that one highly reliable retrieval head can override such averaging and preserve the token.
We agree that the current notation does not make this distinction sufficiently clear, and will revise Eqs. (4)–(6) to explicitly introduce , , and .
R2-W2: Controlled comparison with DuoAttention
We agree that DuoAttention is the closest conceptual predecessor and that a controlled comparison helps clarify the distinction.
Under our Qwen3-8B, 512-token LongBench protocol:
| Method | LongBench Avg. |
|---|---|
| DuoAttention | 39.70 |
| COMPILERKV | 49.67 |
The two operating regimes differ by more than an order of magnitude. DuoAttention's own experiments are run at KV budgets of roughly 25–50% of the full cache: retrieval heads keep full attention while streaming heads keep a sink-plus-recent window, so the retained budget grows with context length. Our protocol fixes an absolute budget of 512 entries regardless of prompt length — on a 32K input that is under 2% of the cache, i.e. more than 10× more aggressive than the setting DuoAttention was designed and evaluated for. We therefore read 39.70 as DuoAttention operating far outside its intended regime, not as a general ranking, and will say so explicitly rather than let the gap stand unqualified.
We chose this regime deliberately because it is where retention policies actually separate. Our Qwen3-8B sweep (R1-W1) shows that at loose budgets prefill-only methods converge: at 2,048 tokens the best compressed baseline reaches 49.33 versus FullKV's 49.46. Only once the budget is tight enough that the great majority of tokens must be discarded do the differences become visible — and that is precisely the regime in which an irreversible prefill-time decision is most costly, and which COMPILERKV is built for.
Conceptually, the offline objects differ:
- DuoAttention: binary offline head typing, ;
- COMPILERKV: continuous head reliability combined with a prompt-risk-conditioned retention threshold, ultimately producing .
The stress-test result supports the motivation for the latter: under very tight budgets, deciding which tokens survive — and adapting that decision to prompt compression risk — matters beyond determining which heads require long-range access.
We will add DuoAttention to the controlled discussion and qualify the operating-regime difference explicitly.
R2-Q1: Horizon-1 CQL versus penalized regression
This is a fair characterization.
Because our decision problem has horizon 1, there is no temporal bootstrapping. What we inherit from CQL is the conservative support penalty applied to offline reward estimation, not sequential value learning. To make this clearer, we will describe the estimator as CQL-regularized offline reward regression and explicitly state that it is the horizon-1 specialization.
We additionally ran a sweep over the conservative weight :
| LongBench Avg. | |
|---|---|
| 0 (plain reward regression) | 41.88 |
| 0.25 | 42.10 |
| 0.50 | 42.40 |
| 0.75 (main setting) | 42.55 |
| 1.00 | 42.50 |
| 1.50 | 42.30 |
| 2.00 | 41.70 |
Compared with plain reward regression (), conservative regularization improves the peak result by 0.67 points. The broad plateau over approximately suggests the result is not driven by precise tuning of . At the same time, the sweep confirms that the conservative term is useful but should not be overstated as introducing a sequential-RL mechanism that is absent in the horizon-1 setting.
R2-Q2: Sensitivity to the calibration-corpus mixture
Our existing cross-corpus experiment provides evidence for robustness to substantial domain changes, but we agree that it is not a complete mixture-sensitivity study.
Specifically, independently compiling the head table on:
- arXiv + PubMed (scientific text), and
- ShareGPT + UltraChat (conversational text)
produces per-head reliability rankings with Spearman correlation of approximately 0.89–0.91 across the evaluated backbones. This suggests the compiled head ordering is not tied to one specific calibration domain.
However, we have not exhaustively varied mixture ratios or evaluated deliberately extreme compositions such as all-code or all-narrative calibration sets. We will distinguish the two claims more carefully in the revision: the current evidence supports scientific-to-conversational cross-domain stability, but not invariance to arbitrary calibration mixtures.
The stratification over entropy/perplexity bins is intended to ensure coverage of rare high-risk states, but we agree that this design choice does not substitute for an empirical mixture sweep.
Dear Reviewer f1YY, Thank you once again for your valuable comments on our submission. As the discussion phase is approaching its end, we would like to kindly confirm whether we have sufficiently addressed all of your concerns. Should there be any remaining questions requiring further clarification, please do not hesitate to let us know. If you are satisfied with our responses, we would greatly appreciate your consideration in adjusting the evaluation scores accordingly.
We sincerely look forward to your feedback.
Kudos to the authors for providing the requested results in such a short period of time. I will maintain my post-rebuttal updated score of 4.
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 2/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper proposes COMPILERKV, a KV-cache compression method for long-context LLM inference that shifts key retention decisions from online estimation to offline compilation. Instead of estimating token importance, head reliability, and prompt sensitivity for each input separately, the method learns reusable head-reliability tables and risk-adaptive threshold lookup tables from a large calibration corpus. During inference, it uses lightweight O(1) lookups to guide token retention under a fixed KV budget. Experiments on four LLM backbones and multiple long-context benchmarks show that COMPILERKV consistently outperforms prior prefill-only KV compression methods, especially under long contexts and tight memory budgets. It achieves higher accuracy, better retrieval performance, and significant memory savings while providing decoding speedup and enabling larger serving batch sizes.
Strengths and weaknesses
Strengths
- The problem is important and well-motivated. The paper addresses a key challenge in prefill-only KV cache compression: token selection is performed only once and discarded tokens cannot be recovered. The authors identify that existing methods rely heavily on online statistics from a single prompt, making them susceptible to noise, head heterogeneity, and variations in prompt difficulty. This is a practically important problem with clear real-world relevance.
- The method is novel. COMPILERKV shifts part of the KV retention decision process to an offline compilation stage. By combining stabilized token utility estimation, a head reliability table, and a risk-adaptive threshold gate, it establishes a framework that integrates offline-compiled priors with lightweight online lookup, distinguishing it from existing online estimation approaches.
- The method is effective and deployment-friendly. During inference, the approach mainly relies on O(1) table lookups and budget-constrained operations, without introducing complex decode-time procedures. This makes it attractive for practical deployment, especially in long-context and tight-budget scenarios.
- The experimental evaluation is comprehensive. The paper evaluates the method on LongBench across multiple backbone models and compares it against a diverse set of prefill-only baselines. Additional experiments on RULER, Needle-in-a-Haystack, batching scalability, and varying KV budgets provide a thorough empirical assessment.
- The ablation studies are convincing. Removing individual components consistently leads to noticeable performance degradation, supporting the effectiveness of the proposed design. Furthermore, cross-corpus and cross-model table transfer experiments strengthen the credibility of the central claim that compiled priors can generalize across different settings.
Weaknesses
- The evaluated models are relatively outdated. Models such as LLaMA-3, Qwen2, Mistral, and InternLM-2.5 are from 2023–2024. The authors should evaluate more advanced models, including Qwen3/3.5, Gemma 3, and the LLaMA 3.2 series. Evaluating these newer models would provide a more comprehensive assessment of CONF-KV; otherwise, the current evaluation does not demonstrate whether COMPILERKV can outperform SOTA methods on these advanced models. Furthermore, the evaluated models are only in the 7B–8B parameter range, and experiments on larger-scale models (e.g., 72B models) are missing.
- The paper claims negligible online overhead through offline-compiled lookup tables, but the actual cost of the offline compilation phase is not reported. Since the method requires CQL-based optimization over a 50K-prompt calibration corpus, it is unclear how much compute, time, and GPU resources are needed to build the head-reliability and risk-gating tables. An analysis of compilation cost and amortization would help assess the practical deployment trade-off.
- The memory usage and decoding speed are only compared with FullKV, but there is a lack of direct efficiency comparisons with other KV cache eviction methods, such as SnapKV, PyramidKV, and HeadKV.
- COMPILERKV is not integrated with modern serving systems (e.g., vLLM or SGLang), both of which are widely used inference engines for LLM deployment. Due to the lack of such experiments, it remains unclear whether COMPILERKV can also provide inference acceleration in these deployment frameworks.
- The paper uses a relatively large calibration corpus (50K prompts), but does not provide a sensitivity analysis on the calibration data size. It would be valuable to evaluate whether the compiled tables remain effective with fewer calibration prompts, and how performance scales with calibration data quantity.
- The experimental results presented in the main paper are limited, while many additional results are only provided in the appendix. The authors are encouraged to move some of the important experimental results from the appendix to the main paper to make the evaluation more complete and easier to assess.
Questions
- What is the actual computational cost of the offline compilation stage? For example, for a 7B/8B model, how many GPU hours are required to compile the head table and risk gate, respectively? Additionally, what is the computational cost for larger models such as 72B-parameter models? Would these models require a significant amount of computational resources?
- How sensitive is the final performance to the size of the calibration corpus? If only 1K, 5K, or 10K prompts are used, how much would the performance degrade?
- The results of cross-model table transfer are very interesting. However, how is the table aligned across different architectures, tokenizers, and different numbers of layers/heads? Are there any failure cases?
Limitations
Yes, the authors explicitly address the paper's limitations in Section 6. These limitations include the method's reliance on an offline compilation phase to construct reliability and risk lookup tables, which introduces additional preprocessing overhead and may constrain system robustness in the face of significant data distribution shifts. Furthermore, the current design is tailored for KV compression during the prefill phase and does not naturally support dynamic cache management, streaming inputs, or evolving multi-turn conversation scenarios.
Final justification
The authors have adequately addressed my main concerns with substantial new analyses and experiments. The newly reported offline compilation costs for both 8B and 72B models clarify the practical computational overhead and its scaling behavior. The additional Qwen3-8B results strengthen the evaluation on more recent models, while the calibration-size analysis and architecture-transfer discussion clarify the method’s robustness and current limitations. The authors also provide a more precise efficiency comparison and demonstrate functional compatibility with SGLang, which alleviates my concerns regarding practical deployment. Overall, the rebuttal and additional results substantially increase my confidence in the effectiveness, generalizability, and practical value of CompilerKV. I have no remaining major concerns and therefore raise my score to support acceptance at NeurIPS.
Formatting concerns
No formatting issues were found.
3 comments
Rebuttal
We thank the reviewer for the detailed and constructive comments, which examine both the methodological contributions and the practical deployment considerations. We address each point below and have run additional experiments in response.
R1-W2 / Q1: Offline compilation cost
COMPILERKV adds an offline compilation stage on top of standard inference, so we measured the complete pipeline stage-wise.
For LLaMA-3-8B on A100-80GB, compilation requires approximately 20 GPU-hours:
| Stage | Updates | Compute |
|---|---|---|
| E1 Stabilized Utility | 0 | No training |
| Shared calibration statistics | — | 15 GPU-h |
| E2 Head Table | ≈1,000 steps | 3 h reward generation + 0.4 h fitting |
| E3 Risk LUT | ≈1,000 steps | 1.5 h reward generation + 0.3 h fitting |
| Coupled refinement | included above | — |
| Total | ≈2,000 updates | ≈20 GPU-h |
The dominant term is calibration-statistics collection (~15 GPU-h), consisting entirely of frozen-LLM forward computation; no backbone parameters are updated. The optimization itself is lightweight: E2 and E3 together require ≈2,000 table updates, of which fitting accounts for only 0.7 GPU-h, with 4.5 GPU-h spent generating continuation-loss rewards. The 50K calibration prompts are processed once to extract the attention, value-norm, entropy, and perplexity statistics both components need; full prefill is not repeated at every table update.
Scaling to a larger backbone. During the rebuttal period we ran the full compilation on a 72B-class backbone, replacing our earlier extrapolation with measurements:
| Stage | Updates | Compute |
|---|---|---|
| E1 Stabilized Utility | 0 | No training |
| Shared calibration statistics | — | 126 GPU-h |
| E2 + E3 reward generation | — | 40 GPU-h |
| E2 + E3 table fitting | — | ≈3 GPU-h |
| Total | ≈4,100 updates | ≈169 GPU-h |
Three points follow. First, the cost structure is scale-invariant: frozen-LLM forward computation accounts for 166 of 169 GPU-h (>98%), matching the 96.5% observed at 8B, and fitting the compiled objects still costs ≈3 GPU-h. Second, cost tracks backbone forward cost, not table complexity: the 8.45× increase from 20 to 169 GPU-h sits slightly below the 9× parameter ratio. Third, convergence is slower but bounded: the alternating optimization stabilizes after ≈4,100 updates at 72B versus ≈2,000 at 8B, and we report this ≈2× growth explicitly rather than presenting the update count as a constant.
The compiled objects remain lightweight at any scale, since their size depends on layer and head counts rather than parameter count. We will add both scales and the convergence data to the revision.
R1-W1: Evaluation on newer models
This is a valuable suggestion. We added a full Qwen3-8B LongBench budget sweep:
| KV Budget | FullKV | Best compressed baseline | COMPILERKV |
|---|---|---|---|
| 128 | 49.46 | 47.46 | 48.32 |
| 512 | 49.46 | 48.93 | 49.67 |
| 1024 | 49.46 | 49.04 | 49.84 |
| 2048 | 49.46 | 49.33 | 49.91 |
COMPILERKV preserves FullKV-level quality across aggressive budgets and is the strongest compressed method at every budget we evaluate.
We observe small improvements over FullKV at several budgets, but prefer to be conservative: the results establish that aggressive compression does not degrade downstream quality here, while we lack the mechanistic evidence to attribute the excess over FullKV to a specific effect, so we report it as an empirical observation.
We also agree LookaheadKV is an important recent baseline and will add it to Related Work.
R1-W3: Efficiency comparison
We agree that the efficiency discussion should situate COMPILERKV more directly among peer KV-compression methods.
HeadKV provides a useful controlled systems comparison among FullKV, SnapKV, PyramidKV, Ada-SnapKV, and HeadKV (Mistral-7B-Instruct with FlashAttention, their Figure 6). At 32K input, all four compressed methods track one another closely at every generation length, and at 4,096 generated tokens they reach roughly 2.2× lower latency than FullKV (~150 s vs. ~333 s). Peak memory behaves the same way: at 128K context, FullKV requires ~64 GB while the compressed methods sit at ~39–40 GB.
Our own measurements fall in the same systems regime:
- 8K input + 2K output: 1.27× latency speedup;
- 16K input + 4K output: 1.77×;
- 32K input + 8K output: 2.48×, with throughput rising from 11.65 to 28.50 tokens/s (2.45×).
This lets us state the claim more precisely. Once prefill-only methods retain a comparable physical KV budget, decode-stage memory and latency are governed by the remaining cache size, so COMPILERKV does not claim a unique decode-time speed advantage over SnapKV, PyramidKV, or HeadKV at the same budget. Its advantage is the accuracy–efficiency trade-off: the same systems benefits, with stronger downstream quality at the same retained budget. We will clarify this in the revision.
R1-W4: Integration with vLLM / SGLang
We agree the decisive question is not only whether COMPILERKV runs inside a production engine, but whether it delivers acceleration there. We have implemented a functional SGLang integration:
Prefill → COMPILERKV one-shot compression → KV-slot remapping → Decode over compressed KV
Compression fires once, at the prefill/decode boundary, leaving the decode policy unchanged: after computing the retained sets , the implementation allocates compressed KV blocks, copies each layer's selected K/V states in, and returns the original blocks to the paged allocator. The key detail is decoupling logical sequence position from physical KV length; for a 32K prompt compressed to 512 entries:
logical_seq_len = 32768
kv_prefix_len = 512
The next query keeps its correct positional encoding while attention scans only 512 entries.
(b) Why the benefit should transfer. After the one-shot remap, the engine's block manager and attention kernels see a sequence whose physical KV length is the retained budget — the same quantity that already governs decode cost in a paged engine. Two properties suit this setting: the retention decision is made once per request rather than requiring per-step block bookkeeping as in token-level dynamic eviction; and because retention is prefill-only and prompt-conditioned, the compressed cache is a deterministic function of the prompt, so it remains in principle a legitimate reusable prefix at a fraction of the uncompressed size. We have not implemented the latter, but note that it suggests compression composes with prefix caching rather than competing with it.
(c) Current status. The speedups in R1-W3 (up to 2.48× latency and 2.45× throughput at 32K + 8K) were measured in our own runtime. The SGLang integration is at present correctness-oriented — Radix Cache, chunked prefill, and CUDA Graph are disabled — so we present it as evidence of functional compatibility with paged KV management rather than a tuned throughput result. Since disabling CUDA Graph penalizes exactly the decode stage where our advantage is realized, figures from this configuration would be a conservative lower bound. A like-for-like in-engine study is in progress and we will report it in the revision rather than assert it here. We have not yet integrated with vLLM, but this requires only a hook at prefill completion, block-level gather-and-free, and position/length decoupling, all already exposed by its block manager; we do not expect an engine-specific obstacle.
R1-W5 / Q2: Calibration-size sensitivity
We measured the stability of the compiled head-reliability table as the calibration corpus is reduced. The table reports Spearman against the ranking compiled from all 50K prompts:
| size | Spearman vs. 50K |
|---|---|
| 1K | 0.61 |
| 5K | 0.74 |
| 10K | 0.82 |
| 25K | 0.88 |
| 50K | 1.00 |
The 50K corpus is therefore not simply conservative over-provisioning: reducing it to 10K yields , whereas independently compiling on compositionally different 50K corpora gives (§C.3) — a 5× size reduction perturbs the ranking more than a domain change at full size. We would not recommend shrinking the calibration set without downstream validation.
We emphasize that this measures table-ranking stability, not LongBench performance; a downstream size sweep is a useful follow-up, and we prefer not to infer degradation purely from rank correlation.
R1-W6 / Q3: Architecture alignment and transfer
The compiled tables are not aligned through token identities: the head table is indexed by and the risk LUT by , with the monotonic relative-depth mapping of §C.7 handling differing model depths. Token identities do not enter table lookup, though different tokenizers can shift the distribution of quantities such as local perplexity, and we agree this should be stated more carefully.
Our transfer experiments cover 7B–8B backbones with broadly comparable structures. We have not established reliable transfer across substantially different head counts, MQA versus GQA, different GQA group sizes, or hybrid recurrent/full-attention architectures, and will state these boundaries explicitly in §C.4.
R1-W7: Main-text organization
We appreciate this suggestion. The revision will move Table A3 (pressure regimes) and Table A5 (model-to-model transfer) into the main experimental discussion and add the new compilation-cost (8B and 72B), calibration-size, and Qwen3-8B results, compressing less central discussion in §5 to keep the paper focused.
Dear Reviewer WEes, Thank you once again for your valuable comments on our submission. As the discussion phase is approaching its end, we would like to kindly confirm whether we have sufficiently addressed all of your concerns. Should there be any remaining questions requiring further clarification, please do not hesitate to let us know. If you are satisfied with our responses, we would greatly appreciate your consideration in adjusting the evaluation scores accordingly.
We sincerely look forward to your feedback.
Thank you for the authors’ response. The authors have adequately addressed my concerns. The additional experimental results effectively alleviate my doubts about the effectiveness of the proposed method and strengthen my confidence in this work. I have no further concerns. Therefore, I have raised my score and support the acceptance of this paper at NeurIPS. I recommend incorporating the experimental results added during the rebuttal period into the camera-ready version. Good luck!
Comments on the paper
1 comment
Hi Reviewers,
Could you please check whether the authors' rebuttal has addressed your concerns? Thank you!
Best wishes,
AC
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Rebuttal
We thank the reviewer for highlighting the practical cost of the offline stage. Since "compile once" is central to our deployment argument, quantifying this cost is essential, and we have now measured it at both 8B and 72B scale.
R3-Q1: Offline compilation cost, convergence, and storage
For LLaMA-3-8B on A100-80GB, the complete compilation pipeline requires approximately 20 GPU-hours:
The reviewer's concern about repeatedly executing the model over 50K prompts is well taken, but the implementation avoids doing so for every table update. The calibration corpus is processed once to collect attention, value-norm, entropy, and perplexity statistics, which E2 and E3 then reuse. Additional frozen-model computation is required for continuation-loss reward generation, but full prefill over all 50K prompts is not repeated for each candidate update. Overall, the vast majority of the measured compute is frozen-model forward/reward computation; fitting the two compiled objects takes only 0.7 GPU-h.
Larger backbones. Rather than rely on extrapolation, we ran the full pipeline on a 72B-class backbone during the rebuttal period:
The measured 8.45× increase over the 8B pipeline is slightly below the 9× parameter ratio, confirming that compilation cost tracks backbone forward cost. Notably, the fitting cost remains negligible (≈3 GPU-h, under 2% of the total) even at 72B: what scales is the frozen-LLM forward pass over the calibration corpus, not the compilation machinery itself.
Convergence. The alternating optimization stabilizes after approximately 2,000 table updates at 8B (roughly 1,000 for E2 and 1,000 for E3, including coupled refinement) and approximately 4,100 updates at 72B. We report this growth explicitly rather than treating the update budget as scale-independent.
Amortization. Compilation is a one-time cost paid before serving. Using our measured 2.45× decode throughput gain at 32K + 8K, a compilation cost of 169 GPU-h is recovered after roughly a few hundred GPU-hours of serving on the same backbone — on the order of days rather than months for a continuously served deployment. We state this as an order-of-magnitude argument, since the exact break-even depends on the workload's context-length distribution.
Storage. The compiled artifacts are very small. For the 32-layer configuration, the risk table contains only 32×20×4=2560 entries, and the head table is similarly small; together they occupy less than 100 KB. At 72B the artifacts grow only with layer and head counts and remain in the same order of magnitude (well under 1 MB), since the table size is independent of parameter count.
We will add the stage-wise GPU-hour measurements at both scales, the convergence information, and the storage footprint to the revision.
R3-Q2: Figure 3 labeling
Thank you for catching this presentation issue. We will relabel COMPILERKV as "Ours" in Figure 3 for consistency with the other figures.