vLLM、SkyRL の学習と推論の不一致を解消する「IsoExec」を発表
本文の状態
日本語全文を表示中
詳細モードで約18分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
vLLM Blog
vLLM は SkyRL において、トレーニングと推論エンジンの浮動小数点演算の不一致を解消する「IsoExec」を導入し、Qwen3.5-35B-A3B の学習でログ確率差を劇的に低減した。
AI深層分析を開く2026年8月21日 23:07
AI深層分析
キーポイント
トレーニングと推論のミスマッチ解消
異なるエンジン間での浮動小数点演算順序の違いによる確率分布の不一致を、統一された実行契約とモデルで排除する仕組みを提供する。
実行契約とユニファイドモデルの実装
vLLM と Megatron を組み合わせた SkyRL 環境で、ビットレベルでの整合性を保証する実行契約とカーネルを実装した。
並列性不変なカーネルの採用
テンソル、エキスパート、シーケンス並列性のどの構成においても数値計算が一致するように設計されたカーネルを採用している。
トレーニングと推論システムの不一致が学習を不安定化させる
異なるシステム間で使用するカーネルやバッチ形状の違いにより、同じモデルでも出力トークンの確率分布が異なり、REINFORCEやGRPOの安定性を損なう。
既存の手法は完全な解決に至っていない
ビットワイズ整合性の研究はあるものの、依然として2つのモデルコピーが必要であったり、特定のアーキテクチャに限定されるなど課題が残っている。
重要な引用
In practice, RL training systems often use two separate engines for rollout and training... those differences can change token probabilities even when executing the same policy.
IsoExec has two components: an execution contract that specifies and enforces the execution details affecting floating-point rounding across engines, and a unified model with aligned, batch-invariant kernels.
mismatch alone can destabilize REINFORCE and GRPO runs, distort advantage-weighted loss contributions before a KL estimator reacts
clipping discarded roughly 45% of tokens and reward collapsed around step 20, while a bitwise-aligned run had zero clipped tokens and remained stable
編集コメントを表示
編集コメント
強化学習の現場で長年悩まされてきた「数値的不整合」の問題に対し、システムレベルでの実用的な解決策を提示した点は評価できる。vLLM と Megatron の連携による技術的アプローチは、今後の大規模モデル学習基盤の標準化に寄与する可能性がある。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
TL;DR
理論上、オンポリシー強化学習(On-policy RL)では、ロールアウトと学習が同じ方策を評価すると仮定されています。しかし実際には、RL 学習システムはロールアウト用と学習用の 2 つの別々のエンジンを使用することが多く、モデル定義やカーネル、バッチ形状、並列化レイアウトなどが異なります。浮動小数点演算は非結合性であるため、同じ方策を実行していてもこれらの違いがトークン確率に影響を及ぼす可能性があります。このため、新しい RL アルゴリズムの導入、ハーンチスや環境の変更、RL インフラやハードウェアカーネルの改善などをデバッグすることが困難になります。
この問題を解決するため、私たちはIsoExecを導入しました。これは RL ワークロードにおける学習エンジンと推論エンジンのミスマッチを解消するためのクロスフレームワーク統合実行抽象化です。IsoExec は 2 つのコンポーネントで構成されています。1 つは、エンジン間で浮動小数点の丸め誤差に影響を与える実行詳細を指定し強制する実行契約(execution contract)です。もう 1 つは、学習とロールアウトの間でビット単位の整合性を保つよう調整されたバッチ不変カーネルを持つ統一モデル(unified model)です。
私たちは IsoExec を SkyRL に実装し、vLLM と Megatron と連携させました。8×H100 の 1 ノード上で同期 Qwen3.5-35B-A3B DAPO 学習を行う実験では、平均的なエンドツーエンドのロールアウトと学習におけるログ確率差を 0 に近づけることに成功しました。これは現在の SkyRL ベースラインと比較して 50 ステップで 25% のオーバーヘッドとなりました。
私たちの主な貢献は以下の通りです:
統一実行契約
トレーニングと推論の両方で単一の数値実行契約を採用することで、最小限のオーバーヘッドと低いデバッグコストで、新しい RL アルゴリズムや環境・ハッチの変更、カーネル改善においても、契約範囲内の不一致をゼロにします。
並列性不変なカーネルにより、テンソル、エキスパート、シーケンス並列性のいずれにおいても数値の整合性を維持します。
チャンクワイズ並列リカレント(CPR)ゲートドルトタネットは、長いシーケンスの順方向パスを直列化することなく、トレーニング、プリフィル、リカレントデコードの三者を整合させます。
イントロダクション
RL ワークロードでは、ロールアウト生成のためにポリシーを 2 回実行する必要があります。1 つはロールアウトエンジンがポリシー π 下でトークンをサンプリングする役割、もう 1 つはトレーニング側が同じモデルパラメータを用いてそのトークンの対数尤度を再計算する役割です。
同期 RL における典型的なオンポリシー学習では、π_train = π_inference(トレーニングと推論のポリシーが一致している)という前提が置かれます。しかし、システム視点から見ると、浮動小数点演算の非結合性により、真のオンポリシー学習を実現するのは困難です。
RL システムでは、Megatron や FSDP といったトレーニングシステム alongside vLLM や SGLang といった既存の推論システムを併用することが一般的です。これらのシステムは異なるワークロード向けに最適化されており、使用するカーネルやバッチ形状、実行モード(トレーニング、プリフィル、デコード)、分散レイアウトが異なります。その結果、同じ数値モデルを実行する際にも還元演算の順序が異なり、出力トークンの確率分布が異なる可能性があります。
ByteDance の VeXact 研究 では、トレーニングと推論の不一致(mismatch)が単独で REINFORCE や GRPO の学習を不安定化させ、KL エスティメータが反応する前にアドバンテージ加重損失の寄与を歪め、重要性サンプリングや拒否ベースの修正手法がキャリブレーションに敏感になることが示されています。また Fireworks のレポートによると、GLM-5.2 の実行においてトレーニングと推論の KL が約 0.013 の場合、クリッピングによってトークンの約 45% が棄却され、ステップ 20 付近で報酬が崩壊しました。一方、ビット単位で整合させた実行ではクリップされるトークンはゼロであり、安定した状態を維持していました。
システムの決定性に関する先行研究は、問題の一部に焦点を当ててきました。Thinking Machines はバッチ不変性を形式化し、特定の要素の計算にはバッチ内の他の要素やバッチサイズが影響しないことを示しました。また、vLLM × TorchTitan のビット単位の整合性に関する研究では、両方のエンジンに一致するカーネルを取り込むことで同等の性能を達成できることが示されましたが、依然として2 つのアライメントされたモデルコピーが必要でした。
より最近の研究である Zero Train–Inference Mismatch for Linear Attention and Async RL では、TorchTitan トレーナーと vLLM 生成器の間で 1 つのモデル定義を共有し、Gated DeltaNet にも同等性を拡張しました。この手法では、すべての順方向計算に再帰形式を使用しながら、逆方向にはチャンク化されたカーネルを保持しています。
また、Tree-Based Invariant Kernels (TBIK) は、異なる並列化構成下でのビット単位の整合性達成に注力した研究です。
IsoExec は、実行契約と統一モデルによってトレーニングと推論の不一致を解消します。実行契約は、カーネル実装や累積データ型、還元順序など丸め感応的な実行の詳細をフレームワークに依存しない形式で捉え、各ランタイムでこれを強制します。統一モデルは、トレーニング、プリフィル、デコード全体でビット単位の一貫性が検証されたカーネルを使用します。これは vLLM のエンジン機能(スケジューラ、KV キャッシュマネージャ、CUDA グラフキャプチャなど)や Megatron のトレーニングスタックと統合されます。
統一実行契約
IsoExec の中核は実行契約であり、両方のランタイムが同一に指定しなければならないビット関連の実行選択をすべて宣言します。
"ExecutionContract": {
"cases": [ ... ], // logprob computations: trainer_fwd, engine_decode, etc.
"composition": [ ... ], // (region, case) -> implementation + pinned constants
"claims": { ... }, // topology invariance, state invalidation, tolerances
"identities": { ... } // semantic / numerical_policy / deployment digests
}この契約は、トークンの logprob を計算する各処理をケース(例:ロールアウトの engine_prefill とトレーニング側の trainer_fwd)ごとに扱います。モデルのフォワード演算子は、複数の操作を融合しうる単一のカーネルによって実装される算術の連続であるリージョンに分割されます。すべての (リージョン, ケース) ペアについて、コンポジションが実装と固定される定数を選択します。この定数は、累積や境界データ型、split-K や split-KV のパーティション数などの還元分解パラメータなど、ビットを変化させる可能性のあるあらゆるパラメータを捉えます。各オペレータリージョンは、ケース間でビット単位で完全一致することを実証された後にのみ、コンポジションに登録されます。
例:
"composition": [
{
"region": ["gdn.core", "gdn.gating", "norms.l2"],
"cases": ["trainer_fwd", "trainer_fwd_no_autograd", "engine_prefill", "engine_decode"],
"impl": {"id": "native_fused_sigmoid", "version": 1, "arch": "sm90"}
},
{
"region": ["moe.combine"],
"cases": ["engine_prefill", "engine_decode"], // the trainer side is its own entry
"impl": {"id": "pik_leaf_tree", "version": 2, "arch": "sm90"},
"constants": {"leaves": 8, "leaf_dtype": "fp32"},
"discharge": {"kind": "equivalence_proof", "ref": "gates/ep_invariant_combine"} // proved equivalence
}
]「Claims(保証)」は、その構成要素の保証が成立する条件を明記し、実行時にこれらが強制されることを示します。例えば、トポロジーに関する保証では、リダクションツリーがビット単位で不変であることが証明されている並列サイズの一覧を記載します。カーネルのインストール時には、アダプターがランタイムの実際の並列サイズとこの一覧を照合し、証明されていないサイズに対しては導入を拒否します。
これらのIDは、シリアライズされた契約の SHA-256 ダイジェストであり、トレーナーとロールアウトエンジン間の契約合意を検証するために使用されます。semantic は、ランタイムが同じ論理モデルを記述していることを確認し、numerical_policy は数値結果に影響を与える可能性のあるすべての実行選択(実装やバージョンなど)を網羅します。一方、deployment はメモリサイズや転送設定のように、ビット列には影響しないことが証明されている設定を対象とし、これらは契約において一致させる必要はありません。
各カーネルは、ケース全体で指定された丸めスケジュールを維持するように事前に検証済みであり、semantic と numerical_policy のダイジェストが一致していること、さらにコントラクトアダプターによる強制がなされていることから、両側が対象領域において同じ検証済みの数値ポリシーを実行していることが確認できます。

