MPCache: MPC-Friendly KV Cache Eviction for Efficient Private LLM Inference

Wen-Xuan Zeng, Ye Dong, Jinjin Zhou, Jin Tan, Lei Wang +3 more
1/1/2025

No confident code implementation found for this paper.

Abstract

Private large language model (LLM) inference based on secure multi-party computation (MPC) achieves formal data privacy protection but suffers from significant latency overhead, especially for long input sequences. While key-value (KV) cache eviction and sparse attention algorithms have been proposed for efficient LLM inference in plaintext, they are not designed for MPC and cannot benefit private LLM inference directly.

Show full abstract

In this paper, we propose an accurate and MPC-friendly KV cache eviction framework, dubbed MPCache, building on the observation that historical tokens in a long sequence may have different effects on the downstream decoding. Hence, MPCache combines a look-once static eviction algorithm to discard unimportant KV cache and a query-aware dynamic selection algorithm to activate only a small subset of KV cache for attention computation. MPCache further incorporates a series of optimizations for efficient dynamic KV cache selection, including MPC-friendly similarity approximation, hierarchical KV cache clustering, and cross-layer index-sharing strategy. Extensive experiments demonstrate that MPCache consistently outperforms prior-art KV cache eviction baselines across different generation tasks and achieves 1.8 ~ 2.01x and 3.39 ~ 8.37x decoding latency and communication reduction on different sequence lengths, respectively.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zeng2025mpcache,
  title  = {MPCache: MPC-Friendly KV Cache Eviction for Efficient Private LLM Inference},
  author = {Wen-Xuan Zeng and Ye Dong and Jinjin Zhou and Jin Tan and Lei Wang and Tao Wei and Run-Sheng Wang and Meng Li},
  year   = {2025},
  eprint = {2501.06807},
  archivePrefix = {arXiv},
  doi    = {10.52202/085713-3251},
  url    = {https://doi.org/10.52202/085713-3251},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.06807.svg)](https://codeofpaper.com/paper/2501.06807)

Discussion