論文の概要: DualKV: Shared-Prompt Flash Attention for Efficient RL Training with Large Rollouts and Long Contexts
- arxiv url: http://arxiv.org/abs/2605.15422v1
- Date: Thu, 14 May 2026 21:11:32 GMT
- ステータス: 翻訳完了
- システム内更新日: 2026-05-18 21:22:26.107758
- Title: DualKV: Shared-Prompt Flash Attention for Efficient RL Training with Large Rollouts and Long Contexts
- Title(参考訳): DualKV: 大きなロールアウトと長期コンテキストによる効率的なRLトレーニングのための共有プロンプトフラッシュアテンション
- Authors: Jiading Gai, Shuai Zhang, Xiang Song, Bernie Wang, George Karypis,
- Abstract要約: GRPOやDAPOのような現代のRLポストトレーニングメソッドは、共有プロンプトからサンプリングされた$R$トークンの$N$レスポンスシーケンスでトレーニングする。
標準FlashAttentionは、すべての$P$プロンプトトークンを前方と後方の両方で$N回複製する。
トレーニング中に共有プロンプトレプリケーションを排除した最初のFlashカーネルである textDualAttention を提案する。
- 参考スコア(独自算出の注目度): 32.57334288518084
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Modern RL post-training methods such as GRPO and DAPO train on $N$ response sequences of $R$ tokens sampled from a shared prompt of $P$ tokens, but standard FlashAttention replicates all $P$ prompt tokens $N$ times across both forward and backward passes -- duplicating compute and memory on identical hidden states. In large-rollout, long-context RL training ($N{\geq}16$, $P{\geq}8\text{K}$), this redundancy dominates the policy update cost. We observe that in decoder-only models, causal masking makes prompt representations invariant across sequences at every layer, so all per-token operations (norms, projections, MLP) and attention can process the prompt once -- a property not yet exploited at the kernel level for training. We propose \textbf{DualKV}, the first FlashAttention kernel variant that eliminates shared-prompt replication during RL training, via (1)~fused CUDA forward and backward kernels that iterate over two disjoint KV regions -- shared context and per-sequence response -- in a single kernel launch, and (2)~a data-pipeline redesign in veRL that repacks $N(P{+}R)$ tokens into $P{+}NR$ tokens per micro-batch, extending the token reduction from attention to the entire model by a factor $ρ= N(P{+}R)/(P{+}NR)$. DualKV is mathematically equivalent to standard attention and introduces no approximation. On Qwen3-8B GRPO training with 8$\times$H100 GPUs ($N{=}32$, 8K-context), DualKV achieves $1.63$--$2.09\times$ policy-update speedup, enables $2\times$ larger micro-batches, and raises MFU from $36\%$ to $76\%$. Similar gains hold for DAPO ($2.47\times$ speedup, $77\%$ MFU). At 30B MoE scale on 16$\times$H100, DualKV achieves $3.82\times$ policy-update and $3.38\times$ end-to-end step speedup over FlashAttention (which requires 4-way Ulysses sequence parallelism to avoid OOM).
- Abstract(参考訳): GRPOやDAPOといったモダンなRLポストトレーニングメソッドは、$R$トークンの共有プロンプトからサンプリングされた$R$トークンのレスポンスシーケンスをN$でトレーニングするが、標準のFlashAttentionは、すべての$P$プロンプトトークンを前方と後方の両方で複製する。
大きなロールアウトで長期のRLトレーニング(N{\geq}16$, $P{\geq}8\text{K}$)では、この冗長性がポリシー更新コストを支配している。
デコーダのみのモデルでは、因果マスキングは各レイヤのシーケンス間で即時表現を不変にするため、すべてのトーケン操作(ノーム、プロジェクション、MLP)と注意が、カーネルレベルでまだ利用されていないプロパティであるプロンプトを一度に処理できる。
In a single kernel launch, (2) a data-pipeline redesign in veRL that repacks $N(P{+}R)$ tokens into $P{+}NR$ tokens per micro-batch, extended the token reduction from attention to the model by a factor $ρ=N(P{+}R)/(P{+}NR)$$$$$。
DualKVは数学的には標準的な注意と等価であり、近似を導入しない。
Qwen3-8B 8$\times$H100 GPUs$N{=}32$, 8K-context)によるGRPOトレーニングでは、DualKVが1.63$-2.09\times$ Policy-update speedupを達成した。
DAPO(2.47\times$ speedup, 7.7\%$ MFU)も同様に上昇している。
16$\times$H100での30B MoEスケールでは、DualKVはポリシー更新で3.82ドル、FlashAttention上でのエンドツーエンドのステップスピードアップで3.38ドルを達成する(OOMを避けるには4ウェイのユリシーズシーケンス並列性が必要となる)。
関連論文リスト
- When Quantization Is Free: An int4 KV Cache That Outruns fp16 on Apple Silicon [0.0]
KVキャッシュ量子化は、品質-レイテンシトレードオフとしてフレーム化される。
Apple Siliconの統一メモリにインセンティブを与えています。
論文 参考訳(メタデータ) (2026-05-07T05:44:39Z) - Copy-as-Decode: Grammar-Constrained Parallel Prefill for LLM Editing [2.6382975801439836]
LLMは、入力中にほとんどのトークンが冗長に見える場合でも、全出力を自動回帰的に再生することでテキストとコードを編集する。
Copy-as-Decodeは、2プリミティブ文法上の構造化復号化として生成を再キャストする復号化機構である。
論文 参考訳(メタデータ) (2026-04-20T12:29:53Z) - RACER: Retrieval-Augmented Contextual Rapid Speculative Decoding [80.12789199134511]
大規模言語モデル(LLM)における自己回帰デコーディングは、ステップ毎に1つのトークンを生成し、高い推論遅延を引き起こす。
我々は,検索した正確なパターンとロジット駆動の将来の手がかりを統合する軽量でトレーニング不要な $textbfRACER を提案する。
Spec-Bench、HumanEval、MGSM-ZHの実験では、RACERは推論を継続的に加速し、自動回帰デコーディングよりも2倍以上のスピードアップを達成した。
論文 参考訳(メタデータ) (2026-04-16T11:23:55Z) - One Pass Streaming Algorithm for Super Long Token Attention
Approximation in Sublinear Space [11.735802740426294]
注意計算は、$O(n2)$の時間複雑性と$O(n2)$の空間複雑性を同時に行う。
ストリーミング方式で1パスのデータのみを読み取る新しいアルゴリズムを導入する。
特に,本アルゴリズムは,超長期トークンを用いたメモリ効率の優れた性能を示す。
論文 参考訳(メタデータ) (2023-11-24T18:35:00Z) - H$_2$O: Heavy-Hitter Oracle for Efficient Generative Inference of Large
Language Models [110.06476624089679]
メモリフットプリントを大幅に削減する新しいKVキャッシュの実装手法を提案する。
我々のアプローチは、トークンのごく一部が、注意点の計算において、ほとんどの価値に寄与する、という観察に基づいている。
我々は,最近のトークンとH$のバランスを動的に保持するKVキャッシュ消去ポリシーであるヘビーヒッター(H$O)を提案する。
論文 参考訳(メタデータ) (2023-06-24T20:11:14Z) - Near-Optimal Regret Bounds for Multi-batch Reinforcement Learning [54.806166861456035]
本研究では,有限水平マルコフ決定過程(MDP)によってモデル化されたエピソディック強化学習(RL)問題をバッチ数に制約を加えて検討する。
我々は,$tildeO(sqrtSAH3Kln (1/delta))$tildeO(cdot)をほぼ最適に後悔するアルゴリズムを設計し,$(S,A,H,K)$の対数項を$K$で隠蔽する。
技術的貢献は2つある: 1) 探索のためのほぼ最適設計スキーム
論文 参考訳(メタデータ) (2022-10-15T09:22:22Z) - Reward-Mixing MDPs with a Few Latent Contexts are Learnable [75.17357040707347]
報酬混合マルコフ決定過程(RMMDP)におけるエピソード強化学習の検討
我々のゴールは、そのようなモデルにおける時間段階の累積報酬をほぼ最大化する、ほぼ最適に近いポリシーを学ぶことである。
論文 参考訳(メタデータ) (2022-10-05T22:52:00Z) - On the Power of Multitask Representation Learning in Linear MDP [61.58929164172968]
本稿では,線形マルコフ決定過程(MDP)におけるマルチタスク表現学習の統計的メリットについて分析する。
簡単な最小二乗アルゴリズムが $tildeO(H2sqrtfrackappa MathcalC(Phi)2 kappa dNT+frackappa dn) というポリシーを学ぶことを証明した。
論文 参考訳(メタデータ) (2021-06-15T11:21:06Z)
関連論文リストは本サイト内にある論文のタイトル・アブストラクトから自動的に作成しています。
指定された論文の情報です。
本サイトの運営者は本サイト(すべての情報・翻訳含む)の品質を保証せず、本サイト(すべての情報・翻訳含む)を使用して発生したあらゆる結果について一切の責任を負いません。