各ランタイムごとに、コントラクトアダプターが契約と実装をインストールし、実行時に契約の遵守を強制します。このアダプターは、指定されたアテンションカーネルの選択など、フレームワークの拡張ポイントにすべての構成エントリをバインドします。その後、インストール済みのカーネル、宣言された契約、およびプロセス間アイデンティティのダイジェストを確認することで、実行時の状態を監視します。
統一モデル
SkyRL では、バッチ不変性を持つ GEMM、アテンション、正規化カーネルに加え、決定論的な MoE ルーティングと組み合わせを採用した統一されたモデル定義を導入しています。このモデルは、テンソル並列、エキスパート並列、シーケンス並列のすべての構成においてビットレベルで整合性が保たれ、GDN ハイブリッドアーキテクチャにはチャンクワイズ並列リカレントアルゴリズムを使用します。実験では、この抽象化を適用することで、密なモデル(MiMo-7B)、MLA MoE モデル(GLM-4.7-Flash)、ハイブリッドモデル(Qwen3.5-9B)、およびハイブリッド MoE モデル(Qwen3.5-35B-A3B)のトレーニング中に、契約に起因する不整合をゼロに達成しました。IsoExec の実装は https://github.com/zanderjiang/SkyRL-IsoExec で公開されています。
並列性不変なカーネル
トレーニングと推論では、異なる分散戦略が有効です。トレーナー側では、オプティマイザーの状態、活性化値、勾配、そして MoE モデルの場合は分散されたエキスパート重みを収める必要があります。一方、ロールアウトエンジン側では、デコードレイテンシを悪化させることなく、KV キャッシュのための十分なメモリ容量が必要となります。
固定された入力と重みを持つフォワードパスの数値計算において、6 つの主要な並列化軸が実行に与える影響は以下の通りです。
- データ並列化 (DP) はバッチ分割を変更しますが、バッチ不変なカーネルは各サンプルの数値を維持します。
- パイプライン並列化 (PP) は、境界のデータ型を固定した場合、層全体をデバイス間で移動させつつ、その還元演算(reductions)を分割しません。
- テンソル並列化 (TP) は、縮約還元を複数のランクに分割します。
- エキスパート並列化 (EP) はエキスパートの計算を分散し、エキスパート出力の結合方法を変更します。
- シーケンス並列化 (SP) は、アールリダクションからリデューススキャッターへと行方向の還元演算を変更します。
- コンテキスト並列化 (CP) は、シーケンス次元にわたってアテンションの還元を分割します。
TBIK は、行方向平行な GEMM とクロス GPU 間の還元全体でグローバルな還元ツリーを固定することで、TP に不変な推論を実現しました。IsoExec も同様に固定された還元というアイデアを採用していますが、これを K 次元に沿って適用します。GEMM の K タイル上でツリーを構築するのではなく、pik は K 次元を連続したリーフ(葉)に分割します。各リーフでは、FP32 加算を用いた決定論的な Tensor Core MMA を使用します。この契約により、ランクからリーフへのマッピングと二進演算のスケジュールが固定され、NCCL が部分的な結果を転送することで、カスタムの通信カーネルは不要となります。

