Eigen Attention: Attention in Low-Rank Space for KV Cache Compression

要約

大規模言語モデル (LLM) は、その優れた推論能力により、自然言語処理の分野における画期的な進歩を表しています。
最近、複雑なタスクへの適用性を高めるために、これらのモデルのコンテキストの長さを増やすことに大きな関心が集まっています。
ただし、コンテキストの長さが長く、バッチ サイズが大きい場合、アテンション キーと値を格納するキーバリュー (KV) キャッシュが、推論中のメモリ使用量の新たなボトルネックとして浮上します。
これに対処するために、我々は、低ランク空間でアテンション操作を実行し、それによって KV キャッシュ メモリのオーバーヘッドを削減する、Eigen アテンションを提案します。
私たちが提案するアプローチは、既存の KV キャッシュ圧縮技術と直交しており、それらと相乗的に使用できます。
OPT、MPT、および Llama モデル ファミリに対する広範な実験を通じて、Eigen Attend がパフォーマンスの低下を最小限に抑えながら、KV キャッシュ サイズを最大 40% 削減し、アテンション操作のレイテンシを最大 60% 削減できることを実証しました。
コードは https://github.com/UtkarshSaxena1/EigenAttn で入手できます。

要約(オリジナル)

Large language models (LLMs) represent a groundbreaking advancement in the domain of natural language processing due to their impressive reasoning abilities. Recently, there has been considerable interest in increasing the context lengths for these models to enhance their applicability to complex tasks. However, at long context lengths and large batch sizes, the key-value (KV) cache, which stores the attention keys and values, emerges as the new bottleneck in memory usage during inference. To address this, we propose Eigen Attention, which performs the attention operation in a low-rank space, thereby reducing the KV cache memory overhead. Our proposed approach is orthogonal to existing KV cache compression techniques and can be used synergistically with them. Through extensive experiments over OPT, MPT, and Llama model families, we demonstrate that Eigen Attention results in up to 40% reduction in KV cache sizes and up to 60% reduction in attention operation latency with minimal drop in performance. Code is available at https://github.com/UtkarshSaxena1/EigenAttn.

arxiv情報

著者 Utkarsh Saxena,Gobinda Saha,Sakshi Choudhary,Kaushik Roy
発行日 2024-11-08 16:29:33+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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