Megatron-Bridge
Train and convert large AI models across GPU clusters
Instructs the AI agent to always load the relevant SKILL.md before answering, follow a strict read-then-invoke-then-implement workflow, and respect boundaries like never editing the Megatron-LM submodule or committing secrets.
All Skills in This Repository (53)
Pure Emerald Level Indicatorsperf-sequence-packing
Configure PackedSequenceSpecs for sequence packing in model training.
perf-moe-vlm-training
Guide MoE vision-language model training with parallelism strategy comparisons.
perf-activation-recompute
Recompute transformer activations to reduce GPU memory usage during training.
perf-moe-dispatcher-selection
Select optimal MoE token dispatchers based on hardware and model size.
perf-moe-optimization-workflow
Optimize MoE model training throughput by addressing memory, communication, and compute bottlenecks.
adding-model-support
Add language or multimodal models to Megatron-Bridge via config analysis and custom weight mapping.
perf-parallelism-strategies
Select and configure parallelism strategies for large-scale model training in Megatron Bridge.
perf-tp-dp-comm-overlap
Configure TP, DP, and PP communication overlap in Megatron-Bridge training.
linting-and-formatting
Enforce Python and shell script style rules with ruff, isort, and pre-commit.
cicd
Diagnose CI/CD failures by locating logs and detecting failure patterns.
testing
Organize, execute, and manage unit and functional tests for Megatron Bridge.
perf-expert-parallel-overlap
Validates and tunes expert-parallel communication overlap for Megatron-Bridge MoE training on GPU clusters.
Frequently Asked Questions
FAQPage SchemaHow to install Megatron-Bridge?βΌ
Run `npx skills add NVIDIA-NeMo/Megatron-Bridge --all -g -y` in your terminal to install all skills in this suite globally.
What does Megatron-Bridge do?βΌ
It converts Hugging Face model checkpoints into NVIDIA Megatron-Core format and back, then runs pretraining, SFT, and LoRA fine-tuning at large GPU scale. The skills guide agents through conversion, training, and performance tuning.
How to fix GPU out-of-memory errors in Megatron training?βΌ
The memory tuning skill recommends setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True first, since most OOMs come from fragmentation, not capacity. Further skills cover activation recompute, CPU offloading, and parallelism resizing.
How to scale training across multiple nodes with Slurm?βΌ
The multi-node Slurm skill converts single-node scripts into sbatch jobs using the srun-native launch pattern, with shared filesystem paths and NCCL timeout debugging steps. Megatron-Bridge derives rank and world size from Slurm variables automatically.
Does Megatron-Bridge work with Claude Code and other AI agents?βΌ
Yes. The AGENTS.md orchestrator and SKILL.md files follow the open agent-skills standard, so Claude Code, Codex, and compatible agents can load the right guide for each training or conversion task.
Related Repositories in Software Engineering
View All in Software Engineeringβopenclaw
Run a personal AI assistant across your devices and chat apps
superpowers
Gives coding agents a disciplined workflow from idea to merged code
react
AI agent skills for building, testing, and porting React core