Pik が並列化レイアウト間での数値精度を維持するために使用する、固定されたバイナリ削減ツリーについて。
さらに IsoExec はこの原則を EP(Expert Parallelism)と SP(Sequence Parallelism)にも適用しています。エキスパート並列化においては、ランク順序ではなく固定されたルーティング順序でエキスパートの出力を結合します。シーケンス並列化では、非 SP システムと同じ削減ツリーを再利用し、各ランクは完全な結果を集約するのではなく、独自の出力スライスを保持します。これにより、SP を有効にしても無効にしても、トレーニング時のロジットがビット単位で完全に一致します。
チャンク並列リカレント (CPR) GDN
線形アテンションアーキテクチャでは不整合の排除がより複雑になります。なぜなら、トレーニングと推論で異なるアルゴリズムを使用するためです。既存の GDN システムは、トレーニングとプリフィルにはチャンク並列形式を採用していますが、デコードにはリカレント形式を使用しています。数学的には同一であっても、これらのアルゴリズムは浮動小数点の丸め特性が異なります。
FLA の chunkwise-parallel kernel と vLLM の融合された recurrent kernel から得られる GDN レイヤー出力を比較したところ、要素ごとの平均絶対誤差は約 0.001、最大誤差は 0.25 であることが確認されました。
TorchTitan チームは、ロールアウトのプレフィルとトレーニング側の順次計算(フォワードパス)に再帰形式を適用し、逆伝播計算のみチャンク単位形式を採用することで、この課題に対処しました。これにより GDN におけるミスマッチは解消されましたが、その結果、ロールアウトのプレフィルとトレーニング側の順次計算がシーケンス長方向で直列化されてしまい、処理速度に悪影響を及ぼしています。彼らの報告によると、数学的なワークロードでは約 2〜3 倍、ターミナルエージェントのワークロードでは約 5 倍の遅延が発生し、このアプローチは完全なトレーニングジョブには実用的ではないことが示されています。
プレフィル、トレーニング、デコードのすべてで高いスループットを維持しつつ、契約範囲内のミスマッチを完全にゼロにするため、私たちは「チャンク並列再帰(CPR: chunkwise-parallel recurrent)」を設計しました。CPR は再帰処理を主機能として維持しつつ、チャンク単位で並列評価を行います。トレーニングとプレフィルにおいては、チャンク並列形式と同様に、まず各チャンクの境界点で再帰状態を計算するパスを実行し、続いて各チャンク内部の出力を並列再帰スキャンによって算出します。デコードでは再帰形式を採用しますが、隠れ状態はデコードされたトークン数ごとに(ここで はチャンクサイズです)再同期させます。これにより、プレフィル、トレーニング、デコード全体で一貫した丸めスケジュールが保証されます。
レイヤーごとのコスト:
| ステージ | 形状 | ネイティブ混合精度 | 全体でチャンクワイズ | 全体でリカレント | CPR |
|---|---|---|---|---|---|
| ビット単位完全一致 | — | なし | あり | あり | あり |
| トレーナー順伝播・逆伝播 | 1 × 10,240 トークン | 5.177 ms | 5.177 ms (1.00×) | 22.863 ms (4.42×) | 7.386 ms (1.43×) |
| ロールアウトエンジンプリフィル | 5 × 2,048 トークン | 0.844 ms | 0.844 ms (1.00×) | 3.639 ms (4.31×) | 1.412 ms (1.67×) |
| ロールアウトエンジンデコード | 256 シーケンス × 1 トークン | 0.0612 ms | 2.2374 ms (36.6×) | 0.0612 ms (1.00×) | 0.0846 ms (1.38×) |
H100 環境におけるレイヤー別レイテンシ。トレーニングとロールアウトエンジンでは、それぞれが本番環境で使用する TP(Tensor Parallelism)構成とカーネルを採用しています。各比率は、そのステージのネイティブな混合実装に対する相対値であり、数値が小さいほど優れています。
結果
実験では、単一の 8×H100 ノード上で IsoExec と SkyRL のネイティブスタックを比較しました。対象モデルは Qwen3.5-35B-A3B で、DAPO-Math-17k データセットを用いて同期型 RL(強化学習)でトレーニングを行いました。同等の環境設定において、IsoExec は最高スループットを実現する同期型 RL 構成(vLLM と Megatron を使用)におけるネイティブ SkyRL スタックと比較して、エンドツーエンドのオーバーヘッドが 25% でした。

