Reproduce “LLMCache: Layer-Wise Caching Strategies for Accelerated Reuse in Transformer Inference” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Harsh Vardhan Bansal

LLMCache introduces a layer-wise caching framework for Transformer inference that reuses intermediate hidden states based on input semantic similarity, achieving up to 3.1x speedup with less than 0.5% accuracy drop. The system integrates a semantic fingerprinting mechanism to identify and leverage computation reuse across different but semantically similar input sequences, applicable to various Transformer architectures without modification.

Key insights

  • Intermediate activations in Transformer models, particularly in lower and middle layers, exhibit high semantic stability across similar inputs, making them highly reusable for computational efficiency.
  • Effective semantic fingerprinting can reliably identify input similarities for cache reuse, maintaining high task accuracy with minimal degradation.
  • Layer-wise caching provides greater performance gains than token-level caching by exploiting deeper and more extensive redundancies in the Transformer's internal computations.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.