resiliency

Implement fault-tolerant restarts and straggler detection for Megatron Bridge training.

Updated May 23, 2026
One-click install
npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill resiliency-yo-steven
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: resiliency
Source: https://github.com/yo-steven/skills-exploration-20260522/tree/main/skills/Megatron-Bridge/resiliency
Command: npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill resiliency-yo-steven

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Training jobs can hang, fail, or degrade silently due to rank faults, preemption, or stragglers, wasting expensive GPU time and complicating recovery.

Core Features & Use Cases

  • Fault tolerance for recoverable rank failures: Enables section-based timeouts, automatic restarts, and persisted timeout state (via ft_launcher and resiliency extensions).
  • NVRx straggler detection: Monitors GPU performance relative and individually over time to flag slow ranks and optionally stop training.
  • Preemption and restart mechanisms: Handles graceful shutdown for Slurm preemption and provides experimental in-process restart and re-run state-machine checks (NaN/spiky-loss attribution).

Quick Start

Enable fault tolerance by configuring FaultToleranceConfig in your Megatron Bridge training setup and launching with ft_launcher (not torchrun) using your rendezvous endpoint.

Frequently Asked Questions about resiliency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I recover distributed training from rank hangs or slow ranks?▼

Recover distributed training from rank hangs by configuring the resiliency extension in Megatron Bridge to enable section-based timeouts, fault-tolerant automatic restarts, and NVRx straggler detection.

How do I handle Slurm preemption during long-running GPU training jobs?▼

Handle Slurm preemption during long-running GPU training by using the resiliency extension's preemption mechanisms to ensure graceful shutdown and state persistence before the job is terminated.

How does straggler detection work for distributed training?▼

Straggler detection works by monitoring GPU performance individually and relative to other ranks over time to flag slow ranks, which can optionally trigger a training stop to prevent silent performance degradation.

Can I restart training in-process after a NaN loss or failure without relaunching the job?▼

Yes, you can restart training in-process after a failure using the experimental in-process restart and re-run state-machine checks to validate workflows and attribute NaN or spiky-loss issues.

Do I need to use torchrun to launch fault-tolerant distributed training?▼

No, you do not use torchrun; you must launch fault-tolerant distributed training using ft_launcher with appropriate environment variables, timeout constraints, and a configured rendezvous endpoint.

What are the limitations of experimental in-process restart for training recovery?▼

The limitation of experimental in-process restart is that it relies on state-machine checks for NaN and spiky-loss attribution, and requires specific ft_launcher environment variables and timeout configurations to execute safely.