PyTorch Monarch を AMD GPU に導入:ROCm 上での単一コントローラー分散トレーニング
PyTorch Monarch のシングルコントローラー分散トレーニング技術が AMD Instinct GPU と ROCm に移植され、大規模 LLM 学習における障害耐性と信頼性が大幅に向上した。
キーポイント
AMD GPU への PyTorch Monarch ポート完了
PyTorch の次世代ランタイム「Monarch」が CUDA に依存しない環境として AMD Instinct GPU と ROCm で動作可能となり、ハードウェアエコシステムが拡大した。
従来のチェックポイント方式の課題克服
大規模学習で一般的な定期チェックポイント方式は I/O 帯域を消費し計算リソースを浪費するが、Monarch は動的な障害回復によりこの非効率性を解消する。
シングルコントローラーによる高信頼性分散トレーニング
数百〜数千 GPU を使用する環境でも、単一コントローラーで管理しつつノード障害時にジョブを停止せずに動的に回復させるアーキテクチャを実現している。
大規模クラスターでの実証実績
1024 GPU の MI325 クラスターで DeepSeekV3-671B を学習する際、96.16%のスケーリング効率を達成し、スケール時の信頼性が実証された。
ROCmへのPortingと統合
hipify_torchを使用したCUDAからHIPへの変換、RCCLとの連携、およびRust層での互換性シェイム実装により、AMD Instinct GPU (MI300/MI355) 上でMonarchの完全な機能(アクターランタイム、RDMA、フォールトトレランス)が利用可能になった。
チェックポイントレスな動的回復
従来の全ジョブ再起動に代わり、故障したノードのみをローカルで再起動し、健全なノードから状態を転送する「ピアチェックポイント転送」により、トレーニングの中断を最小限に抑えつつ大規模クラスタでの障害回復を実現している。
SLURMとKubernetes両環境での実証
128 GPU (MI300) および 256 GPU (MI355) の大規模クラスタにおいて、頻繁な故障を注入しても損失曲線が安定して収束し、健全なノードが継続してトレーニングを続行できることが実証された。
重要な引用
Training state-of-the-art large language models (LLMs) with billions of parameters requires distributed training across hundreds or thousands of GPUs.
While our previous work demonstrated near-linear scaling of FP8 training at scale... the key challenge remains: reliability at scale.
To address these challenges, we have brought PyTorch Monarch to AMD Instinct GPUs with ROCm, expanding the single-controller model beyond CUDA environments.
By bringing PyTorch Monarch to AMD Instinct GPUs with ROCm, we have demonstrated a practical approach to fault-tolerant distributed training that minimizes wasted computation and maximizes GPU utilization.
The entire recovery process completes without any manual intervention, without full checkpoint restarts, and with minimal disruption to the overall training throughput.
影響分析・編集コメントを表示
影響分析
このニュースは、大規模 AI インフラの信頼性課題に対する根本的な解決策を提示しており、特に AMD ユーザーにとって PyTorch の最新機能を活用できる重要な転換点です。従来のチェックポイント依存モデルから脱却し、ハードウェア障害を前提とした「エラスティック(弾力的)な」トレーニング環境が実用化されることで、大規模 LLM 開発の継続コストとリスクが大幅に低下すると期待されます。
編集コメント
CUDA エコシステムの独占状態を打破し、大規模学習の信頼性向上に寄与する技術的突破です。特に AMD GPU を活用する研究機関や企業にとって、運用コスト削減と安定稼働を実現する決定的なツールとなり得ます。
**
Featured projects
-
数十億のパラメータを持つ最先端の大規模言語モデル(LLM)をトレーニングするには、数百から数千の GPU にわたる分散トレーニングが必要です。このスケールでは、ハードウェア障害は例外ではなく当然のこととして想定されます。単一の GPU メモリエラー、ネットワーク分断、またはノードクラッシュが、数日あるいは数週間進行していたトレーニング全体を停止させる可能性があります。私たちの 以前の研究 では、FP8 トレーニングのスケールにおけるほぼ線形なスケーリング(DeepSeekV3-671B モデルを用いた 1024-GPU の MI325 クラスターで 96.16% のスケーリング効率を達成)を示しましたが、依然として残る最大の課題は、スケールにおける信頼性です。
これらの課題に対処するため、私たちは PyTorch Monarch を AMD Instinct GPU と ROCm に持ち込み、単一コントローラーモデルを CUDA 環境を超えて拡張し、この新興ランタイムをより広範なハードウェアエコシステムに導入しました。
本ブログでは、PyTorch Monarch のアーキテクチャを探求し、Monarch の GPU ランタイムと分散通信スタックを ROCm に移植するために必要なエンジニアリングの取り組みを紹介するとともに、システムがトレーニングジョブ全体を停止させることなくノード障害からどのように動的に回復するかを実演します。最後に読了する頃には、Monarch が AMD GPU 上で弾力的で耐故障性の高い分散トレーニングを可能にする仕組みと、これが安定した大規模 AI インフラへの重要な一歩となる理由を理解いただけるでしょう。
The Challenge: Reliability at Scale
従来のフォールトトレランス戦略は、定期的なチェックポイントに大きく依存しています。これは、一定間隔ごとにモデルの完全な状態を永続ストレージに保存する手法です。障害が発生した場合、ジョブは最後のチェックポイントから完全に再起動されます。概念的には単純ですが、このアプローチには重大な欠点があります。
課題**
影響
チェックポイントのオーバーヘッド
数百ギガバイトのモデル状態をストレージに書き込むには時間と I/O バンド幅を消費します。
計算資源の浪費
障害発生時、最後のチェックポイント以降のすべての進捗が失われます。
クラスターのアイドル化
障害が発生したノードの交換とジョブの再起動中、クラスター全体がアイドル状態になります。
スケーラビリティの限界
クラスター規模が大きくなるほど、任意のチェックポイント間隔中に障害が発生する確率が高まります。
真に大規模なトレーニングにおいては、単にスケールするだけでは不十分です。トレーニングは障害からの回復も可能でなければなりません。健全なノードがトレーニングを継続しながら、障害が発生したノードが回復して再参加し、計算資源の浪費を最小化し GPU 利用率を最大化できるような、より動的なアプローチが必要です。ここで登場するのが PyTorch Monarch です。
PyTorch Monarch とは何か?
PyTorch Monarch は、開発者が単一の Python プログラムから GPU クラスター全体をオーケストレーションすることを可能にする新しい分散プログラミングのパラダイムを導入します。アクターベースのランタイム、プロセスメッシュ抽象化、非同期実行モデルにより、大規模な分散トレーニングが簡素化され、トレーニング、評価、強化学習を組み合わせた複雑なワークフローを単一の統合スクリプト内で実現できるようになります。
このアーキテクチャは複数の異なるレベルで動作します:
- Python API: 開発者が単純な Python コードを書くことで分散 GPU 実行を実現するための単一プログラムインターフェースです。
- Monarch Runtime: アクターとメッシュ、監視ツリー、テンソルシャードを管理します。
- Rust Runtime (Tokio): 高性能とメモリの安全性を保証します。
- インフラストラクチャ: RDMA、RCCL/NCCL、SLURM、Kubernetes、SkyPilot と統合されます。

