dKV-Cache: The Cache for Diffusion Language Models

要約

拡散言語モデル(DLM)は、自己回帰言語モデルの有望な競合他社と見なされてきました。
ただし、拡散言語モデルは、ゆっくりとした推論によって長い間制約されてきました。
中心的な課題は、彼らの非自動網性アーキテクチャと双方向の注意が、デコードを加速するキー価値のキャッシュを排除することです。
DLMSの除去プロセスのために、KVキャッシュのようなメカニズム、KVキャッシュの遅延を提案することにより、このボトルネックに対処します。
私たちのアプローチは、異なるトークンが拡散プロセス全体で明確な表現ダイナミクスを持っているという観察によって動機付けられています。
したがって、キーおよびバリューの状態に対して、遅延して条件付けられたキャッシュ戦略を提案します。
キーと値を段階的にキャッシュするために2つの補完的なバリエーションを設計します:(1)DKV-CACHE-DECODEは、ほとんどロスレス加速度を提供し、長いシーケンスのパフォーマンスを改善し、既存のDLMが推論中に文脈情報を過小評価する可能性があることを示唆しています。
(2)DKV-Cache-Greedyは、寿命が短くなった攻撃的なキャッシュを持ち、パフォーマンスの劣化を犠牲にして二次時間の複雑さで高速化を達成します。
DKV-Cacheは、最終的には、推論で2〜10倍のスピードアップを達成し、ARSとDLMSの間のギャップを主に狭めます。
DKV-Cacheをいくつかのベンチマークで評価し、一般的な言語の理解、数学、およびコードジェネレーションベンチマーク全体で加速を提供します。
実験では、現在のDLMからのトレーニングなしの方法でさえ、キャッシュもDLMで使用できることを示しています。

要約(オリジナル)

Diffusion Language Models (DLMs) have been seen as a promising competitor for autoregressive language models. However, diffusion language models have long been constrained by slow inference. A core challenge is that their non-autoregressive architecture and bidirectional attention preclude the key-value cache that accelerates decoding. We address this bottleneck by proposing a KV-cache-like mechanism, delayed KV-Cache, for the denoising process of DLMs. Our approach is motivated by the observation that different tokens have distinct representation dynamics throughout the diffusion process. Accordingly, we propose a delayed and conditioned caching strategy for key and value states. We design two complementary variants to cache key and value step-by-step: (1) dKV-Cache-Decode, which provides almost lossless acceleration, and even improves performance on long sequences, suggesting that existing DLMs may under-utilise contextual information during inference. (2) dKV-Cache-Greedy, which has aggressive caching with reduced lifespan, achieving higher speed-ups with quadratic time complexity at the cost of some performance degradation. dKV-Cache, in final, achieves from 2-10x speedup in inference, largely narrowing the gap between ARs and DLMs. We evaluate our dKV-Cache on several benchmarks, delivering acceleration across general language understanding, mathematical, and code-generation benchmarks. Experiments demonstrate that cache can also be used in DLMs, even in a training-free manner from current DLMs.

arxiv情報

著者 Xinyin Ma,Runpeng Yu,Gongfan Fang,Xinchao Wang
発行日 2025-05-21 17:32:10+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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