H$_2$O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
The DOI matches its DataCite record; 2 of the 2 references it cites were found in a registry or an index.
Abstract
Large Language Models (LLMs), despite their recent impressive accomplishments, are notably cost-prohibitive to deploy, particularly for applications involving long-content generation, such as dialogue systems and story writing. Often, a large amount of transient state information, referred to as the KV cache, is stored in GPU memory in addition to model parameters, scaling linearly with the sequence length and batch size. In this paper, we introduce a novel approach for implementing the KV cache which significantly reduces its memory footprint. Our approach is based on the noteworthy observation that a small portion of tokens contributes most of the value when computing attention scores. We call these tokens Heavy Hitters (H$_2$). Through a comprehensive investigation, we find that (i) the emergence of H$_2$ is natural and strongly correlates with the frequent co-occurrence of tokens in the text, and (ii) removing them results in significant performance degradation. Based on these insights, we propose Heavy Hitter Oracle (H$_2$O), a KV cache eviction policy that dynamically retains a balance of recent and H$_2$ tokens. We formulate the KV cache eviction as a dynamic submodular problem and prove (under mild assumptions) a theoretical guarantee for our novel eviction algorithm which could help guide future work. We validate the accuracy of our algorithm with OPT, LLaMA, and GPT-NeoX across a wide range of tasks. Our implementation of H$_2$O with 20% heavy hitters improves the throughput over three leading inference systems DeepSpeed Zero-Inference, Hugging Face Accelerate, and FlexGen by up to 29$\times$, 29$\times$, and 3$\times$ on OPT-6.7B and OPT-30B. With the same batch size, H2O can reduce the latency by up to 1.9$\times$. The code is available at https://github.com/FMInference/H2O.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“Existing context-compression methods often use distillation to produce an offline prompt, memory, or compressed KV representation before generation [7, 28, 53, 32, 19, 34, 56, 30, 31].”
From Learning What to Remember: Test-Time Training via Context Distillation (2026) · cites this paper as [56]
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Rethinking Attention with Performers
Choromanski, K., Likhosherstov, V., Dohan, D., Song, X., Gane, A., Sarlos, T., Hawkins, P., Davis, J., Mohiuddin, A., Kaiser, L., et al. (2020) · arXiv · doi:10.48550/arxiv.2009.14794 · Cited by 695 · cited 3×
“First, most existing methods, e.g., Reformer (Kitaev et al., 2020), Flash Attention (Dao et al., 2022), and Performer (Choromanski et al., 2020), are designed to overcome the quadratic memory required by attention mechanisms when modeling long sequences but still require a large cache size .”
BLOOM: A 176B-Parameter Open-Access Multilingual Language Model
Workshop, B., :, Scao, T. L., Fan, A., Akiki, C., Pavlick, E., Ilić, S., Hesslow, D., Castagné, R., Luccioni, A. S., et al. (2022) · arXiv · doi:10.48550/arxiv.2211.05100 · cited 2×
“To overcome this limitation, previous efforts have employed model compression techniques with specific designs to achieve efficient LLM inference, such as the method described in (Frantar & Alistarh, 2023), which employs one-shot pruning on LLMs (e.g., OPT-175 B and BLOOM-176 B), resulting in negligible performance de…”
Cited by
Personal LLM Agents: Insights and Survey about the Capability, Efficiency and Security
Li, Y., Wen, H., Wang, W., Li, X., Yuan, Y., Liu, G., Liu, J., Xu, W., Wang, X., Sun, Y., et al. (2024) · arXiv · doi:10.48550/arxiv.2401.05459 · Cited by 43
MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention
Jiang, H., Li, Y., Zhang, C., Wu, Q., Luo, X., Ahn, S., Han, Z., Abdi, A. H., Li, D., Lin, C.-Y., et al. (2024) · arXiv · doi:10.48550/arxiv.2407.02490 · Cited by 36
“Language Modeling Following the approach of StreamingLLM [XTC + 24] and H2O [ZSZ + 24], we evaluate our methods against baselines on the language modeling task based on the PG-19 dataset [RPJ + 20].”
Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs
Ge, S., Zhang, Y., Liu, L., Zhang, M., Han, J., & Gao, J. (2023) · arXiv · doi:10.48550/arxiv.2310.01801 · Cited by 13
“It is worth mentioning that C local+frequent is a very strong baseline as it is identical to the H 2 O method (Zhang et al., 2023) and the Scissorhands method (Liu et al., 2023a).”
BackgroundMethodInfluentialSnapKV: LLM Knows What You are Looking for Before Generation
Li, Y., Huang, Y., Yang, B., Venkitesh, B., Locatelli, A., Ye, H., Cai, T., Lewis, P., & Chen, D. (2024) · arXiv · doi:10.48550/arxiv.2404.14469 · Cited by 74
“This variability challenges the effectiveness of static compression methods that depend on constant weighted importance or fixed policies [7, 6, 8].”
BackgroundKVLink: Accelerating Large Language Models via Efficient KV Cache Reuse
Yang, J., Hou, B., Wei, W., Bao, Y., & Chang, S. (2025) · arXiv · doi:10.48550/arxiv.2502.16002 · Cited by 5
“For instance, [54–57] introduces an eviction policy that significantly lowers the memory footprint during generation, while [58, 42, 39, 41, 59–61] investigate quantizing KV caches to minimize storage requirements with only minor performance loss.”
ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference
Liu, X., Tang, Z., Dong, P., Li, Z., Liu, Y., Li, B., Hu, X., & Chu, X. (2025) · arXiv · doi:10.48550/arxiv.2502.00299 · Cited by 4
“H2O [11] and SnapKV [15] have shown that retaining less than 50% of the discrete KV cache can significantly reduce GPU memory usage with minimal impact on performance.”
InfluentialThe Compaction Cliff in Long-Running AI Agent Memory
Zerhoudi, S., Mitrović, J., & Granitzer, M. (2026) · ACM · doi:10.1145/3799682.3840567 · Cited by 4
From Storage to Experience: A Survey on the Evolution of LLM Agent Memory Mechanisms
Luo, J., Tian, Y., Cao, C., Luo, Z., Lin, H., Li, K., Kong, C., Yang, R., & Ma, J. (2026) · Findings of the Association for Computational Linguistics: ACL 2026 · doi:10.18653/v1/2026.findings-acl.2069 · Cited by 3
Self-citationCacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusion
Yao, J., Li, H., Liu, Y., Ray, S., Cheng, Y., Zhang, Q., Du, K., Lu, S., & Jiang, J. (2024) · arXiv · doi:10.48550/arxiv.2405.16444 · Cited by 3
“We implemented CacheBlend on top of vLLM and compared CacheBlend with state-of-the-art KV cache reusing schemes on three open-source LLMs of various sizes and three popular benchmark datasets of two LLM tasks (RAG and QA).”
Stop Overthinking: A Survey on Efficient Reasoning for Large Language Models
Sui, Y., Chuang, Y.-N., Wang, G., Zhang, J., Zhang, T., Yuan, J., Liu, H., Wen, A., Zhong, S., Zou, N., et al. (2025) · arXiv · Cited by 517
“Unlike model compression techniques such as quantization [29,50,97] or KV cache compression [55, 76, 107, 110], which focus on reducing model size for lightweight inference, efficient reasoning in LLMs emphasizes smart and concise reasoning by optimizing the length of generated reasoning sequences…”
PyramidKV: Dynamic KV Cache Compression based on Pyramidal Information Funneling
Cai, Z., Zhang, Y., Gao, B., Liu, Y., Li, Y., Liu, T., Lu, K., Xiong, W., Dong, Y., Hu, J., et al. (2024) · arXiv · doi:10.48550/arxiv.2406.02069 · Cited by 2
“Previous work on KV cache compression [22, 34, 32] often allocates a fixed KV cache size across LLM layers.”
BackgroundMethodInfluentialFrom Human Memory to AI Memory: A Survey on Memory Mechanisms in the Era of LLMs
Wu, Y., Liang, S., Zhang, C., Wang, Y., Zhang, Y., Guo, H., Tang, R., & Liu, Y. (2025) · arXiv · doi:10.48550/arxiv.2504.15965 · Cited by 3
“Buffer of Thoughts [98], AWM [99], Think-in-Memory [100], GITM [101], Voyager [102], Retroformer [103], Expel [104], Synapse [105], MetaGPT [106], Learned Memory Bank [107], M+ [108] VII SystemParametricShort-Term”
MIRIX: Multi-Agent Memory System for LLM-Based Agents
Wang, Y., & Chen, X. (2025) · arXiv · doi:10.48550/arxiv.2507.07957 · Cited by 201
“These memory components can reside in various latent forms, including model parameters[30], external memory matrices [8, 21], hidden states [2, 10, 28, 31], soft prompts [3], and key-value caches [38, 9, 16, 37].”
Compactor: Calibrated Query-Agnostic KV Cache Compression with Approximate Leverage Scores
Chari, V., & Van Durme, B. (2025) · arXiv · doi:10.48550/arxiv.2507.08143 · Cited by 15
KVDirect: Distributed Disaggregated LLM Inference
Chen, S., Jiang, R., Yu, D., Xu, J., Chao, M., Meng, F., Jiang, C., Xu, W., & Liu, H. (2025) · arXiv · doi:10.48550/arxiv.2501.14743 · Cited by 1
“Ad-ditionally, H2O [49] and Scissorhands [22] retain only pivotal tokens in the KV cache, achieving significant size reductions without substantial performance degradation.”
An, Y., Lu, C., Zhu, K., Yu, T., Zhao, C., Wu, H., Tang, M., & Wang, J. (2026) · arXiv · doi:10.48550/arxiv.2605.08840
Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction
Bui, N., Nguyen, H. T., Cohan, A., & Ying, R. (2026) · arXiv · doi:10.48550/arxiv.2605.09649
How Query Visibility Changes KV-Cache Compression Rankings: A Matched-Budget Audit
Luo, D., Liang, C., & Xuan, J. (2026) · arXiv · doi:10.48550/arxiv.2607.11942
Randomization Boosts KV Caching, Learning Balances Query Load: A Joint Perspective
Wu, F., Silwal, S., Qiuyi, & Zhang (2026) · arXiv · doi:10.48550/arxiv.2601.18999
“…with cache capability of B i in the continuous batching setting, where L denotes the minimal length over all Γ j ∈ (cid:101) Q and β is the batch size. importance) to score tokens, retaining only a fixed-budget subset and evicting the rest (Zhang et al., 2023; Xiao et al., 2024; Liu et al., 2023).”
SparseX: Efficient Segment-Level KV Cache Sharing for Interleaved LLM Serving
Zhang, Q., Chen, K., Liao, N., Lin, Z., Tang, B., Xiong, F., Li, Z., & Wang, X. (2026) · arXiv · doi:10.48550/arxiv.2606.01751
“H2O [17] centers on heavy hitters and proposes a KV Cache eviction policy based on attention contribution, substantially reducing KV Cache memory footprint.”
PEEK: Predictive Queue-Informed KV Cache Management for LLM Serving
Xie, B., Wang, Z., Tanaka, M., & Zheng, Z. (2026) · arXiv · doi:10.48550/arxiv.2607.02525
“H2O [Zhang et al., 2023] keeps heavy-hitter tokens by attention history; SnapKV [Li et al., 2024] clusters and prunes tokens at prefill; Scissorhands [Liu et al., 2023] drops decayed-attention tokens; InfiniGen [Lee et al., 2024] offloads cold KV with prefetch; KIVI [Yuan et al., 2024] quantizes KV…”
Self-citationLearning What to Remember: Test-Time Training via Context Distillation
Wang, Z., Dang, X., Zhu, R.-J., Wen, Z., Fu, H., Chai, W., & Lee, J. D. (2026) · arXiv · doi:10.48550/arxiv.2608.01672
“Existing context-compression methods often use distillation to produce an offline prompt, memory, or compressed KV representation before generation [7, 28, 53, 32, 19, 34, 56, 30, 31].”
Self-citationBeyond Token Eviction: Mixed-Dimension Budget Allocation for Efficient KV Cache Compression
Miao, R., Wang, Z., Li, W., Wu, S., Liu, S., Jiang, Y., & Yang, T. (2026) · arXiv · doi:10.48550/arxiv.2603.20616
“We omit H2O from the visualization due to its significantly lower scores, and the full results can be found in Section C.2.”
InfluentialSelf-citationSelf-GC: Self-Governing Context for Long-Horizon LLM Agents
Hao, X., Meng, H., Yin, X., Zhu, J., & Cao, C. (2026) · arXiv · doi:10.48550/arxiv.2607.00692
IndexMem: Learned KV-Cache Eviction with Latent Memory for Long-Context LLM Inference
Yang, X., Gu, H., Xu, B., Li, L., Liu, B., Liu, J., Zhu, Q., Guo, Y., & Han, S. (2026) · arXiv · doi:10.48550/arxiv.2605.25475
KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cache
Liu, Z., Yuan, J., Jin, H., Zhong, S., Xu, Z., Braverman, V., Chen, B., & Hu, X. (2024) · arXiv · doi:10.48550/arxiv.2402.02750
Self-citationICaRus: Identical Cache Reuse for Efficient Multi Model Inference
Woo, S., Kil, J., Kim, H., Kim, M., Kim, J., Seo, A., Lee, S., Jo, M., Ryu, J., Park, B., et al. (2026) · arXiv · doi:10.48550/arxiv.2603.13281
“Previous KV cache optimization techniques, such as pruning (Zhang et al., 2023), quantization (Hooper et al., 2024; Yang et al., 2024), and inter-layer sharing (Qiao et al., 2024), reduce cache size while minimizing accuracy degradation.”
Metadata
- Authors
- Zhang, Z., Sheng, Y., Zhou, T., Chen, T., Zheng, L., Cai, R., Song, Z., Tian, Y., Ré, C., Barrett, C., Wang, Z., & Chen, B.
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2023
- arXiv
- 2306.14048
- References
- 2
- Type
- Preprint
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.