nemo-mbridge-multi-node-slurm

Convert single-node Megatron Bridge scripts into multi-node Slurm sbatch workflows.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/sayalinvidia/sayali-skills-test --skill nemo-mbridge-multi-node-slurm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nemo-mbridge-multi-node-slurm
Source: https://github.com/sayalinvidia/sayali-skills-test/tree/main/skills/Megatron-Bridge/nemo-mbridge-multi-node-slurm
Command: npx skills add https://github.com/sayalinvidia/sayali-skills-test --skill nemo-mbridge-multi-node-slurm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Convert single-node Megatron Bridge scripts into scalable multi-node Slurm sbatch workflows with Enroot container support, enabling reliable distributed execution and easier debugging of cross-node failures.

Core Features & Use Cases

  • Provides two main launch patterns: srun-native (preferred) and uv run torch.distributed (legacy), with guidance on when to use each.
  • Automates the two-phase launch workflow that populates a shared cache before full multi-node execution.
  • Derives distributed variables (RANK, WORLD_SIZE, LOCAL_RANK, MASTER_ADDR, MASTER_PORT) from SLURM environment, minimizing manual configuration.
  • Enforces shared filesystem and container mounts for repo, data, logs, HF_HOME, UV_CACHE_DIR, and NEMO_HOME to ensure consistency across nodes.
  • Includes template references and examples for sbatch headers, TRAIN_CMD composition, and logging conventions to simplify deployment.
  • Quick-start path and debugging best practices for common multi-node failures, NCCL timeouts, and OOM scenarios.

Quick Start

Submit a multi-node Slurm job using the Bridge templates and follow the two-phase srun pattern.

Frequently Asked Questions about nemo-mbridge-multi-node-slurm

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

FAQPage Schema
How do I scale a single-node training script to a multi-node Slurm sbatch workflow?

To scale single-node scripts to a multi-node Slurm sbatch workflow, you convert them using a two-phase launch pattern that populates a shared cache before full distributed execution. This automatically derives distributed variables from the Slurm environment to minimize manual configuration.

Why does my multi-node distributed training hang with NCCL timeouts across nodes?

NCCL timeouts across nodes during multi-node distributed training often occur due to misconfigured network rendezvous or missing shared filesystem mounts. Enforcing shared storage for logs and caches, alongside proper SLURM rendezvous variables, resolves these cross-node communication failures.

Do I need a shared filesystem to run distributed training jobs on a GPU cluster with Slurm?

Yes, a shared filesystem is required for multi-node Slurm distributed training. You must mount shared storage for repos, data, logs, HF_HOME, UV_CACHE_DIR, and NEMO_HOME to ensure consistency and prevent synchronization failures across all nodes.

What is the two-phase srun pattern for launching multi-node Megatron Bridge training?

The two-phase srun pattern is a launch workflow that populates a shared cache before full multi-node execution. It is the preferred launch method for scalable Megatron Bridge scripts, ensuring reliable distributed execution and easier debugging of cross-node failures.

Can I use Enroot containers with multi-node Slurm jobs for distributed training?

Yes, you can use Enroot containers with multi-node Slurm jobs. The conversion process includes Enroot container support, enforcing necessary container mounts for repo, data, and logs to ensure consistent execution across the GPU cluster.

What is the best way to configure RANK and WORLD_SIZE variables for a distributed training sbatch job?

The best way to configure RANK and WORLD_SIZE for a distributed training sbatch job is to derive them directly from the SLURM environment. This approach automatically extracts distributed variables like LOCAL_RANK, MASTER_ADDR, and MASTER_PORT, minimizing manual configuration errors.