NACL: A General and Effective KV Cache Eviction Framework for LLMs at Inference Time

要約

大規模言語モデル (LLM) は AI アプリケーションの革新的な急増を引き起こし、拡張されたコンテキスト ウィンドウを備えたエキサイティングな可能性の新時代を告げています。
ただし、これらのモデルのホストには、主にロングコンテキスト モデリングを伴う KV キャッシュの大量のメモリ消費が原因で、法外なコストがかかります。
KV キャッシュから不要なトークンを削除することを提案しているいくつかの研究にもかかわらず、そのほとんどは蓄積された注意スコアの偏ったローカル統計に依存しており、不適切な短文評価における当惑のような説得力のない指標を使用してパフォーマンスを報告しています。
この論文では、エンコードフェーズ中の 1 回の操作でより最適かつ効率的なエビクションを実現する、ロングコンテキスト KV キャッシュエビクションの一般的なフレームワークである NACL を提案します。
NACL の効率性により、PROXY TOKENS EVICTION のより正確な注意スコア統計と、RANDOM EVICTION の多様なランダム エビクション戦略を組み合わせて、注意バイアスの問題を軽減し、長いコンテキストのモデリング タスクで重要なトークンを維持する堅牢性を強化することを目指しています。
特に、私たちの方法では、短文タスクと長文タスクのパフォーマンスがそれぞれ 80% と 76% 大幅に向上し、95% 以上のパフォーマンスを維持しながら KV キャッシュを最大 50% 削減します。
コードは https://github.com/PaddlePaddle/Research/tree/master/NLP/ACL2024-NACL で入手できます。

要約(オリジナル)

Large Language Models (LLMs) have ignited an innovative surge of AI applications, marking a new era of exciting possibilities equipped with extended context windows. However, hosting these models is cost-prohibitive mainly due to the extensive memory consumption of KV Cache involving long-context modeling. Despite several works proposing to evict unnecessary tokens from the KV Cache, most of them rely on the biased local statistics of accumulated attention scores and report performance using unconvincing metric like perplexity on inadequate short-text evaluation. In this paper, we propose NACL, a general framework for long-context KV cache eviction that achieves more optimal and efficient eviction in a single operation during the encoding phase. Due to NACL’s efficiency, we combine more accurate attention score statistics in PROXY TOKENS EVICTION with the diversified random eviction strategy of RANDOM EVICTION, aiming to alleviate the issue of attention bias and enhance the robustness in maintaining pivotal tokens for long-context modeling tasks. Notably, our method significantly improves the performance on short- and long-text tasks by 80% and 76% respectively, reducing KV Cache by up to 50% with over 95% performance maintenance. The code is available at https://github.com/PaddlePaddle/Research/tree/master/NLP/ACL2024-NACL.

arxiv情報

著者 Yilong Chen,Guoxia Wang,Junyuan Shang,Shiyao Cui,Zhenyu Zhang,Tingwen Liu,Shuohuan Wang,Yu Sun,Dianhai Yu,Hua Wu
発行日 2024-08-08 01:20:13+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク