要約
ChatGPTやLlama2のような大規模言語モデル(LLM)は、自然言語処理や検索エンジンダイナミクスに革命をもたらした。しかし、これらのモデルには非常に高い計算コストがかかります。例えば、GPT-3は1750億のパラメータで構成され、推論には何十億もの浮動小数点演算が必要です。キャッシングは、クエリ全体の約31%を占める繰り返しクエリのLLM推論コストを削減するための自然なソリューションである。しかしながら、既存のキャッシュ手法はLLMクエリ間の意味的類似性を見つけることができず、許容できない誤ヒット&ミス率につながる。 本稿では、意味的に類似したクエリを識別してキャッシュのヒット・ミスを決定する、LLMのためのユーザー中心のセマンティック・キャッシュであるMeanCacheを紹介する。MeanCacheを使用することで、ユーザーの意味的に類似したクエリに対する応答は、LLMに再クエリするのではなく、ローカルキャッシュから取得することができるため、コスト、サービスプロバイダーの負荷、環境への影響を削減することができる。LLMのための既存のキャッシング・ソリューションは、プライバシーとスケーラビリティの懸念を引き起こし、無駄なクエリ・リクエストを実行する。MeanCacheはFederated Learning (FL)を活用し、プライバシーを侵害することなく、LLMユーザー間でクエリの類似性モデルを共同学習します。各ユーザーのデバイスにローカルキャッシュを配置し、FLを使用することで、MeanCacheはレイテンシーとコストを削減し、モデル性能を向上させ、その結果、誤ヒット率を低下させる。MeanCacheはキャッシュストレージを最小化するために埋め込み次元を圧縮し、また最適な余弦類似度の閾値を見つける。最先端のキャッシュ手法に対するベンチマークを行った我々の実験により、MeanCacheはセマンティックキャッシュのヒット・アンド・ミス判定において、約17%高いFスコアと20%の精度向上を達成することが明らかになった。また、ストレージ要件を83%削減し、セマンティックキャッシュのヒット・アンド・ミス判定を11%高速化する。
要約(オリジナル)
Large Language Models (LLMs) like ChatGPT and Llama2 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, leading to unacceptable false hit-and-miss rates. This paper introduces MeanCache, a user-centric semantic cache for LLMs 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. Existing caching solutions for LLMs raise privacy and scalability concerns and perform wasteful query requests. MeanCache leverages Federated Learning (FL) to collaboratively train a query similarity model across LLM users without violating 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 compresses the embedding dimensions to minimize cache storage and also finds the optimal cosine similarity threshold. 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. 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,Ali Anwar,Muhammad Ali Gulzar |
| 発行日 | 2024-04-03 16:06:30+00:00 |
| arxivサイト | arxiv_id(pdf) |