*図 1: Python API を Rust ランタイムおよびインフラストラクチャから分離した PyTorch Monarch のアーキテクチャ。*
各トレーニングレプリカ内で使用される並列化戦略と、レプリカ間で使用されるフォールトトレランス機構を分離することで、Monarch はよりクリーンなフォールトトレランスモデルを提供します。障害は隔離されます(アクターはプライベート状態を持ち、クラッシュが伝播しない)、階層的です(可能な限り低いレベルで処理され)、回復は高速です(ローカル再起動では数秒、エスカレートした場合でも数分)。

*図2:Monarchの階層的障害処理モデルと監視ツリー。*
ROCmへのMonarch移植:エコシステム統合
MonarchをAMD GPUに持ち込むには、GPUランタイムと分散通信スタックをROCmへ移植するために多大なエンジニアリング努力が必要でした。
私たちは3つの主要な移植パスを成功裏に実装しました:
- 集合通信:hipify_torchを使用して、CUDAからHIPへのC++ブリッジコードを変換し、NCCLのAPIと同等であるRCCLに対してリンクを行いました。
- GPUメモリ管理:ビルドシステムを拡張してプラットフォームを自動検出し、CUDAドライバAPI呼び出しを対応するHIPの等价物にルーティングしました。
- RDMA統合:GPU_PLATFORM=rocmを設定することで、libibverbsベースのRDMAパスを維持しつつ、GPU直接転送のためのGPU側のバインディングをCUDAからHIPへ切り替えました。

