Manuscript Offprint

arXiv:2610.24499

TideKV: Delayed KV Eviction via Layer-Wise Chunked Prefill for Memory-Efficient Long-Context LLM Inference

Yu Wang, Zhu Wang, Ning Hu, Yifan Guo, Xiu Ma, Bin Guo, Zhiwen Yu

ARTICLE INFO

Keywords:

Large language model inference

key-value cache compression

long-context inference

chunked prefill

memory management

inference scheduling

ABSTRACT

Long-context large language model (LLM) inference is important for modern intelligent applications but remains constrained by peak memory during prompt prefill. Existing KV cache compression reduces decoding memory but typically requires full-prompt prefill to preserve global context, retaining a high construction peak. Online chunk-level eviction lowers memory earlier but selects before each layer has observed the complete prompt, potentially degrading cache construction and decoding. We present TideKV, an on-GPU cache-construction architecture using layer-major delayed eviction. TideKV processes all prompt chunks within each Transformer layer, retains full-prompt KV only for the active layer, and evicts at layer end. This schedule preserves full-prompt-aware selection while reducing activation and temporary memory. Experiments across multiple computing platforms show that TideKV preserves the inference quality and final cache size of the evaluated compression methods. At 64K on A100, it reduces the construction-time transient footprint by 83.89%. On RTX 4090, it increases time to first token by only 1.06% at 64K and enables 128K prefill. TideKV also completes 128K on Jetson, whereas matched post-prefill compression runs out of memory on both resource-constrained platforms. These results show that delayed layer-end eviction substantially expands feasible context lengths without sacrificing cache utility.

References (46)

  • Neural Information Processing Systems, Curran Associates, 2024
  • Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context
  • 5-coder technical report, arXiv e-prints (2024) arXiv–2409
  • Enhanced transformer with rotary position embedding, Neurocomputing 568 (2024) 127063
  • Efficient context window extension of large language models, in: International Conference on Learning Representations, volume 2024, 2024, pp. 31932–31951
  • extending llm context window beyond 2 million tokens, in: Proceedings of the 41st International Conference on Machine Learning, 2024, pp. 11091–11104
  • Yih, T. Rocktäschel, et al., Retrieval-augmented generation for knowledge-intensive nlp tasks, Advances in neural information processing systems 33 (2020) 9459–9474
  • Synergizing reasoning and acting in language models, in: International Conference on Learning Representations (ICLR), 2023
  • Code Llama: Open Foundation Models for Code
  • A bilingual, multitask benchmark for long context understanding, in: Proceedings of the 62nd annual meeting of the association for computational linguistics (volume 1: Long papers), 2024, pp. 3119–3137
  • RULER: What's the Real Context Size of Your Long-Context Language Models?
  • A comprehensive review, arXiv e-prints (2024) arXiv–2409
  • Efficient large language model inference with limited memory, in: Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2024, pp. 12562–12584
  • Fast large language model serving with a consumer-grade gpu, in: Proceedings of the ACM SIGOPS 30th Symposium on Operating Systems Principles, 2024, pp. 590–606
  • an embodied multimodal language model, in: Proceedings of the 40th International Conference on Machine Learning, 2023, pp. 8469–8488
  • Conference on Robot Learning, PMLR, 2023, pp. 2165–2183
  • Kaiser, I. Polosukhin, Attention is all you need, Advances in neural information processing systems 30
  • Training generalized multi-query transformer models from multi-head checkpoints, in: Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, 2023, pp. 4895–4901
  • 18th USENIX symposium on operating systems design and implementation (OSDI 24), 2024, pp. 117–134
  • International Conference on Learning Representations, volume 2024, 2024, pp. 35549–35562
  • Llm knows what you are looking for before generation, Advances in Neural Information Processing Systems 37 (2024) 22947–22970
  • Key similarity-based kv cache eviction for long-context llm inference in Wang et al.: Preprint submitted to Elsevier Page 14 of 15 resource-constrained environments, Advances in Neural Information Processing Systems 38 (2026) 5983–6019
  • Heavy-hitter oracle for efficient generative inference of large language models, Advances in Neural Information Processing Systems 36 (2023) 34661–34710
  • Exploiting the persistence of importance hypothesis for llm kv cache compression at test time, Advances in Neural Information Processing Systems 36 (2023) 52342–52364
  • International Conference on Learning Representations, volume 2024, 2024, pp. 21875–21895
  • Adaptive kv cache compression for llms, in: International Conference on Learning Representations, volume 2024, 2024, pp. 22975–22988
  • Dynamic kv cache compression based on pyramidal information funneling, arXiv preprint arXiv:2406.02069 (opens arXiv in a new tab)
  • Optimizing kv cache eviction by adaptive budget allocation for efficient llm inference, Advances in Neural Information Processing Systems 38 (2026) 113152–113188
  • Cascading and adaptive KV cache eviction with layer preferences, arXiv preprint arXiv:2503.12491 (opens arXiv in a new tab)
  • Semantic-preserving kv cache compression for efficient long-context llm inference, Advances in Neural Information Processing Systems 38 (2026) 28728–28778
  • query-aware sparsity for efficient long-context llm inference, in: Proceedings of the 41st International Conference on Machine Learning, 2024, pp. 47901–47911
  • Achieving periodic lossless kv cache compression for efficient llm inference, in: Proceedings of the AAAI Conference on Artificial Intelligence, volume 40, 2026, pp. 33259–33267
  • On the redundancy of the kv cache in transformer inference, arXiv preprint arXiv:2603.19664 (opens arXiv in a new tab)
  • A tuning-free asymmetric 2bit quantization for kv cache, Proceedings of Machine Learning Research 235 (2024) 32332–32344
  • A review on methods to optimize llm's kv-cache consumption, arXiv preprint arXiv:2407.18003 (opens arXiv in a new tab)
  • Infinite context processing on memory-constrained llms, in: Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, 2024, pp. 16046–16060
  • Episodic kv cache management for long conversational question answering, in: Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics, 2024
  • Look-once optimization in kv cache for efficient multimodal long-context inference, in: Findings of the Association for Computational Linguistics: EMNLP 2024, 2024, pp. 4065–4078
  • Enhancing eviction in long-context llm inference with trained retaining heads on consumer-grade devices, arXiv preprint arXiv:2410.01805 (opens arXiv in a new tab)
  • Memory-efficient offloaded mini-sequence inference for long context language models, arXiv preprint arXiv:2504.12526 (opens arXiv in a new tab)
  • Efficient llm inference by piggybacking decodes with chunked prefills, arXiv preprint arXiv:2308.16369 (opens arXiv in a new tab)
  • 18th USENIX Symposium on Operating Systems Design and Implementation (OSDI 24), 2024, pp. 193–210
  • Optimizing intermediate memory for long sequences training, Advances in Neural Information Processing Systems 37 (2024) 97299–97327
  • Pyramid kv cache compression for high-throughput llm inference, in: Findings of the Association for Computational Linguistics: ACL 2024, 2024, pp. 3258–3270
  • Memory-efficient llm inference by head-wise offloading, arXiv e-prints (2025) arXiv–2502
  • High-throughput generative inference of large language models with a single gpu, in: International Conference on Machine Learning, PMLR, 2023, pp. 31094–31116