50 ステップにわたる評価では、更新前のロールアウトとトレーニング間の平均絶対対数尤度差が減少し、標準偏差も低下しました。また、1 ステップあたりの最大値は 5.073 から減少しています。
Performance

同じ 50 ステップのウィンドウにおける平均ステップ時間は以下の通りです:
| 指標 | ネイティブ | IsoExec | オーバーヘッド |
|---|---|---|---|
| 生成 | 591.3 s | 776.6 s | 31.3% |
| ポリシー学習 | 498.6 s | 591.3 s | 18.6% |
| フル RL ステップ | 1224.6 s | 1534.0 s | 25.3% |
報酬

*Pass@16 と、ネイティブな SkyRL スタックと IsoExec の 50 ステップにおける生報酬。
この短い 50 ステップのランでは、トレーニングと推論のミスマッチを解消しても、有意な報酬の向上は観測されませんでした。
次のステップ
- Blackwell サポート
- コンテキスト並列化不変性
- スパースアテンション
- Block-FP8 MoE
謝辞
本稿は、Alexander Jiang と SkyRL チームによって執筆されました。有益な議論をいただいた Charlie Ruan、Sumanth Hegde、Eric Tang、Philipp Moritz、Yichuan Wang、Mayank Mishra、そして Lingxiao Ma に感謝いたします。
原文を表示
TL;DR
In theory, on-policy RL assumes that rollout and training evaluate the same policy. In practice, RL training systems often use two separate engines for rollout and training, with different model definitions, kernels, batch shapes, and parallelism layouts. Because floating-point arithmetic is non-associative, those differences can change token probabilities even when executing the same policy. This can make new RL algorithms, changes in harnesses and environments, and improvements to RL infrastructure and hardware kernels hard to debug.
To resolve this problem, we introduce IsoExec, a cross-framework unified execution abstraction for eliminating mismatch between the training and inference engines for RL workloads. IsoExec has two components: an execution contract that specifies and enforces the execution details affecting floating-point rounding across engines, and a unified model with aligned, batch-invariant kernels that are bitwise consistent across training and rollout. We implement IsoExec in SkyRL with vLLM and Megatron. On a single 8×H100 node, with synchronous Qwen3.5-35B-A3B DAPO training, we reduced the average end-to-end rollout-versus-training logprob difference below , with 25% overhead compared with the current SkyRL baseline over 50 steps.
Our main contributions are:
- Unified execution contract: One numerical execution contract across training and inference, enabling zero contract-covered mismatch with minimal overhead and low debugging cost for new RL algorithms, changes to RL environments and harnesses, and kernel improvements.
- Parallelism-invariant kernels: Preserve numerics across tensor, expert, and sequence parallelism.
- Chunkwise-parallel recurrent (CPR) Gated DeltaNet: Align training, prefill, and recurrent decode without serializing long-sequence forward passes.
はじめに
RL workloads require executing the same policy twice to generate rollouts (rollout engine) and train the policy (trainer). The rollout engine samples a token under policy ; the trainer later recomputes its log probability under policy using the same model parameters. Under synchronous RL, typical on-policy training assumes (no train–inference mismatch). From a systems perspective, true on-policy training is hard due to floating-point non-associativity:
RL systems often use existing inference systems such as vLLM and SGLang alongside training systems such as Megatron and FSDP. These systems are optimized for different workloads and use different kernels, batch shapes, execution modes (training, prefill, and decode), and distributed layouts. As a result, they can use different reduction orders when executing the same mathematical model, leading to different output token probability distributions.
ByteDance's VeXact study shows that mismatch alone can destabilize REINFORCE and GRPO runs, distort advantage-weighted loss contributions before a KL estimator reacts, and make importance-sampling or rejection-based fixes sensitive to calibration. Fireworks reports a GLM-5.2 run with train–inference KL around 0.013 where clipping discarded roughly 45% of tokens and reward collapsed around step 20, while a bitwise-aligned run had zero clipped tokens and remained stable.
Previous work on system determinism has focused on parts of the problem. Thinking Machines formalized batch invariance: neither the other elements in a batch nor the batch size should affect the computation for a specific element. The vLLM × TorchTitan bitwise-consistency work showed that importing matched kernels into both engines can reach parity, but still requires two aligned model copies. More recent work on Zero Train–Inference Mismatch for Linear Attention and Async RL shared one model definition between the TorchTitan trainer and vLLM generator and extended parity to Gated DeltaNet, using the recurrent form for all forward computations while retaining the chunked kernel for backward. Tree-Based Invariant Kernels (TBIK) focused on achieving bitwise consistency under different parallelism configurations.
IsoExec eliminates train–inference mismatch with an execution contract and unified model. The execution contract captures rounding-sensitive execution details (e.g., kernel implementation, accumulation dtype, reduction order) in a framework-independent form and enforces them in each runtime. The unified model uses kernels validated for bitwise consistency across training, prefill, and decode. It integrates with vLLM's engine features (e.g., its scheduler, KV cache manager, and CUDA graph capture) and Megatron's training stack.
Unified execution contract
IsoExec's core is the execution contract, which declares every bit-relevant execution choice that both runtimes must specify identically.
"ExecutionContract": {
"cases": [ ... ], // logprob computations: trainer_fwd, engine_decode, etc.
"composition": [ ... ], // (region, case) -> implementation + pinned constants
"claims": { ... }, // topology invariance, state invalidation, tolerances
"identities": { ... } // semantic / numerical_policy / deployment digests
}The contract handles each computation of a token's logprob by case (e.g., rollout engine_prefill and trainer trainer_fwd). The model's forward operators are partitioned into regions, spans of arithmetic implemented by one kernel that may fuse multiple operations. For every (region, case) pair, the composition selects the implementation and the constants it is pinned to. The constants capture any parameter that can change the bits, including accumulation and boundary dtypes and reduction-decomposition parameters such as split-K and split-KV partition counts. Every operator region is tested for bitwise exactness across cases before its implementations may be registered in the composition.
For example:
"composition": [
{
"region": ["gdn.core", "gdn.gating", "norms.l2"],
"cases": ["trainer_fwd", "trainer_fwd_no_autograd", "engine_prefill", "engine_decode"],
"impl": {"id": "native_fused_sigmoid", "version": 1, "arch": "sm90"}
},
{
"region": ["moe.combine"],
"cases": ["engine_prefill", "engine_decode"], // the trainer side is its own entry
"impl": {"id": "pik_leaf_tree", "version": 2, "arch": "sm90"},
"constants": {"leaves": 8, "leaf_dtype": "fp32"},
"discharge": {"kind": "equivalence_proof", "ref": "gates/ep_invariant_combine"} // proved equivalence
}
]Claims state the conditions under which the composition's guarantees hold and are enforced at runtime. For example, a topology claim lists the parallel sizes for which a reduction tree is proven bitwise invariant. When installing a kernel, the adapter compares the runtime's actual parallel size with that list and rejects an unproven size.
The identities are SHA-256 digests of the serialized contract, used to verify contract agreement between trainer and rollout engines. semantic verifies that the runtimes describe the same logical model, numerical_policy covers every execution choice that can affect numerical results (e.g., implementations and versions), and deployment covers settings proven not to affect the bits, such as memory sizing and transport configuration, which the contract does not require to match. Because every kernel admitted to the composition has been pre-validated to preserve the prescribed rounding schedule across cases, matching semantic and numerical_policy digests, together with contract-adapter enforcement, indicate that both sides are executing the same verified numerical policy across covered regions.

