要約
シーケンスからシーケンスへのタスクは、しばしば長いコンテキストから恩恵を受けますが、標準変圧器における自己関節の二次複雑さはこの非自明になります。
生成中、GPUメモリの使用量の大部分について、いわゆるKVキャッシュアカウントに一時的な表現が貯蔵され、コンテキストの長さで直線的にスケーリングされます。
長いコンテキストKVキャッシュを質問に依存しない方法で大幅に短い表現に蒸留するトランス圧縮フレームワークであるKV-Distillを紹介します。
KV-distillは、事前に処理されたモデルのパラメーター効率の高いアダプターとしてトレーニングでき、事前に訓練されたモデル機能を維持しながら、コンテキストの任意のスパンの圧縮を可能にします。
圧縮された非競合キャッシュを学生と教師のペアリングとして扱い、KLタイプの発散を適用して生成された出力に合わせます。
KV-distillは、最悪の抽出タスクの他の圧縮技術を上回り、長いコンテキストの質問に応答して要約することで圧縮されていないパフォーマンスに近づき、ドメイン固有のコンテキストで微調整して、ダウンストリームパフォーマンスを維持しながら最大99%減少します。
さまざまなモデルサイズとアーキテクチャにわたるKV-Distillの一般化可能性を示します。
要約(オリジナル)
Sequence-to-sequence tasks often benefit from long contexts, but the quadratic complexity of self-attention in standard Transformers renders this non-trivial. During generation, temporary representations -stored in the so-called KV cache-account for a large portion of GPU memory usage and scale linearly with context length. We introduce KV-Distill, a Transformer compression framework that distills long context KV caches into significantly shorter representations in a question-independent fashion. KV-Distill can be trained as a parameter-efficient adaptor for pretrained models, and enables the compression of arbitrary spans of a context while preserving pre-trained model capabilities. We treat a compressed-uncompressed cache as a student-teacher pairing and apply a KL-type divergence to match the generated outputs. KV-Distill outperforms other compression techniques in worst-case extractive tasks and approaches uncompressed performance in long context question answering and summarization, and it can be fine-tuned on domain-specific contexts to reduce lengths by up to 99% while preserving downstream performance. We demonstrate the generalizability of KV-Distill across various model sizes and architectures.
arxiv情報
著者 | Vivek Chari,Guanghui Qin,Benjamin Van Durme |
発行日 | 2025-03-13 13:15:28+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google