MeanCache: User-Centric Semantic Caching for LLM Web Services

要約

ChatGptやLlamaなどの大規模な言語モデル(LLM)は、自然言語処理と検索エンジンのダイナミクスに革命をもたらしました。
ただし、これらのモデルには非常に高い計算コストが発生します。
たとえば、GPT-3は1750億のパラメーターで構成されており、推論には数十億の浮動小数点操作が必要です。
キャッシングは、繰り返しクエリのLLM推論コストを削減するための自然なソリューションであり、クエリ全体の約31%を構成します。
ただし、既存のキャッシュ方法は、LLMクエリ間でセマンティックな類似点を見つけることができず、コンテキストクエリで動作しないため、容認できない誤ったヒットアンドミス率につながります。
このペーパーでは、LLMベースのサービスのユーザー中心のセマンティックキャッシュであるMeancacheを紹介します。
Meycacheを使用して、ユーザーの意味的に類似したクエリへの応答は、LLMを再クエリするのではなく、ローカルキャッシュから取得することができ、コスト、サービスプロバイダーの負荷、環境への影響を削減できます。
Meancacheは、Federated Learning(FL)を活用して、ユーザーのプライバシーに違反することなくクエリの類似性モデルを協力してトレーニングします。
各ユーザーのデバイスにローカルキャッシュを配置し、FLを使用することにより、Meancacheは遅延とコストを削減し、モデルのパフォーマンスを向上させ、誤ったヒット率が低下します。
また、Meancacheは、キャッシュされたクエリごとにコンテキストチェーンをコードし、スタンドアロンからコンテキストクエリ応答を識別するためのシンプルで非常に効果的なメカニズムを提供します。
最先端のキャッシング方法に対してベンチマークされた実験は、CheencacheがCache Cacheのヒットアンドミス決定中に約17%高いFスコアと20%の精度が20%増加し、コンテキストクエリでさらに優れたパフォーマンスを発揮することを明らかにしています。
また、ストレージ要件を83%削減し、セマンティックキャッシュのヒットアンドミスの決定を11%加速します。

要約(オリジナル)

Large Language Models (LLMs) like ChatGPT and Llama have revolutionized natural language processing and search engine dynamics. However, these models incur exceptionally high computational costs. For instance, GPT-3 consists of 175 billion parameters, where inference demands billions of floating-point operations. Caching is a natural solution to reduce LLM inference costs on repeated queries, which constitute about 31% of the total queries. However, existing caching methods are incapable of finding semantic similarities among LLM queries nor do they operate on contextual queries, leading to unacceptable false hit-and-miss rates. This paper introduces MeanCache, a user-centric semantic cache for LLM-based services that identifies semantically similar queries to determine cache hit or miss. Using MeanCache, the response to a user’s semantically similar query can be retrieved from a local cache rather than re-querying the LLM, thus reducing costs, service provider load, and environmental impact. MeanCache leverages Federated Learning (FL) to collaboratively train a query similarity model without violating user privacy. By placing a local cache in each user’s device and using FL, MeanCache reduces the latency and costs and enhances model performance, resulting in lower false hit rates. MeanCache also encodes context chains for every cached query, offering a simple yet highly effective mechanism to discern contextual query responses from standalone. Our experiments benchmarked against the state-of-the-art caching method, reveal that MeanCache attains an approximately 17% higher F-score and a 20% increase in precision during semantic cache hit-and-miss decisions while performing even better on contextual queries. It also reduces the storage requirement by 83% and accelerates semantic cache hit-and-miss decisions by 11%.

arxiv情報

著者 Waris Gill,Mohamed Elidrisi,Pallavi Kalapatapu,Ammar Ahmed,Ali Anwar,Muhammad Ali Gulzar
発行日 2025-03-07 14:49:07+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.CR, cs.DC, cs.LG, I.2.7 パーマリンク