[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M789XERBNZKTPAV3HKP60HRX":3,"skill-same:01M789XERBNZKTPAV3HKP60HRX":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M789XERBNZKTPAV3HKP60HRX","nemo-automodel-recipe-development",null,"Create and modify NeMo AutoModel training and evaluation recipes, including YAML structure, builders, and execution flow.","Solizardking\u002Fskillhub-main","Solizardking","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F108096810?v=4","01M786KDB10AYV042N0F9BD5B5","Clawd","01M786NYYXSZK1D05WM8JQPC48",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-automodel-recipe-development\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nemo-automodel-recipe-development\ndescription: Create and modify NeMo AutoModel training and evaluation recipes, including YAML structure, builders, and execution flow.\nwhen_to_use: Creating or modifying training, SFT, or eval recipes, adding new YAML config fields, debugging recipe construction or trainer issues, or understanding the recipe execution flow.\nlicense: Apache-2.0\nmetadata:\n  author: NVIDIA\n  tags:\n    - nemo-automodel\n    - recipe-development\n---\n\n# NeMo AutoModel Recipe Development\n\u003C!-- NVSkills signature refresh requested for AM-519. -->\n\n## Instructions\n\nFor recipe questions, answer with the smallest complete path to action:\n\n1. Name the relevant recipe file or YAML section.\n2. List the builder functions or config keys involved.\n3. Include a minimal YAML or command example when the question asks how to\n   configure something.\n4. End with a local validation command or tiny CPU-compatible test.\n\nFor conceptual recipe questions, answer from this skill without inspecting the\nrepository or loading other AutoModel skills unless the user asks you to edit\nfiles. Keep the response focused on recipe YAML, builders, CLI routing, tests,\nand local validation.\n\nUse these compact answer patterns for common questions:\n\n- New finetuning recipe variant: start from the closest file under\n  `nemo_automodel\u002Frecipes\u002F`, update the model, dataset or dataloader,\n  optimizer, loss, LR scheduler, step scheduler, and checkpoint builders,\n  register a CLI route only if adding a command or domain alias, add example\n  YAML under `examples\u002F`, then add a tiny CPU-compatible unit test and run\n  `automodel finetune llm -c \u003Cconfig.yaml>`.\n- `_target_` fields: describe `_target_` as the fully qualified Python callable,\n  explain that sibling keys become keyword arguments, show optimizer and dataset\n  examples, and mention nested CLI overrides such as `--optimizer.lr`.\n- Validation and checkpointing: name `step_scheduler.val_check_interval`,\n  `step_scheduler.checkpoint_interval`, `validation_dataset`,\n  `restore_from.path`, and consolidated safetensors; include the minimal YAML\n  snippet from this skill.\n\nFor validation and checkpointing, always name:\n\n- `step_scheduler.val_check_interval` for validation cadence.\n- `step_scheduler.checkpoint_interval` for save cadence.\n- `validation_dataset` as the validation dataloader source.\n- `restore_from.path` for resume.\n- Consolidated safetensors as the default checkpoint format for HF ecosystem\n  compatibility.\n\n## Routing Boundary\n\nUse this skill for recipe construction and execution-flow questions: YAML\nstructure, `_target_` callables, builder functions, validation datasets,\ncheckpoint configuration, CLI route registration, and recipe-specific tests.\n\nDo not use this skill for standalone distributed strategy selection, cluster\nlauncher configuration, or model architecture onboarding unless the user is\nasking how those choices appear inside an AutoModel recipe YAML.\n\n## Recipe Architecture\n\n### Execution Flow\n\n```\nCLI (automodel finetune llm -c config.yaml)\n  -> app.py parses command + domain + config\n    -> recipe script (e.g. train_ft.py) main(config_path)\n      -> Recipe class .setup() builds all components\n        -> .run_train_validation_loop() executes training\n```\n\n### Recipe Class\n\nRecipes inherit from `BaseRecipe` and implement two methods:\n\n- `setup()` -- builds model, optimizer, dataloader, loss, LR scheduler, step scheduler, and checkpoint config via builder functions.\n- `run_train_validation_loop()` -- executes the training and validation loop.\n\n### Builder Pattern\n\nAll components are constructed through dedicated builder functions:\n\n- `build_model()` -- instantiates the model from config\n- `build_optimizer()` -- creates optimizer (AdamW, etc.)\n- `build_dataloader()` -- sets up train and validation dataloaders\n- `build_loss_module()` -- creates the loss function\n- `build_lr_scheduler()` -- creates the learning rate scheduler\n- `build_step_scheduler()` -- creates the step scheduler controlling training progression\n- `CheckpointingConfig` -- configures checkpointing (built directly from the YAML `checkpoint:` block via `RecipeConfig.checkpoint`)\n\n### Infrastructure Application Order\n\nComponents are applied in this strict order after building:\n\n1. PEFT (LoRA, etc.)\n2. FP8 quantization\n3. QAT (quantization-aware training)\n4. Checkpoint load \u002F restore\n5. Parameter freezing\n6. Sharding (FSDP2, Megatron-FSDP, DDP)\n7. Device placement\n8. `torch.compile`\n9. Context parallelism hooks\n\n## YAML Config Anatomy\n\nA complete recipe config follows this structure:\n\n```yaml\nstep_scheduler:\n  max_steps: 1000\n  num_epochs: 1\n  grad_accumulation_steps: 4\n  val_check_interval: 100\n  checkpoint_interval: 500\n  log_interval: 10\n\ndist_env:\n  master_addr: localhost\n  master_port: 29500\n\nrng:\n  seed: 42\n\nmodel:\n  _target_: nemo_automodel.models.llm.NemotronHForCausalLM\n  name_or_path: meta-llama\u002FLlama-3.2-1B\n  # additional model kwargs passed to the constructor\n\ncompile:\n  enabled: false\n  backend: inductor\n\nclip_grad_norm:\n  max_norm: 1.0\n\ndistributed:\n  strategy: fsdp2       # fsdp2 | megatron_fsdp | ddp\n  dp_size: auto\n  tp_size: 1\n  cp_size: 1\n\nloss_fn:\n  _target_: torch.nn.CrossEntropyLoss\n\ndataset:\n  _target_: nemo_automodel.datasets.squad.SquadDataset\n  tokenizer_name_or_path: meta-llama\u002FLlama-3.2-1B\n  max_seq_length: 2048\n\nvalidation_dataset:\n  _target_: nemo_automodel.datasets.squad.SquadDataset\n  split: validation\n\npacked_sequence:\n  enabled: false\n\ndataloader:\n  batch_size: 4\n  num_workers: 4\n  pin_memory: true\n\noptimizer:\n  _target_: torch.optim.AdamW\n  lr: 2.0e-5\n  weight_decay: 0.01\n\nlr_scheduler:\n  _target_: nemo_automodel.schedulers.CosineAnnealingWarmup\n  warmup_steps: 50\n  min_lr: 1.0e-6\n```\n\n### The `_target_` Pattern\n\nThe `_target_` key specifies a fully qualified Python callable. All remaining keys in that section are passed as keyword arguments:\n\n```yaml\noptimizer:\n  _target_: torch.optim.AdamW   # callable\n  lr: 2.0e-5                    # kwarg\n  weight_decay: 0.01            # kwarg\n```\n\nThis is equivalent to: `torch.optim.AdamW(lr=2e-5, weight_decay=0.01)`.\n\n### CLI Overrides\n\nAny config value can be overridden from the command line:\n\n```bash\nautomodel finetune llm -c config.yaml \\\n  --optimizer.lr 1e-4 \\\n  --step_scheduler.max_steps 500 \\\n  --distributed.tp_size 2\n```\n\n## Examples\n\nValidation and checkpointing:\n\n```yaml\nstep_scheduler:\n  val_check_interval: 100\n  checkpoint_interval: 500\n\nvalidation_dataset:\n  _target_: nemo_automodel.datasets.squad.SquadDataset\n  split: validation\n\nrestore_from:\n  path: \u002Fcheckpoints\u002Fstep-500\n```\n\n## Domain-Specific Notes\n\n### LLM\n\n- `nemo_automodel\u002Frecipes\u002Fllm\u002Ftrain_ft.py` handles both finetuning and pretraining. The distinction is in the config (dataset, learning rate, etc.).\n- `nemo_automodel\u002Frecipes\u002Fllm\u002Fkd.py` implements knowledge distillation with a teacher and student model.\n- `nemo_automodel\u002Frecipes\u002Fllm\u002Fbenchmark.py` runs throughput and latency benchmarks.\n\n### VLM\n\n- Uses `NeMoAutoModelForImageTextToText` instead of causal LM classes.\n- Config includes a `processor` section instead of a standalone tokenizer.\n- Recipe lives in `nemo_automodel\u002Frecipes\u002Fvlm\u002Ffinetune.py`.\n\n### Diffusion\n\n- Uses `NeMoAutoDiffusionPipeline`.\n- Requires a `parallel_scheme` dict in config to define parallelism.\n- Only supports DDP and FSDP2 strategies (no Megatron-FSDP).\n- Recipe lives in `nemo_automodel\u002Frecipes\u002Fdiffusion\u002Ftrain.py`.\n\n### Retrieval\n\n- Two encoder patterns:\n  - **Bi-encoder** (`nemo_automodel\u002Frecipes\u002Fretrieval\u002Ftrain_bi_encoder.py`): separate query and document encoders, contrastive loss.\n  - **Cross-encoder** (`nemo_automodel\u002Frecipes\u002Fretrieval\u002Ftrain_cross_encoder.py`): joint encoding, classification head.\n- Hard negative mining: `nemo_automodel\u002Frecipes\u002Fretrieval\u002Fmine_hard_negatives.py`.\n\n## Training Loop Details\n\nThe training loop follows this structure per epoch:\n\n```\nfor epoch in range(num_epochs):\n    for batch_idx in range(batches_per_epoch):\n        # --- gradient accumulation inner loop ---\n        for micro_batch in micro_batches:\n            if pipeline_parallel:\n                schedule.step(micro_batch)    # PP schedule\n            else:\n                loss = model(micro_batch)     # direct forward\n                loss.backward()\n\n        # --- optimizer step ---\n        scale_grads_and_clip_grad_norm(model, max_norm)\n        optimizer.step()\n        lr_scheduler.step()\n        optimizer.zero_grad()\n\n        # --- logging ---\n        MetricsSample(step, epoch, loss, grad_norm, lr, mem, tps, mfu)\n\n        # --- validation (at configured intervals) ---\n        if step % val_check_interval == 0:\n            run_validation()\n\n        # --- checkpoint (at configured intervals) ---\n        if step % checkpoint_interval == 0:\n            save_checkpoint()\n```\n\n### StepScheduler\n\nControls all training progression: total epochs, total steps, gradient accumulation steps, validation interval, checkpoint interval, and logging interval.\n\n### Gradient Clipping\n\nApplied via `scale_grads_and_clip_grad_norm()` after the backward pass and before the optimizer step. Controlled by `clip_grad_norm.max_norm` in config.\n\n### Context Parallelism\n\nWhen `cp_size > 1`, batches are split across the context-parallel group using `make_cp_batch_and_ctx()`. This must happen before the forward pass.\n\n### MetricsSample\n\nEach training step produces a `MetricsSample` with fields:\n\n- `step` -- global step count\n- `epoch` -- current epoch\n- `loss` -- training loss\n- `grad_norm` -- gradient norm after clipping\n- `lr` -- current learning rate\n- `mem` -- GPU memory usage\n- `tps` -- tokens per second\n- `mfu` -- model FLOPS utilization\n\n## Validation & Checkpointing\n\n### Validation\n\n- Runs at intervals defined by `step_scheduler.val_check_interval`.\n- Uses the validation dataloader built from `validation_dataset` config.\n- Model is set to eval mode; gradients are disabled.\n\n### Checkpointing\n\n- Default format: consolidated safetensors for easy deployment on HF ecosystem (always prefer this over DCP).\n- Checkpoint interval controlled by `step_scheduler.checkpoint_interval`.\n- Resume training via the `restore_from` config key pointing to a checkpoint directory.\n\n```yaml\nrestore_from:\n  path: \u002Fcheckpoints\u002Fstep-500\n```\n\n## Pitfalls\n\n| Problem | Cause | Fix |\n|---|---|---|\n| Silent config errors | Typo in `_target_` value | The class path must be a valid, importable Python callable. Double-check the module path and class name. |\n| Training crashes at first step | `global_batch_size` not divisible by `local_batch_size * dp_size * grad_accumulation_steps` | Ensure the batch size math is consistent across all dimensions. |\n| New recipe not accessible via CLI | Missing CLI command alias registration | Register the new route in the CLI app so `automodel \u003Ccommand> \u003Cdomain>` resolves correctly. |\n| Shape mismatch at forward pass | Dataset collate function output does not match model input signature | Verify that the collate function returns tensors with the keys and shapes the model expects. |\n| OOM during validation | Validation batch size too large or gradients not disabled | Wrap validation in `torch.no_grad()` and consider a smaller validation batch size. |\n| Checkpoint restore fails | Mismatched model architecture between checkpoint and config | Ensure the model config matches the checkpoint exactly (layer count, hidden dim, vocab size). |\n","# NeMo AutoModel Recipe Development\n\u003C!-- NVSkills signature refresh requested for AM-519. -->\n\n## Instructions\n\nFor recipe questions, answer with the smallest complete path to action:\n\n1. Name the relevant recipe file or YAML section.\n2. List the builder functions or config keys involved.\n3. Include a minimal YAML or command example when the question asks how to\n   configure something.\n4. End with a local validation command or tiny CPU-compatible test.\n\nFor conceptual recipe questions, answer from this skill without inspecting the\nrepository or loading other AutoModel skills unless the user asks you to edit\nfiles. Keep the response focused on recipe YAML, builders, CLI routing, tests,\nand local validation.\n\nUse these compact answer patterns for common questions:\n\n- New finetuning recipe variant: start from the closest file under\n  `nemo_automodel\u002Frecipes\u002F`, update the model, dataset or dataloader,\n  optimizer, loss, LR scheduler, step scheduler, and checkpoint builders,\n  register a CLI route only if adding a command or domain alias, add example\n  YAML under `examples\u002F`, then add a tiny CPU-compatible unit test and run\n  `automodel finetune llm -c \u003Cconfig.yaml>`.\n- `_target_` fields: describe `_target_` as the fully qualified Python callable,\n  explain that sibling keys become keyword arguments, show optimizer and dataset\n  examples, and mention nested CLI overrides such as `--optimizer.lr`.\n- Validation and checkpointing: name `step_scheduler.val_check_interval`,\n  `step_scheduler.checkpoint_interval`, `validation_dataset`,\n  `restore_from.path`, and consolidated safetensors; include the minimal YAML\n  snippet from this skill.\n\nFor validation and checkpointing, always name:\n\n- `step_scheduler.val_check_interval` for validation cadence.\n- `step_scheduler.checkpoint_interval` for save cadence.\n- `validation_dataset` as the validation dataloader source.\n- `restore_from.path` for resume.\n- Consolidated safetensors as the default checkpoint format for HF ecosystem\n  compatibility.\n\n## Routing Boundary\n\nUse this skill for recipe construction and execution-flow questions: YAML\nstructure, `_target_` callables, builder functions, validation datasets,\ncheckpoint configuration, CLI route registration, and recipe-specific tests.\n\nDo not use this skill for standalone distributed strategy selection, cluster\nlauncher configuration, or model architecture onboarding unless the user is\nasking how those choices appear inside an AutoModel recipe YAML.\n\n## Recipe Architecture\n\n### Execution Flow\n\n```\nCLI (automodel finetune llm -c config.yaml)\n  -> app.py parses command + domain + config\n    -> recipe script (e.g. train_ft.py) main(config_path)\n      -> Recipe class .setup() builds all components\n        -> .run_train_validation_loop() executes training\n```\n\n### Recipe Class\n\nRecipes inherit from `BaseRecipe` and implement two methods:\n\n- `setup()` -- builds model, optimizer, dataloader, loss, LR scheduler, step scheduler, and checkpoint config via builder functions.\n- `run_train_validation_loop()` -- executes the training and validation loop.\n\n### Builder Pattern\n\nAll components are constructed through dedicated builder functions:\n\n- `build_model()` -- instantiates the model from config\n- `build_optimizer()` -- creates optimizer (AdamW, etc.)\n- `build_dataloader()` -- sets up train and validation dataloaders\n- `build_loss_module()` -- creates the loss function\n- `build_lr_scheduler()` -- creates the learning rate scheduler\n- `build_step_scheduler()` -- creates the step scheduler controlling training progression\n- `CheckpointingConfig` -- configures checkpointing (built directly from the YAML `checkpoint:` block via `RecipeConfig.checkpoint`)\n\n### Infrastructure Application Order\n\nComponents are applied in this strict order after building:\n\n1. PEFT (LoRA, etc.)\n2. FP8 quantization\n3. QAT (quantization-aware training)\n4. Checkpoint load \u002F restore\n5. Parameter freezing\n6. Sharding (FSDP2, Megatron-FSDP, DDP)\n7. Device placement\n8. `torch.compile`\n9. Context parallelism hooks\n\n## YAML Config Anatomy\n\nA complete recipe config follows this structure:\n\n```yaml\nstep_scheduler:\n  max_steps: 1000\n  num_epochs: 1\n  grad_accumulation_steps: 4\n  val_check_interval: 100\n  checkpoint_interval: 500\n  log_interval: 10\n\ndist_env:\n  master_addr: localhost\n  master_port: 29500\n\nrng:\n  seed: 42\n\nmodel:\n  _target_: nemo_automodel.models.llm.NemotronHForCausalLM\n  name_or_path: meta-llama\u002FLlama-3.2-1B\n  # additional model kwargs passed to the constructor\n\ncompile:\n  enabled: false\n  backend: inductor\n\nclip_grad_norm:\n  max_norm: 1.0\n\ndistributed:\n  strategy: fsdp2       # fsdp2 | megatron_fsdp | ddp\n  dp_size: auto\n  tp_size: 1\n  cp_size: 1\n\nloss_fn:\n  _target_: torch.nn.CrossEntropyLoss\n\ndataset:\n  _target_: nemo_automodel.datasets.squad.SquadDataset\n  tokenizer_name_or_path: meta-llama\u002FLlama-3.2-1B\n  max_seq_length: 2048\n\nvalidation_dataset:\n  _target_: nemo_automodel.datasets.squad.SquadDataset\n  split: validation\n\npacked_sequence:\n  enabled: false\n\ndataloader:\n  batch_size: 4\n  num_workers: 4\n  pin_memory: true\n\noptimizer:\n  _target_: torch.optim.AdamW\n  lr: 2.0e-5\n  weight_decay: 0.01\n\nlr_scheduler:\n  _target_: nemo_automodel.schedulers.CosineAnnealingWarmup\n  warmup_steps: 50\n  min_lr: 1.0e-6\n```\n\n### The `_target_` Pattern\n\nThe `_target_` key specifies a fully qualified Python callable. All remaining keys in that section are passed as keyword arguments:\n\n```yaml\noptimizer:\n  _target_: torch.optim.AdamW   # callable\n  lr: 2.0e-5                    # kwarg\n  weight_decay: 0.01            # kwarg\n```\n\nThis is equivalent to: `torch.optim.AdamW(lr=2e-5, weight_decay=0.01)`.\n\n### CLI Overrides\n\nAny config value can be overridden from the command line:\n\n```bash\nautomodel finetune llm -c config.yaml \\\n  --optimizer.lr 1e-4 \\\n  --step_scheduler.max_steps 500 \\\n  --distributed.tp_size 2\n```\n\n## Examples\n\nValidation and checkpointing:\n\n```yaml\nstep_scheduler:\n  val_check_interval: 100\n  checkpoint_interval: 500\n\nvalidation_dataset:\n  _target_: nemo_automodel.datasets.squad.SquadDataset\n  split: validation\n\nrestore_from:\n  path: \u002Fcheckpoints\u002Fstep-500\n```\n\n## Domain-Specific Notes\n\n### LLM\n\n- `nemo_automodel\u002Frecipes\u002Fllm\u002Ftrain_ft.py` handles both finetuning and pretraining. The distinction is in the config (dataset, learning rate, etc.).\n- `nemo_automodel\u002Frecipes\u002Fllm\u002Fkd.py` implements knowledge distillation with a teacher and student model.\n- `nemo_automodel\u002Frecipes\u002Fllm\u002Fbenchmark.py` runs throughput and latency benchmarks.\n\n### VLM\n\n- Uses `NeMoAutoModelForImageTextToText` instead of causal LM classes.\n- Config includes a `processor` section instead of a standalone tokenizer.\n- Recipe lives in `nemo_automodel\u002Frecipes\u002Fvlm\u002Ffinetune.py`.\n\n### Diffusion\n\n- Uses `NeMoAutoDiffusionPipeline`.\n- Requires a `parallel_scheme` dict in config to define parallelism.\n- Only supports DDP and FSDP2 strategies (no Megatron-FSDP).\n- Recipe lives in `nemo_automodel\u002Frecipes\u002Fdiffusion\u002Ftrain.py`.\n\n### Retrieval\n\n- Two encoder patterns:\n  - **Bi-encoder** (`nemo_automodel\u002Frecipes\u002Fretrieval\u002Ftrain_bi_encoder.py`): separate query and document encoders, contrastive loss.\n  - **Cross-encoder** (`nemo_automodel\u002Frecipes\u002Fretrieval\u002Ftrain_cross_encoder.py`): joint encoding, classification head.\n- Hard negative mining: `nemo_automodel\u002Frecipes\u002Fretrieval\u002Fmine_hard_negatives.py`.\n\n## Training Loop Details\n\nThe training loop follows this structure per epoch:\n\n```\nfor epoch in range(num_epochs):\n    for batch_idx in range(batches_per_epoch):\n        # --- gradient accumulation inner loop ---\n        for micro_batch in micro_batches:\n            if pipeline_parallel:\n                schedule.step(micro_batch)    # PP schedule\n            else:\n                loss = model(micro_batch)     # direct forward\n                loss.backward()\n\n        # --- optimizer step ---\n        scale_grads_and_clip_grad_norm(model, max_norm)\n        optimizer.step()\n        lr_scheduler.step()\n        optimizer.zero_grad()\n\n        # --- logging ---\n        MetricsSample(step, epoch, loss, grad_norm, lr, mem, tps, mfu)\n\n        # --- validation (at configured intervals) ---\n        if step % val_check_interval == 0:\n            run_validation()\n\n        # --- checkpoint (at configured intervals) ---\n        if step % checkpoint_interval == 0:\n            save_checkpoint()\n```\n\n### StepScheduler\n\nControls all training progression: total epochs, total steps, gradient accumulation steps, validation interval, checkpoint interval, and logging interval.\n\n### Gradient Clipping\n\nApplied via `scale_grads_and_clip_grad_norm()` after the backward pass and before the optimizer step. Controlled by `clip_grad_norm.max_norm` in config.\n\n### Context Parallelism\n\nWhen `cp_size > 1`, batches are split across the context-parallel group using `make_cp_batch_and_ctx()`. This must happen before the forward pass.\n\n### MetricsSample\n\nEach training step produces a `MetricsSample` with fields:\n\n- `step` -- global step count\n- `epoch` -- current epoch\n- `loss` -- training loss\n- `grad_norm` -- gradient norm after clipping\n- `lr` -- current learning rate\n- `mem` -- GPU memory usage\n- `tps` -- tokens per second\n- `mfu` -- model FLOPS utilization\n\n## Validation & Checkpointing\n\n### Validation\n\n- Runs at intervals defined by `step_scheduler.val_check_interval`.\n- Uses the validation dataloader built from `validation_dataset` config.\n- Model is set to eval mode; gradients are disabled.\n\n### Checkpointing\n\n- Default format: consolidated safetensors for easy deployment on HF ecosystem (always prefer this over DCP).\n- Checkpoint interval controlled by `step_scheduler.checkpoint_interval`.\n- Resume training via the `restore_from` config key pointing to a checkpoint directory.\n\n```yaml\nrestore_from:\n  path: \u002Fcheckpoints\u002Fstep-500\n```\n\n## Pitfalls\n\n| Problem | Cause | Fix |\n|---|---|---|\n| Silent config errors | Typo in `_target_` value | The class path must be a valid, importable Python callable. Double-check the module path and class name. |\n| Training crashes at first step | `global_batch_size` not divisible by `local_batch_size * dp_size * grad_accumulation_steps` | Ensure the batch size math is consistent across all dimensions. |\n| New recipe not accessible via CLI | Missing CLI command alias registration | Register the new route in the CLI app so `automodel \u003Ccommand> \u003Cdomain>` resolves correctly. |\n| Shape mismatch at forward pass | Dataset collate function output does not match model input signature | Verify that the collate function returns tensors with the keys and shapes the model expects. |\n| OOM during validation | Validation batch size too large or gradients not disabled | Wrap validation in `torch.no_grad()` and consider a smaller validation batch size. |\n| Checkpoint restore fails | Mismatched model architecture between checkpoint and config | Ensure the model config matches the checkpoint exactly (layer count, hidden dim, vocab size). |\n",{"name":5,"license":15,"metadata":24,"description":7,"when_to_use":29},{"tags":25,"author":28},[26,27],"nemo-automodel","recipe-development","NVIDIA","Creating or modifying training, SFT, or eval recipes, adding new YAML config fields, debugging recipe construction or trainer issues, or understanding the recipe execution flow.","main","be3de0244dc1a57e323d8160787ebb40fb64930e","public\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-automodel-recipe-development","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main","https:\u002F\u002Fskills.x402.wtf","https:\u002F\u002Fgithub.com\u002FSolizardking","https:\u002F\u002Fmusebook.trade","Got a mile high and never came down","2026-10-08 23:20:13",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add Solizardking\u002Fskillhub-main --skill nemo-automodel-recipe-development",{"tool":45,"command":46},"bunx","bunx skills add Solizardking\u002Fskillhub-main --skill nemo-automodel-recipe-development",{"tool":48,"command":49},"pnpm","pnpm dlx skills add Solizardking\u002Fskillhub-main --skill nemo-automodel-recipe-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-automodel-recipe-development\u002FSKILL.md",true,[53,59,63,67],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"BENCHMARK.md","REFERENCE","参考文档",3610,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-automodel-recipe-development\u002FBENCHMARK.md",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"metadata.json",370,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-automodel-recipe-development\u002Fmetadata.json",{"path":64,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":65,"sourceHtmlUrl":66},"skill-card.md",4024,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-automodel-recipe-development\u002Fskill-card.md",{"path":68,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":69,"sourceHtmlUrl":70},"verification.json",1372,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-automodel-recipe-development\u002Fverification.json",[72,80,87,94,101,109],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":76,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M78E0TGCAMNPS207BA3G07S7","zkrouter","Self-hosted OpenAI-compatible LLM router — smart tier-based routing, ZK-stamped routing decisions, mode overrides, free OpenRouter at install via the Birth bot. Save 60-80% on inference costs by routing to the cheapest capable model across 12+ OpenRouter models.","MIT","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzkrouter\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":76,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M78E0R1Z8BDT6EDTHY17MTNB","zk","For custom ZK Solana programs and privacy-preserving applications to prevent double spending. Guide to integrate rent-free nullifier PDAs for double-spend prevention.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzk\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":76,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M78E0P3ZTZ1YWF8MD5MM23QE","zk-omni-messaging","Zero-knowledge omnichain messaging between Robinhood Chain and Solana using CheshireZkOmniMessenger (msgType 4) with nullifier anti-replay and the zk-omni-relayer service.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzk-omni-messaging\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":76,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M78E0JXZ2PNB1896VXAGDBWD","zerion-wallet-data","Use when the user asks to check a wallet's portfolio, token balances, DeFi positions, PnL, transaction history, or NFTs. Provides interpreted on-chain data across 40+ EVM chains and Solana via x402 pay-per-request or API key — no raw RPC decoding needed.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzerion-wallet-data\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":76,"licenseFileUrl":105,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M78E0G14FH9GRRTQYMKD5E59","youtube-clipper","YouTube 视频智能剪辑工具。下载视频和字幕，AI 分析生成精细章节（几分钟级别）， 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频，并生成总结文案。 使用场景：当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词：视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":76,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":19},"01M78E0C2ZYA99CFFDNB7ZMK5S","yield-optimization","Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit\u002Fwithdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter\u002Fexit a position, or check portfolio balances.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyield-optimization\u002FSKILL.md",[],[]]