FreqKV: Frequency Domain Key-Value Compression for Efficient Context Window Extension

要約

大規模な言語モデル(LLMS)のコンテキストウィンドウを拡張することは、長い形式のコンテンツ生成を含むアプリケーションに不可欠です。
ただし、キー値(kV)キャッシュメモリ要件の線形増加と、シーケンス長に関する自己関節の二次複雑さは、微調整および推論中の重要な課題を提示します。
既存の方法は、より長いコンテキストに拡張すると、パフォーマンスの劣化に苦しんでいます。
この作業では、微調整と推論効率の両方を最適化する新しいコンテキスト拡張法を紹介します。
私たちの方法は重要な観察結果を活用します。周波数領域では、KVキャッシュのエネルギー分布は主に低周波成分に集中しています。
高周波コンポーネントを除外することにより、KVキャッシュを最小限の情報損失で効果的に圧縮できます。
この洞察に基づいて、私たちは、微調整と推論の両方に適用される周波数領域の固定サイズに増加するKVキャッシュを繰り返し圧縮する効率的な圧縮技術であるFreqKVを提案します。
FREQKVは、追加のパラメーターやアーキテクチャの変更を導入しません。
最小限の微調整により、LLMSは、周波数ドメインで圧縮される限られたキャッシュを活用し、コンテキストウィンドウを効率的に拡張することを学ぶことができます。
さまざまな長いコンテキスト言語のモデリングと理解に関する実験タスクは、提案された方法の効率と有効性を示しています。

要約(オリジナル)

Extending the context window in large language models (LLMs) is essential for applications involving long-form content generation. However, the linear increase in key-value (KV) cache memory requirements and the quadratic complexity of self-attention with respect to sequence length present significant challenges during fine-tuning and inference. Existing methods suffer from performance degradation when extending to longer contexts. In this work, we introduce a novel context extension method that optimizes both fine-tuning and inference efficiency. Our method exploits a key observation: in the frequency domain, the energy distribution of the KV cache is primarily concentrated in low-frequency components. By filtering out the high-frequency components, the KV cache can be effectively compressed with minimal information loss. Building on this insight, we propose an efficient compression technique, FreqKV, that iteratively compresses the increasing KV cache to a fixed size in the frequency domain, applicable to both fine-tuning and inference. FreqKV introduces no additional parameters or architectural modifications. With minimal fine-tuning, LLMs can learn to leverage the limited cache that is compressed in the frequency domain and extend the context window efficiently. Experiments on various long context language modeling and understanding tasks demonstrate the efficiency and efficacy of the proposed method.

arxiv情報

著者 Jushi Kai,Boyi Zeng,Yixuan Wang,Haoli Bai,Bo Jiang,Zhouhan Lin
発行日 2025-05-01 14:53:12+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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