nemo-automodel-recipe-development

Create and modify NeMo AutoModel training recipes using YAML configs and builder functions.

960|316|Updated May 21, 2025
One-click install
npx skills add https://github.com/NVIDIA-NeMo/Automodel --skill nemo-automodel-recipe-development-nvidia-nemo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nemo-automodel-recipe-development
Source: https://github.com/NVIDIA-NeMo/Automodel/tree/main/skills/nemo-automodel-recipe-development
Command: npx skills add https://github.com/NVIDIA-NeMo/Automodel --skill nemo-automodel-recipe-development-nvidia-nemo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers working with NeMo AutoModel often struggle to understand how training recipes are structured, how YAML _target_ fields map to Python callables, and where to configure validation, checkpointing, and distributed strategies. This Skill provides direct, actionable guidance for building and modifying recipes without digging through the entire repository. ## Core Features & Use Cases - Recipe Construction Guidance: Explains the recipe execution flow from CLI (automodel config.yaml) through BaseRecipe.setup() builders to the training loop, covering model, optimizer, dataloader, loss, LR scheduler, and checkpoint builders. - YAML Config Anatomy: Documents the full config structure including step_scheduler, distributed, _target_ callable patterns, and CLI overrides like --optimizer.lr. - Domain-Specific Recipes: Covers LLM finetuning/pretraining, knowledge distillation, VLM finetuning, diffusion training, and retrieval (bi-encoder/cross-encoder) recipes. - Pitfall Troubleshooting: Provides a table of common failures such as silent _target_ typos, batch size divisibility crashes, and checkpoint restore mismatches with concrete fixes. - Use Case: An ML engineer needs to add a new SFT recipe variant for a Llama model. The Skill tells them to copy the closest recipe under nemo_automodel/recipes/llm/, update the builders, add an example YAML, write a CPU-compatible unit test, and validate with automodel <config.yaml>. ## Quick Start Ask how to configure validation cadence and checkpointing in a NeMo AutoModel recipe YAML and receive the exact step_scheduler keys with a minimal config snippet.

Frequently Asked Questions about nemo-automodel-recipe-development

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

FAQPage Schema
How do I create a new NeMo AutoModel finetuning recipe?

Start from the closest existing recipe under nemo_automodel/recipes/, then update the model, dataset, optimizer, loss, LR scheduler, step scheduler, and checkpoint builders. Add an example YAML under examples/, register a recipe alias only if adding a new recipe class, and validate with a CPU-compatible unit test and automodel <config.yaml>.

How does the _target_ field work in AutoModel recipe YAML?

The _target_ key specifies a fully qualified Python callable, and all sibling keys in that section are passed as keyword arguments to it. For example, _target_: torch.optim.AdamW with lr: 2.0e-5 calls torch.optim.AdamW(lr=2e-5). Nested values can be overridden from the CLI with flags like --optimizer.lr.

Where do I configure validation and checkpointing in AutoModel recipes?

Set step_scheduler.val_check_interval for validation cadence and step_scheduler.checkpoint_interval for save cadence. The validation_dataset key builds the validation dataloader, restore_from.path resumes from a checkpoint, and checkpoints default to consolidated safetensors for Hugging Face ecosystem compatibility.

Does NeMo AutoModel support VLM and diffusion model recipes?

Yes. VLM recipes use NeMoAutoModelForImageTextToText with a processor section instead of a tokenizer, living in recipes/vlm/finetune.py. Diffusion recipes use NeMoAutoDiffusionPipeline with a parallel_scheme config and support only DDP and FSDP2 strategies.

Why does my AutoModel training crash at the first step?

The most common cause is global_batch_size not being divisible by local_batch_size * dp_size * grad_accumulation_steps. Verify the batch size math is consistent across all distributed dimensions before launching training.

When should I not use this recipe development skill?

Do not use it for standalone distributed strategy selection, cluster launcher configuration, or model architecture onboarding. It covers only how those choices appear inside an AutoModel recipe YAML, not infrastructure setup outside the recipe context.