Megatron Bridge
Megatron Bridge from NVIDIA-NeMo/Megatron-Bridge.
Skills in this plugin
21- ▌ Cicd · nvidia-nemo-megatron-bridgeCI/CD reference for Megatron Bridge — pipeline structure, commit and PR workflow, CI failure investigation, and common failure patterns.
- ▌ Testing · nvidia-nemo-megatron-bridgeTesting reference for Megatron Bridge — unit and functional test layout, tier semantics (L0/L1/L2/flaky), script conventions, running tests locally, adding/moving/disabling tests, and pytest conventions.
- ▌ Review Pr · nvidia-nemo-megatron-bridgeStructured single-agent code review workflow for PRs, commits, and local diffs. Use when asked to review code, understand a PR, rubber duck a change, prepare GitHub review comments, compare a change against Megatron Bridge conventions, or produce high-signal findings without subagents or tmux.
- ▌ Parity Testing · nvidia-nemo-megatron-bridgeStructured framework for exact HF↔MCore weight verification, forward-pass logit correlation, and optional strict numerical diagnostics. Use when debugging weight mismatches, verifying HF↔MCore checkpoint round-trips, choosing verification tools, or investigating conversion commits that caused parity failures. References existing tools and the add-model-support skill.
- ▌ Bump Dependency · nvidia-nemo-megatron-bridgeBump a pinned dependency (TransformerEngine, Megatron-LM, NRX, etc.), regenerate the lockfile, open a PR, and drive it to green by attaching a watchdog to the "CICD NeMo" workflow and quarantining failing functional tests as flaky until the run is green.
- ▌ Verl E2e Testing · nvidia-nemo-megatron-bridgeExternal verl end-to-end validation workflow for Megatron-Bridge changes. Covers running a small verl Megatron backend job from a Bridge checkout, choosing LoRA/DDP plus optional save/resume and parallelism variants, setting PYTHONPATH so verl imports the local Bridge tree, and reporting pass/fail evidence.
- ▌ Nemo Rl E2e Testing · nvidia-nemo-megatron-bridgeExternal NeMo-RL end-to-end validation workflow for Megatron-Bridge model/provider changes, including downstream compatibility checks, external RL lifecycle behavior, Megatron policy setup, HF import/export, checkpoint/resume, non-colocated vLLM refit, delta weight transfer, optional LoRA/generation variants, and questions such as "does this model work in NeMo-RL", "run NeMo-RL e2e", or "external RL loop validation". Covers running NeMo-RL Megatron policy jobs from a Bridge checkout, choosing GRPO/SFT/checkpoint/non-colocated refit variants, setting PYTHONPATH so NeMo-RL imports the local Bridge tree, and reporting pass/fail evidence.
- ▌ Adding Model Support · nvidia-nemo-megatron-bridge bundleGuide for adding support for new LLM or VLM models in Megatron-Bridge. Covers bridge, provider, recipe, tests, docs, and examples.
- ▌ Build And Dependency · nvidia-nemo-megatron-bridgeDev environment setup for Megatron Bridge — container-based development, uv package management, lockfile regeneration, adding dependencies, Slurm container usage, and common build pitfalls.
- ▌ Linting And Formatting · nvidia-nemo-megatron-bridgeCode style and quality rules for Megatron Bridge — ruff configuration, naming conventions, type hints, mypy rules, docstrings, copyright headers, logging, and the code review checklist.
- ▌ Nemo Mbridge Perf Cuda Graphs · nvidia-nemo-megatron-bridge bundleProfile, validate, and use CUDA graph capture in Megatron Bridge, including local full-iteration graphs and Transformer Engine scoped graphs. Covers replay evidence, matched eager A/Bs, model-specific scopes, regressions, and failures.
- ▌ Create Model Verification Card · nvidia-nemo-megatron-bridge bundleCreate or update concise, agent-readable Megatron Bridge model verification cards. Use when adding a model support card, auditing cross-model convergence comparability or verification coverage, recording conversion, deterministic inference, training, checkpoint resume, post-SFT export, performance, or weak-scaling results, or preparing a model-support PR. Enforce the required core inventory, convergence-versus-performance contracts, optional performance items, public Slurm launcher commands, training metrics, important-feature allowlist, and a strict privacy boundary that excludes private runtime wiring, internal paths, credentials, and job metadata.
- ▌ Nemo Mbridge Perf Memory Tuning · nvidia-nemo-megatron-bridge bundleTechniques for reducing peak GPU memory in Megatron Bridge, including expandable segments, PEFT plus sequence-parallel input re-gather, parallelism resizing, activation recompute, CPU offloading constraints, and common OOM fixes. Use for GPU OOMs, inadequate memory headroom, LoRA or PEFT activation pressure, memory fragmentation, and memory regressions.
- ▌ Nemo Mbridge Perf Nsys Analysis · nvidia-nemo-megatron-bridge bundleAnalyze NVIDIA Nsight Systems `.nsys-rep` and exported `.sqlite` traces for Megatron Bridge training. Use for single-trace diagnosis, before/after comparisons, multi-rank surveys, slow-rank and pipeline-stage analysis, MFU or step-time investigations, GPU busy/compute-absent accounting, communication overlap and rank-jitter analysis, CUDA launch starvation, CPU offload or memcpy investigations, source-level attribution, and evidence-backed gain estimates. Do not use as a substitute for Nsight Compute kernel roofline analysis.
- ▌ Nemo Mbridge Recipe Recommender · nvidia-nemo-megatron-bridge bundleRecommend and customize Megatron Bridge library and benchmark recipes for a user's model, GPU count, hardware, sequence length, and pretrain/SFT/PEFT goal. Use when selecting a starting recipe, comparing library and benchmark configs, resizing parallelism for a GPU allocation, or distinguishing convergence changes, semantics-preserving execution tuning, and benchmark-only shortcuts.
- ▌ Nemo Mbridge Perf Moe Vlm Training · nvidia-nemo-megatron-bridge bundlePractical guidance for training MoE VLMs in Megatron Bridge. Compares FSDP and 3D-parallel approaches, using rounded lessons from Qwen3-VL, Qwen3-Next, and other multimodal experiments.
- ▌ Nemo Mbridge Perf Vision Dp Over Cp · nvidia-nemo-megatron-bridge bundleOperational guide for sharding a VLM vision encoder across the language model's context-parallel ranks in Megatron-Bridge, including config knobs, code anchors, load-balance pitfalls, and measured impact.
- ▌ Nemo Mbridge Memory Snapshot Analysis · nvidia-nemo-megatron-bridge bundleAnalyze and compare PyTorch CUDA memory snapshots produced by Megatron Bridge's ProfilingConfig(record_memory_history=True). Replays the recorded allocation timeline to plot memory over time, compare two runs, and attribute peak memory to source code locations.
- ▌ Nemo Mbridge Perf Activation Recompute · nvidia-nemo-megatron-bridge bundleValidate and use selective and full activation recompute in Megatron Bridge to reduce GPU memory usage at the cost of extra compute. Use for activation memory OOMs or regressions involving recompute_granularity, recompute_num_layers, recompute_modules, recompute_method, selective recompute, full recompute, or activation checkpointing.
- ▌ Nemo Mbridge Perf Moe Dispatcher Selection · nvidia-nemo-megatron-bridge bundleSelect and validate an MoE token dispatcher (`alltoall`, DeepEP, or HybridEP) for a fixed workload and runtime. Covers backend availability, topology, matched A/B evidence, routing semantics, and failure diagnosis. Use when choosing a dispatcher or tracing a regression or crash to the MoE dispatcher configuration.
- ▌ Nemo Mbridge Perf Moe Optimization Workflow · nvidia-nemo-megatron-bridge bundleEvidence-gated workflow for MoE performance optimization in Megatron Bridge. Covers measurement contracts, the Three Walls framework, parallel folding, profiling, matched A/B tuning, and final validation. Use for full MoE throughput tuning or diagnosing a regression involving memory, communication, compute, or host/launch overhead.