nvidia avatar

Nemo Mbridge Mlm Bridge Training

This handles correlation testing between Megatron-LM and Megatron Bridge training runs, which matters when you need to verify that loss curves match after code changes or when translating MLM command-line arguments to Bridge recipe configs. It walks you through running both frameworks with identical hyperparameters (2 layer, 256 hidden, mock data) and checking that BF16 losses agree within rounding error. The multi-GPU examples show tensor parallelism setup for both sides. One thing that will save you time: it front-loads the gotchas like always nuking nemo_experiments before fresh runs because Bridge silently resumes from stale checkpoints, and remembering to set PYTHONPATH for MLM or nothing works.

skills.sh installs
1.9K
GitHub stars
3.9K
last updated
Aug 21, 2026

Install

$ npx -y skills add nvidia/skills --skill nemo-mbridge-mlm-bridge-training --agent claude-code

Installs into .claude/skills of the current project.

Files

MLM vs Bridge Training

For how they differ, the arg mapping tables, gotchas, and translation script, see:

  • @docs/megatron-lm-to-megatron-bridge.md

First Answer Checklist

For MLM-vs-Bridge correlation questions, always name these items up front:

  1. Bridge recipe: vanilla_gpt_pretrain_config.
  2. Bridge entry point: scripts/training/run_recipe.py.
  3. MLM entry point: 3rdparty/Megatron-LM/pretrain_gpt.py.
  4. Launch wrapper for both: uv run python -m torch.distributed.run.
  5. Fresh-run cleanup: rm -rf nemo_experiments before the Bridge run.

Also state that MLM needs PYTHONPATH=3rdparty/Megatron-LM:$PYTHONPATH, matched Bridge and MLM losses should agree within BF16 rounding, and files under 3rdparty/Megatron-LM/ should not be modified from this repo.

Correlation Testing

Use vanilla_gpt_pretrain_config for loss-correlation testing. This recipe uses bare GPTModelProvider defaults (LayerNorm, GeLU, learned_absolute position embeddings, vocab_size inherited from tokenizer) — matching MLM pretrain_gpt.py defaults with no args.

MLM Correlation Run (2L/256H, 1 GPU)

Sponsors

Details

Repository
github.com/nvidia/skills
Category
Testing & QA
First seen
Jul 14, 2026

More from nvidia/skills

All 236
1phuryn avatarshipping-artifactsphuryn/pm-skillsThe durable documentation set that makes an AI-built (vibe-coded) app reviewable before shipping. A small core every app needs — architecture, user/permission f1.8Kskills.sh installs
2github avatarcreating-oracle-to-postgres-migration-integration-testsgithub/awesome-copilotCreates integration test cases for .NET data access artifacts during Oracle-to-PostgreSQL database migrations. Generates DB-agnostic xUnit tests with determinis1.8Kskills.sh installs
3buildgreatproducts avatarbuild-loop-claude-codebuildgreatproducts/builder-osUse when building features with **Claude Code** in any codebase and the work should go through a disciplined build → review → test → fix loop. Triggers on "run 1.7Kskills.sh installs
4alirezarezvani avatarreviewalirezarezvani/claude-skillsReview Playwright tests for quality. Use when user says "review tests", "check test quality", "audit tests", "improve tests", "test code review", or "playwright1.7Kskills.sh installs
5kostja94 avatargoogle-adskostja94/marketing-skillsWhen the user wants to set up, optimize, or manage Google Ads campaigns. Also use when the user mentions "Google Ads," "Google Search Ads," "PPC," "SEM," "PMF t1.7Kskills.sh installs
6alirezarezvani avatarfixalirezarezvani/claude-skillsFix failing or flaky Playwright tests. Use when user says "fix test", "flaky test", "test failing", "debug test", "test broken", "test passes sometimes", or "in1.6Kskills.sh installs