*図3:hipify_torchと自動検出によるCUDAからROCmへのMonarch移植。*
さらに、移植を形作り、より詳細な検討に値する2つの横断的な課題がありました:
-HIPランタイムの静的リンクなし:NVIDIAはlibcudart_static.aを提供しているため、CUDAパスではcudart_staticを直接リンクします。ROCmにはlibamdhip64の静的同等品が提供されていないため、ROCmビルドではamdhip64を動的にリンクします。両プラットフォームとも、hipMemCreate、cuMemCreate、および関連する呼び出しを含むGPUドライバAPI関数をdlopenしており、どちら側でもランタイム契約は同一に保たれています。
- フォークしたバインディングの代わりに Rust の互換性シャドウを追加:hipify_torch が C/C++ ヘッダーを書き換えた後、bindgen は hipError_t、hipDeviceptr_t、hipStream_t といった HIP 名付けられた型を生成します。各 Rust の呼び出し箇所で #ifdef ブランチを追加するのではなく、nccl-sys と rdmaxcel-sys に rocm_compat モジュールを追加し、HIP シンボルを CUDA 名の下で再エクスポートしました。例えば pub type cudaError_t = hipError_t や pub use hipSetDevice as cudaSetDevice のようにしています。残りの Rust コードはプラットフォーム非依存のままです。
これらの取り組みの結果、Rust における HIP 型エイリアスが導入され、1,171 件のテストがすべてパスし、ROCm 7.0+ に対する完全なサポートが保証されました。これらの貢献はオープンソースコミュニティにアップストリームされました(PR #2393 および PR #2891 を参照)。
今日、ROCm 上の Monarch は、Actor ランタイム、RDMA、Supervision、Tensor シャーディングを含む完全なエコシステムサポートを提供しています。SLURM(HPC)、Kubernetes(クラウドネイティブ)、SkyPilot(マルチクラウド)上でシームレスに動作し、TorchTitan(トレーニングエンジン)や TorchFT(フォールトトレランス)のような下流のエンジンがプロダクションワークロードで利用可能になります。
ケーススタディ:大規模なフォールトトレラントトレーニング
AMD GPU 上での Monarch の能力を実証するため、TorchTitan と TorchFT を統合し、レジリエントでチェックポイントレスな分散トレーニングアーキテクチャを構築しました。
アーキテクチャ概要
このアーキテクチャは 3 つのレイヤーで構成されています:
- Monarch:オーケストレーターとして機能し、プロセスおよびクラスターの調整を管理します。ReplicaActor と Lighthouse サービスを起動し、GPU を Process Mesh として整理します。
- TorchFT:ステップレベルでのフォールトトレランス(耐障害性)を担当します。Lighthouse に連絡してクォーラム調整を行い、Quorum AllReduce を実行し、失敗したノードをスキップします。
- TorchTitan:トレーニングエンジンとして機能し、順伝播(FSDP)、逆伝播、およびオプティマイザステップを実行するとともに、チェックポイントとメトリクスの管理を行います。
*
image*
*図 4:Monarch、TorchFT、TorchTitan を統合した AMD GPU 上の回復力のあるトレーニングスタック。
この構成において、Monarch は微細な障害検出と隔離のための監視ツリーを提供します。トレーニングアクターに障害が注入されると、Lighthouse によって検知され、TorchFT によって処理されます。健全なレプリカは、ピアの障害に関わらず、グローバルな中断を必要とせずに独立してトレーニングを継続します。
ダイナミックな障害回復ワークフロー
4 つのレプリカグループを持つ具体的なシナリオを通じて、回復ワークフローを理解してみましょう。
- 通常トレーニング:OrchestrationManager は 4 つの ReplicaActor(Monarch 監視役)と Lighthouse を起動します。各 ReplicaActor は、TorchTitan トレーナーを実行する 8 つの GPU プロセスを持つ Replica を起動します。すべての 4 つのレプリカが準備完了し(quorum_id=1)、DiLoCo グラデーション同期は 20 ステップごとに発生します。
- 障害検出:Replica 0 の GPU プロセスがクラッシュしました。Monarch スーパーバイザーは、プロセスが終了する前に report_training_error(完全なトレースバック付き)をキャプチャします。Replica 1, 2, および 3 は影響を受けないとしてマークされ、トレーニングを継続します。
- ローカル再起動:ReplicaActor 0 がインプレース再起動 (_stop_and_restart()) を開始し、古いプロセスメッシュを停止して新しいものを生成します。その間、他の 3 つのレプリカは同期(quorum_id=2)を続けます。
- ピアチェックポイント転送:Lighthouse は Replica 1 をドナーとして選択しました。Replica 1 から回復中の Replica 0 へ、ピアチェックポイント転送(モデル、オプティマイザー、スケジューラー、およびトレーナの状態)が開始されます。新しいクォーラムが形成される間、すべてのレプリカはクォーラム境界で一時的に一時停止します。
- トレーニングの再開:Replica 0 が同期されると、4 つのレプリカすべてを含む新しいクォーラム(quorum_id=3)が確立され、DiLoCo の同期が再開されます。

*図 5:グローバルチェックポイントの再読み込みなしにピアチェックポイントを転送する動的障害回復ワークフローを示すもの。
この回復プロセス全体は、手動介入を必要とせず、フルチェックポイントからの再起動も行わず、全体のトレーニングスループットへの影響も最小限で完了します。
パフォーマンス特性
本アプローチは、AMD Instinct MI300 クラスのクラスターを使用した SLURM および Kubernetes 環境の両方で検証しました。
SLURM 16 ノード MI300 クラスター(128 GPU)
16 ノードの SLURM クラスター(MI300 GPU を合計 128 基搭載)上で Llama 3 8B モデルをトレーニングし、180 秒ごとに RCCL の障害を注入し、20 ステップごとにクォラム同期を行いました。その結果は目覚ましいものでした:
- 注入された障害により、アクティブなワーカー数は動的に変動しました(8 から 16 の間)。
- 頻繁な障害が発生してもトレーニングはシームレスに継続され、完全な再起行はありませんでした。
- ロス曲線は着実な収束を示し、障害注入を行わないベースライン実行とほぼ一致していました。

*図 6: 16 ノードの SLURM MI300 クラスター上で頻繁な障害が発生してもトレーニングは継続されます。30 分以上にわたりレプリカがダウンした例は一度もなく、回復は迅速であり、異なるレプリカが動的に終了・回復されていることがわかります。
Kubernetes 32 ノード MI355 クラスター(GPU 256 基)
実験を 32 ノードの Kubernetes クラスター(MI355 GPU を合計 256 基搭載)にスケールしました。参加者の数は非常に安定しており、回復イベント中もわずかに変動するものの 30 から 32 の範囲で推移し、グローバル平均ロスは 12 から約 4 まで滑らかに減少しました。これは、Monarch のフォールトトレランスモデルが、SLURM および Kubernetes の両方で大規模環境において信頼性を持って機能することを示しています。

*図 7: 32 ノードの Kubernetes MI355 クラスターにおける安定した回復と滑らかなロス収束。
まとめと今後の方向性*
大規模な AI モデルのトレーニングには、単なる計算能力の提供だけでなく、 inevitable なハードウェア障害を優雅に処理できる回復力のあるインフラストラクチャが求められます。PyTorch Monarch を ROCm 上で AMD Instinct GPU に導入することで、計算資源の浪費を最小化し、GPU の利用率を最大化する、実用的なフォールトトレラント分散トレーニングのアプローチを実証しました。
この統合は、AMD GPU 上での大規模トレーニングにおいていくつかの重要な成果をもたらします:
- AMD ハードウェアにおける初の大規模検証: TorchTitan および TorchFT とともに Monarch を AMD GPU で正常にデプロイし、ROCm ソフトウェアスタックが高度なフォールトトレランス機構を完全にサポートしていることを示しました。
- 洗練されたフォールトトレランスモデル: Monarch は堅牢な監視ツリーとプロセスメッシュ抽象化を提供し、障害を分離して迅速なローカル回復を可能にします。
- エコシステムの準備完了: このアプローチは SLURM と Kubernetes の両方でシームレスに動作し、本番環境のワークロードに対応できる状態です。
主要なアーキテクチャ上の洞察は、Monarch のアクターベースランタイムと監視ツリーを用いて障害を分離し、TorchFT のクォーラムベース同期によって健全なノードがトレーニングを継続できるようにすることにあります。AMD GPU 上で大規模トレーニングワークロードを実行するチームにとって、この統合はより安定し、効率的でコスト効果の高いモデル開発への道筋を提供します。
今後のステップとして以下を検討しています:
- NIC サポートの拡張とランタイムパフォーマンスの向上
- ROCm 上でより多くの事前トレーニングおよび強化学習 (RL) フレームワークをサポートするために Monarch を拡張します。
- 障害耐性性能をさらに最適化し、特に再参加時のリロードレイテンシの短縮と、回復処理と計算処理の並列実行を実現します。
- PyTorch コミュニティとのオープンソース協力を継続していきます。
追加リソース
- PyTorch Monarch GitHub リポジトリ
- TorchTitan ドキュメンテーション
- TorchFT GitHub リポジトリ
- AMD GPU 上での TorchFT と TorchTitan の統合による耐障害性大規模トレーニング
免責事項
サードパーティ製コンテンツは、その所有権を持つ第三者から直接ライセンス供与されるものであり、AMD からライセンス供与されるものではありません。すべてのリンクされたサードパーティ製コンテンツは、「現状有姿」で提供され、いかなる種類の保証も付与されません。そのようなサードパーティ製コンテンツの利用は、利用者の独自の判断に基づいて行われるものであり、いかなる状況下においても AMD が利用者に対してサードパーティ製コンテンツについて責任を負うことはありません。利用者はすべてのリスクを引き受け、サードパーティ製コンテンツの使用によって生じる可能性のある損害について単独で責任を負います。
*© 2026 Advanced Micro Devices, Inc.*
原文を表示
**
Featured projects
-
Training state-of-the-art large language models (LLMs) with billions of parameters requires distributed training across hundreds or thousands of GPUs. At this scale, hardware failures are not exceptional events—they are expected. A single GPU memory error, network partition, or node crash can bring down an entire training run that has been progressing for days or weeks. While our previous work demonstrated near-linear scaling of FP8 training at scale (achieving 96.16% scaling efficiency on a 1024-GPU MI325 cluster with DeepSeekV3-671B), the key challenge remains: reliability at scale.
To address these challenges, we have brought PyTorch Monarch to AMD Instinct GPUs with ROCm, expanding the single-controller model beyond CUDA environments and bringing this emerging runtime to a broader hardware ecosystem.
In this blog, we will explore the architecture of PyTorch Monarch, walk through the engineering effort required to port Monarch’s GPU runtime and distributed communication stack to ROCm, and demonstrate how the system dynamically recovers from node failures without halting the entire training job. By the end, you will understand how Monarch enables elastic, fault-tolerant distributed training on AMD GPUs and why this represents a significant step toward stable, large-scale AI infrastructure.
The Challenge: Reliability at Scale
Traditional fault-tolerance strategies rely heavily on periodic checkpointing: saving the full model state to persistent storage at regular intervals. When a failure occurs, the entire job restarts from the last checkpoint. While conceptually simple, this approach has significant drawbacks.
Challenge**
Impact
Checkpoint overhead
Writing hundreds of gigabytes of model state to storage consumes time and I/O bandwidth.
Wasted computation
All progress since the last checkpoint is lost upon failure.
Cluster idle time
The entire cluster sits idle while the failed node is replaced and the job restarts.
Scalability limits
As cluster size grows, the probability of failure during any checkpoint interval increases.
For truly large-scale training, scaling is not enough—training must also recover from failures. We need a more dynamic approach, one that allows healthy nodes to continue training while failed nodes recover and rejoin, minimizing wasted computation and maximizing GPU utilization. This is where PyTorch Monarch comes in.
What is PyTorch Monarch?
PyTorch Monarch introduces a new distributed programming paradigm that enables developers to orchestrate entire GPU clusters from a single Python program. With its actor-based runtime, process mesh abstraction, and asynchronous execution model, Monarch simplifies large-scale distributed training and enables complex workflows that combine training, evaluation, and reinforcement learning within one unified script.
The architecture operates at multiple distinct levels:
- Python API: A single-program interface where developers write simple Python code to get distributed GPU execution.
- Monarch Runtime: Manages actors and meshes, supervision trees, and tensor sharding.
- Rust Runtime (Tokio): Ensures high performance and memory safety.
- Infrastructure: Integrates with RDMA, RCCL/NCCL, SLURM, Kubernetes, and SkyPilot.

*Figure 1: PyTorch Monarch architecture decoupling Python API from the Rust runtime and infrastructure.*
By decoupling the parallelism strategy used within each training replica from the fault-tolerance mechanism used across replicas, Monarch provides a cleaner fault-tolerance model. Failures are isolated (actors have private state, crashes do not propagate), hierarchical (handled at the lowest possible level), and recovery is fast (seconds for local restart, minutes only if escalated).

*Figure 2: Monarch’s hierarchical fault-handling model and supervision tree.*
Porting Monarch to ROCm: Ecosystem Integration
Bringing Monarch to AMD GPUs required significant engineering effort to port the GPU runtime and distributed communication stack to ROCm.
We successfully implemented three main porting paths:
- Collective Communications: We used hipify_torch to convert the C++ bridge code from CUDA to HIP and linked against RCCL, which mirrors NCCL’s API.
- GPU Memory Management: We extended the build system to auto-detect the platform and route CUDA driver API calls through their HIP equivalents.
- RDMA Integration: Configuring GPU_PLATFORM=rocm keeps the libibverbs-based RDMA path intact while swapping the GPU-side bindings from CUDA to HIP for GPU-direct transfers.

*Figure 3: Porting Monarch from CUDA to ROCm via hipify_torch and auto-detection.*
Moreover, two cross-cutting issues shaped the port and deserve a closer look:
- No static link for the HIP runtime: NVIDIA ships libcudart_static.a, so the CUDA path links cudart_static directly. ROCm ships no static equivalent for libamdhip64, so the ROCm build links amdhip64 dynamically. Both platforms additionally dlopen the GPU driver API functions, including hipMemCreate, cuMemCreate, and related calls, keeping the runtime contract identical on either side.
- Rust compatibility shim instead of forking the bindings: Once hipify_torch rewrites the C/C++ headers, bindgen emits HIP-named types such as hipError_t, hipDeviceptr_t, and hipStream_t. Rather than add #ifdef branches at every Rust call site, we added a rocm_compat module in nccl-sys and rdmaxcel-sys that re-exports HIP symbols under their CUDA names, for example pub type cudaError_t = hipError_t and pub use hipSetDevice as cudaSetDevice. The rest of the Rust code stays platform-agnostic.
These efforts culminated in the introduction of HIP type aliases in Rust, with all 1,171 tests passing, ensuring full support for ROCm 7.0+. We have upstreamed these contributions to the open-source community (see PR #2393 and PR #2891).
Today, Monarch on ROCm provides full ecosystem support, including the Actor runtime, RDMA, Supervision, and Tensor sharding. It runs seamlessly on SLURM (HPC), Kubernetes (Cloud native), and SkyPilot (Multi-cloud), enabling downstream engines like TorchTitan (Training engine) and TorchFT (Fault tolerance) for production workloads.
Case Study: Fault-Tolerant Training at Scale
To demonstrate the power of Monarch on AMD GPUs, we integrated it with TorchTitan and TorchFT to build a resilient, checkpoint-less distributed training architecture.
Architecture Overview
The architecture consists of three layers:
- Monarch: Acts as the orchestrator, managing process and cluster orchestration. It spawns ReplicaActors and a Lighthouse service, organizing GPUs into Process Meshes.
- TorchFT: Handles fault tolerance at the step level. It contacts the Lighthouse for quorum coordination, performs Quorum AllReduce, and skips failed nodes.
- TorchTitan: Serves as the training engine, executing the Forward (FSDP), Backward, and Optimizer steps, while managing checkpoints and metrics.
*

*
*Figure 4: The resilient training stack on AMD GPUs integrating Monarch, TorchFT, and TorchTitan.*
In this setup, Monarch provides a supervision tree for fine-grained fault detection and isolation. When a failure is injected into the training actors, it is detected by the Lighthouse and handled by TorchFT. The healthy replicas continue training independently despite peer failures, without requiring a global interruption.
Dynamic Fault Recovery Workflow
Let us walk through a concrete scenario with four replica groups to understand the recovery workflow.
- Normal Training: The OrchestrationManager spawns 4 ReplicaActors (Monarch Supervisors) and a Lighthouse. Each ReplicaActor spawns a Replica with 8 GPU processes running TorchTitan trainers. All 4 replicas are ready (quorum_id=1) and DiLoCo gradient synchronization occurs every 20 steps.
- Failure Detection: A GPU process in Replica 0 crashes. The Monarch supervisor captures the report_training_error (with full traceback) before the process dies. Replicas 1, 2, and 3 are marked as unaffected and continue training.
- Local Restart: ReplicaActor 0 initiates an in-place restart (_stop_and_restart()), stopping the old process mesh and spawning a new one. Meanwhile, the other 3 replicas continue syncing (quorum_id=2)
- Peer Checkpoint Transfer: The Lighthouse selects Replica 1 as the donor. A peer checkpoint transfer (model, optimizer, scheduler, and trainer state) is initiated from Replica 1 to the recovering Replica 0. All replicas pause briefly at the quorum boundary while the new quorum forms.
- Resumed Training: Once Replica 0 is synced, the new quorum (quorum_id=3) is established with all 4 replicas, and DiLoCo synchronization resumes.

*Figure 5: Dynamic fault recovery workflow demonstrating peer checkpoint transfer without global checkpoint reload.*
The entire recovery process completes without any manual intervention, without full checkpoint restarts, and with minimal disruption to the overall training throughput.
Performance Characteristics
We validated this approach on both SLURM and Kubernetes environments using AMD Instinct MI300-class clusters.
SLURM 16-Node MI300 Cluster (128 GPUs)
We trained a Llama 3 8B model on a 16-node SLURM cluster (totaling 128 MI300 GPUs), injecting RCCL failures every 180 seconds with a quorum sync every 20 steps. The results were remarkable:
- The number of active workers fluctuated dynamically (between 8 and 16) due to the injected failures.
- Training continued seamlessly despite frequent failures—there was no full restart.
- The loss curve showed steady convergence, closely matching the baseline run without failure injection.

*Figure 6: Training continues despite frequent failures on a 16-node SLURM MI300 cluster. Note that not a single replica was down for 30+ minutes; recovery was fast, and different replicas were killed and recovered dynamically.*
Kubernetes 32-Node MI355 Cluster (256 GPUs)
We scaled the experiment to a 32-node Kubernetes cluster (totaling 256 MI355 GPUs). The number of participants remained highly stable (fluctuating slightly between 30 and 32 during recovery events), and the global average loss decreased smoothly from 12 to approximately 4. This demonstrates that the Monarch fault-tolerance model works reliably on both SLURM and Kubernetes at scale.

*Figure 7: Stable recovery and smooth loss convergence on a 32-node Kubernetes MI355 cluster.*
Summary and Future Directions
Training large AI models at scale requires more than raw computational power—it demands resilient infrastructure that can gracefully handle the inevitable hardware failures. By bringing PyTorch Monarch to AMD Instinct GPUs with ROCm, we have demonstrated a practical approach to fault-tolerant distributed training that minimizes wasted computation and maximizes GPU utilization.
This integration represents several significant achievements for large-scale training on AMD GPUs:
- First large-scale validation on AMD hardware: We successfully deployed Monarch with TorchTitan and TorchFT on AMD GPUs, demonstrating that the ROCm software stack fully supports advanced fault-tolerance mechanisms.
- Cleaner fault-tolerance model: Monarch provides a robust supervision tree and process mesh abstraction, isolating failures and enabling rapid local recovery.
- Ecosystem readiness: The approach works seamlessly across SLURM and Kubernetes, making it ready for production workloads.
The key architectural insight is the use of Monarch’s actor-based runtime and supervision trees to isolate failures, combined with TorchFT’s quorum-based synchronization to allow healthy nodes to continue training. For teams running large-scale training workloads on AMD GPUs, this integration offers a path toward more stable, efficient, and cost-effective model development.
Looking ahead, our next steps include:
- Extending NIC support and improving runtime performance.
- Expanding Monarch to support more pre-training and reinforcement learning (RL) frameworks on ROCm.
- Further optimizing fault tolerance performance, specifically reducing rejoin reload latency and overlapping recovery with compute.
- Continuing our open-source collaboration with the PyTorch community.
Additional Resources
- PyTorch Monarch GitHub Repository
- TorchTitan Documentation
- TorchFT GitHub Repository
- Resilient Large-Scale Training: Integrating TorchFT with TorchTitan on AMD GPUs
Disclaimers
Third-party content is licensed to you directly by the third party that owns the content and is not licensed to you by AMD. ALL LINKED THIRD-PARTY CONTENT IS PROVIDED “AS IS” WITHOUT A WARRANTY OF ANY KIND. USE OF SUCH THIRD-PARTY CONTENT IS DONE AT YOUR SOLE DISCRETION AND UNDER NO CIRCUMSTANCES WILL AMD BE LIABLE TO YOU FOR ANY THIRD-PARTY CONTENT. YOU ASSUME ALL RISK AND ARE SOLELY RESPONSIBLE FOR ANY DAMAGES THAT MAY ARISE FROM YOUR USE OF THIRD-PARTY CONTENT.
*© 2026 Advanced Micro Devices, Inc.*
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み