要約
意味的プロンプトキャッシュは、意味的に類似したプロンプトに対してキャッシュされたLLM生成応答を再利用することにより、大規模言語モデル(LLM)推論の待ち時間とコストを削減する。ベクトル類似度メトリクスは、埋め込まれたプロンプトとキャッシュ内の最近傍のプロンプトとの間の類似度を定量化するために数値スコアを割り当てる。既存のシステムは、類似性スコアがキャッシュヒットをもたらすのに十分高いかどうかを分類するために、静的な閾値に依存している。我々は、この画一的な閾値では、異なる埋め込みにおいて不十分であることを示す。我々は、埋込みの不確実性に適応する埋込み固有の閾値領域を学習する、閾値収束保証のあるオンラインフレームワークであるVectorQを提案する。3つの多様なデータセットを組み合わせた評価を通じて、VectorQが全ての静的閾値において一貫して最先端のシステムを凌駕し、最大26倍のキャッシュヒット率向上と最大74%のエラー率低減を達成することを示す。
要約(オリジナル)
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 quantify the similarity between an embedded prompt and its nearest neighbor in the cache. Existing systems rely on a static threshold to classify whether the similarity score is sufficiently high to result in a cache hit. We show that this one-size-fits-all threshold is insufficient across different embeddings. We propose VectorQ, an online framework with a threshold convergence guarantee to learn embedding-specific threshold regions that adapt to the uncertainty of an embedding. Through evaluations on a combination of three diverse datasets, we show that VectorQ consistently outperforms state-of-the-art systems across all static thresholds, achieving up to 26x increases in cache hit rate and error rate reductions up to 74%.
arxiv情報
著者 | Luis Gaspar Schroeder,Shu Liu,Alejandro Cuadron,Mark Zhao,Stephan Krusche,Alfons Kemper,Matei Zaharia,Joseph E. Gonzalez |
発行日 | 2025-04-04 16:51:15+00:00 |
arxivサイト | arxiv_id(pdf) |