[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CSJM46Q9YR353F96E4KM6E":3,"skill-same:01M7CSJM46Q9YR353F96E4KM6E":73},{"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":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M7CSJM46Q9YR353F96E4KM6E","nemo-automodel-recipe-development",null,"Create and modify NeMo AutoModel training and evaluation recipes, including YAML structure, builders, and execution flow.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills\u002Fskills\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\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_fn()` -- 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- `build_checkpoint_config()` -- configures checkpointing\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\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_fn()` -- 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- `build_checkpoint_config()` -- configures checkpointing\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","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills\u002Fskills\u002Fnemo-automodel-recipe-development",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill nemo-automodel-recipe-development",{"tool":45,"command":46},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill nemo-automodel-recipe-development",{"tool":48,"command":49},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill nemo-automodel-recipe-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills\u002Fskills\u002Fnemo-automodel-recipe-development\u002FSKILL.md",true,[53,59,63,67],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"BENCHMARK.md","REFERENCE","参考文档",4109,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills\u002Fskills\u002Fnemo-automodel-recipe-development\u002FBENCHMARK.md",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"evals\u002Fevals.json",3529,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills\u002Fskills\u002Fnemo-automodel-recipe-development\u002Fevals\u002Fevals.json",{"path":64,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":65,"sourceHtmlUrl":66},"skill-card.md",3739,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills\u002Fskills\u002Fnemo-automodel-recipe-development\u002Fskill-card.md",{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"skill.oms.sig","OTHER","其他",4613,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills\u002Fskills\u002Fnemo-automodel-recipe-development\u002Fskill.oms.sig",[74,82,89,96,103,110],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]