A per-runtime contract adapter installs the contract and implementations in each engine and enforces the contract at runtime. It binds every composition entry to the framework's extension points, such as selecting the specified attention kernel. It then monitors the runtime by checking installed kernels, declared claims, and cross-process identity digests.
Unified model
In SkyRL, we adopt a unified model definition consisting of batch-invariant GEMM, attention, and normalization kernels, along with deterministic MoE routing and combination. The model is also bitwise consistent across tensor-, expert-, and sequence-parallel configurations and uses a chunkwise-parallel recurrent algorithm for GDN hybrid architectures. In our experiments, we applied the abstraction to achieve zero contract-covered mismatch during training on dense (MiMo-7B), MLA MoE (GLM-4.7-Flash), hybrid (Qwen3.5-9B), and hybrid MoE (Qwen3.5-35B-A3B) models. The implementation of IsoExec is available at https://github.com/zanderjiang/SkyRL-IsoExec.
Parallelism-invariant kernels
Training and inference benefit from different distributed strategies. The trainer must fit optimizer state, activations, gradients, and, for MoE models, distributed expert weights. The rollout engine instead needs enough memory capacity for the KV cache without hurting decode latency.
For forward-pass numerics with fixed inputs and weights, the six common parallelism axes affect execution as follows:
- Data parallelism (DP) changes batch partitioning; batch-invariant kernels preserve each sample's numerics.
- Pipeline parallelism (PP) moves whole layers across devices without splitting their reductions when boundary dtypes are fixed.
- Tensor parallelism (TP) splits contraction reductions across ranks.
- Expert parallelism (EP) distributes expert computation and changes how expert outputs are combined.
- Sequence parallelism (SP) changes row-parallel reductions from all-reduce to reduce-scatter.
- Context parallelism (CP) splits the attention reduction across the sequence dimension.
TBIK achieved TP-invariant inference by fixing a global reduction tree across row-parallel GEMMs and the cross-GPU reduction. IsoExec takes the same fixed-reduction idea but applies it along the K dimension. Instead of building the tree over GEMM K-tiles, pik divides the K dimension into contiguous leaves. Each leaf uses deterministic Tensor Core MMA with FP32 accumulation. The contract fixes the rank-to-leaf mapping and binary arithmetic schedule, while NCCL transports partial results instead of requiring custom communication kernels.

