paper-with-me

Papers

Efficient Prompt Caching via Embedding Similarity

2024-02-02 · Hanlin Zhu, Banghua Zhu, Jiantao Jiao

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.

📄 PDF Abstract BibTeX arXiv:2402.01173

Code (0)

등록된 구현이 없습니다.

Tasks

Question Answering

Methods 이 논문이 사용한 방법론

Focus 설명 없음

Similar Papers 제목 키워드 기반

Adaptive Semantic Prompt Caching with VectorQ

2025-02-06 · Luis Gaspar Schroeder, Shu Liu, Alejandro Cuadron, Mark Zhao 외

Semantic prompt caches reduce the latency and cost of large language model (LLM) inference by reusing cached LLM-generated responses for semantically similar prompts. Vector similarity metrics assign a numerical score to…

Language ModelingLanguage ModellingLarge Language Model

Auditing Prompt Caching in Language Model APIs

2025-02-11 · Chenchen Gu, Xiang Lisa Li, Rohith Kuditipudi, Percy Liang 외

Prompt caching in large language models (LLMs) results in data-dependent timing variations: cached prompts are processed faster than non-cached prompts. These timing differences introduce the risk of side-channel timing …

DecoderLanguage ModelingLanguage Modellingmodel

Advancing Semantic Caching for LLMs with Domain-Specific Embeddings and Synthetic Data

2025-04-03 · Waris Gill, Justin Cechmanek, Tyler Hutcherson, Srijith Rajamohan 외

This report investigates enhancing semantic caching effectiveness by employing specialized, fine-tuned embedding models. Semantic caching relies on embedding similarity rather than exact key matching, presenting unique c…

Computational EfficiencySynthetic Data Generation

Beyond Few-Step Inference: Accelerating Video Diffusion Transformer Model Serving with Inter-Request Caching Reuse

2026-04-06 · Hao Liu, Ye Huang, Chenghuan Huang, Zhenyi Zheng 외 arxiv

Video Diffusion Transformer (DiT) models are a dominant approach for high-quality video generation but suffer from high inference cost due to iterative denoising. Existing caching approaches primarily exploit similarity …

Video Generation

An Ensemble Embedding Approach for Improving Semantic Caching Performance in LLM-based Systems

2025-07-08 · Shervin Ghaffari, Zohre Bahranifard, Mohammad Akbari arxiv

Semantic caching enhances the efficiency of large language model (LLM) systems by identifying semantically similar queries, storing responses once, and serving them for subsequent equivalent requests. However, existing s…

Semantic Similarity