Recommend and customize Megatron Bridge recipes for a user's model, GPU count, and training goal. Indexes library recipes (pretrain/SFT/PEFT) and performance recipes.
This NVIDIA skill recommends and customizes Megatron-Bridge training recipes based on a user's model, GPU count and type, and training goal. It solves the cold-start problem of picking a good starting training configuration by indexing every shipped recipe (library recipes for functional pretrain/SFT/PEFT training and performance recipes for throughput benchmarks) and mapping a user's requirements to the right one.
The skill follows a simple workflow: gather model name/size, GPU count and type, training goal, and sequence length, then look up the best-match recipe, recommend its function name and entry-point command, and give adjustment advice. It draws a clear line between library recipes (under src/megatron/bridge/recipes/, run via run_recipe.py) meant for real training and performance recipes (under scripts/performance/) that use mock data and should not be presented as production configs. It documents entry-point commands for pretrain with mock data, SFT with real data, and CLI field overrides, and explains why recipes are Python functions rather than YAML (explicit, greppable, composable). It also encodes essential resizing rules: tensor parallelism must divide num_key_value_heads, keep TP within a node unless using NVL72-class interconnect, enable sequence parallelism when TP is greater than 1, configure context parallelism for long context, data parallelism is implicit, and reduce micro batch size first on out-of-memory. It is Apache-2.0 licensed with published evaluations.
It targets ML engineers choosing a starting config for a training run and needing sane parallelism defaults and pitfall avoidance. Use cases include picking a recipe for a given model and GPU budget, running a first smoke test, and adjusting parallelism for a target hardware shape. It produces shell commands, configuration guidance, and analysis only.
The model name and size, GPU count and type, training goal (pretrain, SFT, or PEFT), and sequence length if non-default.
Library recipes are for functional training and run via run_recipe.py; performance recipes use mock data for upper-bound throughput benchmarks and should not be presented as production training recipes.
The llama3_8b_sft_config recipe with mock data via the llm-pretrain-mock dataset, rather than an SFT data path, unless an SFT data path is specifically requested.
TP must divide num_key_value_heads, keep TP within one node unless using NVL72-class interconnect, enable SP when TP is greater than 1, configure CP for long context, DP is implicit, and reduce micro_batch_size first on OOM.
Previous YAML approaches split recipe logic across indirection layers and were not self-contained; Python functions are explicit, greppable, and composable.
Quick Setup:
.claude/skills/Repository
nvidia/skills