Additionally, IsoExec applies the same principle to EP and SP. For expert parallelism, we combine expert outputs in a fixed routing order rather than rank order. For sequence parallelism, we reuse the same reduction tree as the non-SP system; each rank keeps its own output slice instead of gathering the full result. This makes trainer logits bitwise identical whether SP is enabled or disabled.
Chunkwise-parallel recurrent (CPR) GDN
Eliminating mismatch is more complex for linear-attention architectures because training and inference use different algorithms. Existing GDN systems use a chunkwise-parallel form for training and prefill but a recurrent form for decode. Although mathematically identical, the algorithms have different floating-point rounding characteristics. Comparing GDN layer outputs from FLA's chunkwise-parallel kernel with vLLM's fused recurrent kernel, we observed a mean per-element absolute difference of approximately and a maximum difference of 0.25.
Tthe TorchTitan team addressed this issue by using the recurrent form for both rollout prefill and the trainer's forward pass, and the chunkwise form only for backward computation. Although this removes mismatch for GDN, it makes rollout prefill and the trainer's forward pass serial in the sequence length. They report a slowdown of roughly 2–3× on math workloads and about 5× on a terminal-agent workload, making the approach impractical for full training jobs.
To ensure zero contract-covered mismatch while achieving high throughput for prefill, training, and decode, we designed chunkwise-parallel recurrent (CPR). CPR keeps the recurrence as the main function but evaluates it in parallel across chunks. For training and prefill, as in the chunkwise-parallel form, a first pass computes the recurrent state at every chunk boundary; a parallel recurrent scan then computes the outputs within each chunk. For decode, we use the recurrent form but resynchronize the hidden state every decoded tokens, where is the chunk size. This ensures a consistent rounding schedule across prefill, training, and decode.
Per-layer cost:
| Stage | Shape | Native mixed | Chunkwise everywhere | Recurrent everywhere | CPR |
|---|---|---|---|---|---|
| Bitwise exact | — | No | Yes | Yes | Yes |
| Trainer forward + backward | 1 × 10,240 tokens | 5.177 ms | 5.177 ms (1.00×) | 22.863 ms (4.42×) | 7.386 ms (1.43×) |
| Rollout-engine prefill | 5 × 2,048 tokens | 0.844 ms | 0.844 ms (1.00×) | 3.639 ms (4.31×) | 1.412 ms (1.67×) |
| Rollout-engine decode | 256 sequences × 1 token | 0.0612 ms | 2.2374 ms (36.6×) | 0.0612 ms (1.00×) | 0.0846 ms (1.38×) |
*Per-layer latency on H100 (). The trainer and rollout engine use their production TP layouts and kernels. Each ratio is relative to the native mixed implementation for that stage; smaller is better.*
結果
For our experiments, we compared IsoExec against SkyRL's native stack on a single 8×H100 node by training Qwen3.5-35B-A3B on DAPO-Math-17k with synchronous RL. With identical setups, IsoExec had 25% end-to-end overhead compared with the native SkyRL stack using vLLM and Megatron under the highest-throughput synchronous-RL configuration we evaluated.
Logprob diffs

Across 50 steps, the mean pre-update rollout-versus-training absolute logprob difference reduced from to , its standard deviation reduced from to , and the average per-step maximum reduced from 5.073 to .
Performance

The average step times over the same 50-step window were:
| Metric | Native | IsoExec | Overhead |
|---|---|---|---|
| Generation | 591.3 s | 776.6 s | 31.3% |
| Policy training | 498.6 s | 591.3 s | 18.6% |
| Full RL step | 1224.6 s | 1534.0 s | 25.3% |
Rewards

Over this short 50-step run, we did not observe a meaningful reward improvement from eliminating contract-covered train–inference mismatch.
Next steps
- Blackwell support
- Context parallelism invariance
- Sparse attention
- Block-FP8 MoE
Acknowledgements
This work was done by Alexander Jiang and the SkyRL team. Thanks to Charlie Ruan, Sumanth Hegde, Eric Tang, Philipp Moritz, Yichuan Wang, Mayank Mishra, and Lingxiao Ma for helpful discussions.
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み