Efficient Prompt Caching via Embedding Similarity
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have achieved huge success in numerous natural language process (NLP) tasks. However, it faces the challenge of significant resource consumption during inference. In this paper, we aim to improve the inference efficiency of LLMs by prompt caching, i.e., if the current prompt can be answered by the same response of a previous prompt, one can directly utilize that previous response without calling the LLM. Specifically, we focus on the prediction accuracy of prompt caching for single-round question-answering tasks via embedding similarity. The existing embeddings of prompts mostly focus on whether two prompts are semantically similar, which is not necessarily equivalent to whether the same response can answer them. Therefore, we propose a distillation-based method to fine-tune the existing embeddings for better caching prediction. Theoretically, we provide finite-sample guarantees for the convergence of our method under different types of loss functions. Empirically, we carefully construct a hard dataset based on Kwiatkowski et al. (2019) where the existing embedding model (Wang et al., 2022) only achieves an AUC of 0.51. We then fine-tune the above embedding model, which significantly improves the AUC of caching prediction from 0.51 to 0.81. We also conduct simulations demonstrating that our trained models achieve better caching efficiency than the previous embedding model.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 26 of its 43 references that are in the map. First posted on arXiv 2 Feb 2024.
Builds on
26 of 43 references.
References · 26
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2022Emergent Abilities of Large Language Modelscited by 2,483
- 2017Billion-scale similarity search with GPUscited by 2,477
- 2019Fine-Tuning Language Models from Human Preferencescited by 2,124
- 2021Improving language models by retrieving from trillions of tokenscited by 1,278
- 2022Text Embeddings by Weakly-Supervised Contrastive Pre-trainingcited by 1,216
- 2022Atlas: Few-shot Learning with Retrieval Augmented Language Modelscited by 940
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
- 2023Capabilities of GPT-4 on Medical Challenge Problemscited by 630
- 2021Carbon Emissions and Large Neural Network Trainingcited by 561
14 more
- 2020Pre-training Tasks for Embedding-based Large-scale Retrievalcited by 153
- 2022Offline Reinforcement Learning with Realizability and Single-policy Concentrabilitycited by 122
- 2022Training Language Models with Memory Augmentationcited by 112
- 2020The Cost of Training NLP Models: A Concise Overviewcited by 97
- 2016Improving Neural Language Models with a Continuous Cachecited by 81
- 2022Nonparametric Masked Language Modelingcited by 39
- 2017Unbounded cache model for online language modeling with open vocabularycited by 37
- 2023On Optimal Caching and Model Multiplexing for Large Model Inferencecited by 20
- 2021Online Caching with Optimal Switching Regretcited by 11
- 2023Evaluating Embedding APIs for Information Retrievalcited by 11
- 2022Regret-Optimal Online Caching for Adversarial and Stochastic Arrivalscited by 5
- 2023Provably Efficient Offline Goal-Conditioned Reinforcement Learning with General Function Approximation and Single-Policy Concentrabilitycited by 5
- 2020Learning to Cache and Caching to Learn: Regret Analysis of Caching Algorithmscited by 4
- 2023Provably Efficient Reinforcement Learning via Surprise Boundcited by 4
Built on by
Citing papers per year: 2024: 2; 2025: 4; 2026: 3.
9 papers.
- 2024Dipper: Diversity in Prompts for Producing Large Language Model Ensembles in Reasoning taskscited by 22
- 2025vCache: Verified Semantic Prompt Cachingcited by 15
- 2025A Generative Caching System for Large Language Modelscited by 3
- 2026Asynchronous Verified Semantic Caching for Tiered LLM Architecturescited by 3
- 2025The Structural Safety Generalization Problemcited by 2
- 2026TVCACHE: A Stateful Tool-Value Cache for Post-Training LLM Agentscited by 2
- 2024LLMBridge: Reducing Costs to Access LLMs in a Prompt-Centric Internetcited by 0
- 2025ODIA: Oriented Distillation for Inline Acceleration of LLM-based Function Callingcited by 0
- 2026MVR-cache: Optimizing Semantic Caching via Multi-Vector Retrieval and Learned Prompt Segmentationcited by 0
- 2026MVR-cache: Optimizing Semantic Caching via Multi-Vector Retrieval and Learned Prompt Segmentation24 May 2026
- 2026Asynchronous Verified Semantic Caching for Tiered LLM Architectures13 Feb 2026
- 2026TVCACHE: A Stateful Tool-Value Cache for Post-Training LLM Agents11 Feb 2026
- 2025ODIA: Oriented Distillation for Inline Acceleration of LLM-based Function Calling10 Jul 2025
- 2025The Structural Safety Generalization Problem13 Apr 2025
- 2025A Generative Caching System for Large Language Models22 Mar 2025
- 2025vCache: Verified Semantic Prompt Caching6 Feb 2025
- 2024Dipper: Diversity in Prompts for Producing Large Language Model Ensembles in Reasoning tasks12 Dec 2024
- 2024LLMBridge: Reducing Costs to Access LLMs in a Prompt-Centric Internet4 Oct 2024