К основному содержанию
скилл CX Codex

nemo-automodel-launcher-config — скилл для Claude Code

Настраивает запуск NeMo AutoModel в интерактивном режиме, через Slurm и SkyPilot. Нужен для кластерных и облачных запусков.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add NVIDIA/skills --skill nemo-automodel-launcher-config -a claude-code
Открыть на GitHub

Что делает nemo-automodel-launcher-config

Скилл объясняет, как запускать NeMo AutoModel через torchrun, Slurm и SkyPilot. В интерактивном режиме отдельная секция YAML не нужна: CLI сам использует torchrun, если в конфигурации нет slurm: или skypilot:.

Для Slurm он описывает поля задания, контейнер, монтирование, переменные окружения и параметры распределённого запуска. Для SkyPilot задаёт облако, ускорители, число узлов, диск, регион и setup. Лаунчер настраивает MASTER_ADDR, MASTER_PORT и WORLD_SIZE для многоузлового обучения.

Есть отдельные инструкции для профилирования через nsys profile в Slurm. Профилирование создаёт файл .nsys-rep и добавляет накладные расходы, поэтому его стоит включать только на коротких диагностических запусках. Для spot-инстансов SkyPilot нужны короткие интервалы сохранения, потому что такие машины могут быть прерваны.

Какие задачи решает

  • настроить интерактивный запуск NeMo AutoModel
  • собрать конфигурацию задания для Slurm
  • запустить обучение на нескольких узлах
  • подготовить запуск NeMo AutoModel через SkyPilot
  • включить диагностику Slurm-задания через Nsight Systems

Примеры запросов агенту

  • Настрой запуск nemo-automodel через Slurm на двух узлах и добавь нужные переменные окружения.
  • Подготовь конфигурацию SkyPilot со spot-инстансами и восстановлением из /checkpoints/latest.
  • Покажи, как включить nsys_enabled: true для короткого профилирования задания Slurm.

Как установить nemo-automodel-launcher-config

1Через Skills CLI (Vercel)

npx skills add NVIDIA/skills --skill nemo-automodel-launcher-config -a claude-code

2Вручную: положить файлы

~/.claude/skills/nemo-automodel-launcher-config/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/nemo-automodel-launcher-config/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о nemo-automodel-launcher-config

Как установить nemo-automodel-launcher-config в Claude Code?

Выполните npx skills add NVIDIA/skills --skill nemo-automodel-launcher-config -a claude-code, затем повторите эту команду и проверьте файл ~/.claude/skills/nemo-automodel-launcher-config/SKILL.md.

Что делает nemo-automodel-launcher-config?

Скилл помогает настраивать запуск NeMo AutoModel через torchrun, Slurm и SkyPilot. Он разбирает YAML-поля, многоузловое окружение, контейнеры, переменные и профилирование.

Что нужно учесть при запуске через SkyPilot spot-инстансы?

Spot-инстансы могут быть прерваны, поэтому конфигурации нужны короткие интервалы сохранения. После прерывания запуск возобновляют через restore_from.path. Это повод заранее проверить путь к чекпойнту.

Исходный текст

SKILL.md · Apache-2.0
---
name: nemo-automodel-launcher-config
description: Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.
when_to_use: Configuring Slurm or SkyPilot job submission, setting up multi-node launch scripts, debugging job submission failures, or switching between interactive and cluster launch modes.
license: Apache-2.0
metadata:
  author: NVIDIA
  tags:
    - nemo-automodel
    - launcher-config
---

# Launcher Configuration

NeMo AutoModel supports three launch methods: interactive (torchrun), Slurm (HPC clusters), and SkyPilot (cloud-agnostic).

## Instructions

For launcher questions, answer directly from this skill without inspecting the
repository unless the user asks you to edit files. Keep the answer focused on
the relevant launch YAML, required fields, and the expected runtime behavior.

Use these compact answer patterns for common questions:

- Slurm multi-node: show a `slurm:` YAML block with `job_name`, `nodes`,
  `ntasks_per_node`, `time`, `account` or `partition`, `container_image`,
  `hf_home`, optional `extra_mounts`, `env_vars`, and `master_port`; explain
  that the launcher derives `WORLD_SIZE = nodes * ntasks_per_node` and sets
  `MASTER_ADDR` and `MASTER_PORT`.
- SkyPilot spot: show a `skypilot:` YAML block with `cloud`, `accelerators`,
  `num_nodes`, `use_spot: true`, `disk_size`, `region`, `setup`, and
  `env_vars`; warn that spot instances can be preempted, set a short
  `step_scheduler.checkpoint_interval`, and resume with `restore_from.path`.
- Nsight Systems on Slurm: show `slurm.nsys_enabled: true` alongside normal
  Slurm fields, say the launcher wraps the training command with
  `nsys profile`, and state that it produces a `.nsys-rep` report file.
  Treat profiling as diagnostic-only: use short profiling runs and disable it
  for normal production training because it adds overhead and large artifacts.

For Slurm answers, start with this minimal template and then adjust only the
fields the user asked about:

```yaml
slurm:
  job_name: llm_finetune
  nodes: 2
  ntasks_per_node: 8
  time: "04:00:00"
  account: my_account
  partition: batch
  container_image: nvcr.io/nvidia/nemo:dev
  hf_home: ~/.cache/huggingface
  master_port: 13742
  env_vars:
    HF_TOKEN: "${HF_TOKEN}"
```

For Slurm-only questions, do not discuss SkyPilot or profiling unless the user
asks. For profiling questions, say the `.nsys-rep` report is written in the
Slurm job working or output directory, using the launcher's Nsys output setting
when one is configured.

## Routing Boundary

Use this skill only for launch mechanics: interactive execution, Slurm, SkyPilot, containers, mounts, environment variables, rendezvous settings, and profiling.

Do not use this skill for implementing or registering new model architectures, Hugging Face state-dict adapters, model files, or capability flags. Those are model onboarding tasks, not launcher configuration tasks.

## Launch Methods

1. **Interactive** (default): runs torchrun on the current node. Suitable for single-node development and debugging.
2. **Slurm**: submits a batch job to an HPC cluster scheduler. Handles multi-node setup, container management, and environment configuration.
3. **SkyPilot**: cloud-agnostic job submission to AWS, GCP, Azure, Lambda, or Kubernetes. Supports spot instances.

## Interactive Launch

```bash
# Single GPU
automodel finetune llm -c config.yaml

# Multi-GPU (all GPUs on current node)
torchrun --nproc_per_node=8 -m nemo_automodel._cli.app finetune llm -c config.yaml
```

No additional YAML section is needed for interactive mode. The CLI routes to torchrun automatically when no `slurm:` or `skypilot:` section is present in the config.

## Slurm Configuration

The `SlurmConfig` dataclass generates an SBATCH script from a template.

### YAML Example

```yaml
slurm:
  job_name: llm_finetune
  nodes: 2
  ntasks_per_node: 8
  time: "04:00:00"
  account: my_account
  partition: batch
  container_image: nvcr.io/nvidia/nemo:dev
  hf_home: ~/.cache/huggingface
  extra_mounts:
    - source: /data
      dest: /data
  env_vars:
    WANDB_API_KEY: "${WANDB_API_KEY}"
    HF_TOKEN: "${HF_TOKEN}"
```

### Key Fields

- `job_name`: Slurm job identifier
- `nodes`: number of nodes to request
- `ntasks_per_node`: number of tasks (GPUs) per node
- `time`: wall-time limit in HH:MM:SS format
- `account`, `partition`: Slurm scheduling parameters
- `container_image`: Enroot/Pyxis container image path
- `nemo_mount`: mount point for NeMo AutoModel source inside the container
- `hf_home`: HuggingFace cache directory path
- `extra_mounts`: list of `VolumeMapping(source, dest)` for additional container bind mounts
- `master_port`: port for distributed communication (default 13742)
- `env_vars`: environment variables passed into the job
- `nsys_enabled`: when true, wraps the training command with `nsys profile` for Nsight Systems profiling

## SkyPilot Configuration

The `SkyPilotConfig` dataclass defines cloud job parameters.

### YAML Example

```yaml
skypilot:
  cloud: aws
  accelerators: "H100:8"
  num_nodes: 2
  use_spot: true
  disk_size: 200
  region: us-east-1
  setup: "pip install nemo-automodel"
  env_vars:
    HF_TOKEN: "${HF_TOKEN}"
```

### Key Fields

- `cloud`: target cloud provider (`aws`, `gcp`, `azure`, `lambda`, `kubernetes`)
- `accelerators`: GPU type and count (e.g., `"H100:8"`, `"A100-80GB:4"`)
- `num_nodes`: number of cloud instances
- `use_spot`: use preemptible/spot instances for cost savings
- `disk_size`: disk size in GB per node
- `region`: cloud region for instance placement
- `setup`: shell commands to run before the training job (e.g., install dependencies)
- `env_vars`: environment variables for the job

### SkyPilot spot checklist

When using spot or preemptible instances:

- Set `use_spot: true` in the `skypilot:` section.
- Include `accelerators`, `num_nodes`, `disk_size`, `region`, `setup`, and required `env_vars`.
- Use short checkpoint intervals in the recipe, for example `step_scheduler.checkpoint_interval`, because spot instances can be preempted.
- Resume from the most recent checkpoint after preemption with the recipe's `restore_from` setting.

Minimal spot-resume recipe keys:

```yaml
step_scheduler:
  checkpoint_interval: 100

restore_from:
  path: /checkpoints/latest
```

## Multi-Node Environment

For multi-node training (both Slurm and SkyPilot), the launcher automatically configures:
- `MASTER_ADDR`: hostname of the first node
- `MASTER_PORT`: port for rendezvous (default 13742)
- `WORLD_SIZE`: total number of processes (`nodes * ntasks_per_node`)
- NCCL environment variables for optimized collective communication

## Nsys Profiling

Enable Nsight Systems profiling in Slurm jobs:

```yaml
slurm:
  job_name: llm_profile
  nodes: 1
  ntasks_per_node: 8
  time: "00:30:00"
  account: my_account
  partition: batch
  container_image: nvcr.io/nvidia/nemo:dev
  nsys_enabled: true
```

This is a Slurm launcher setting. Normal Slurm fields such as `job_name`,
`nodes`, `ntasks_per_node`, `time`, `account` or `partition`, and
`container_image` still apply.

When `nsys_enabled: true`, the launcher wraps the training command with
`nsys profile` and writes a `.nsys-rep` report file for performance analysis
in the Slurm job working or output directory.
Profiling is diagnostic-only: run it for a short investigation, expect overhead
and large artifacts, and turn it off for normal production training.

## Code Anchors

- `components/launcher/slurm/config.py` - SlurmConfig dataclass, VolumeMapping
- `components/launcher/slurm/template.py` - SBATCH script template generation
- `components/launcher/slurm/utils.py` - Slurm submission utilities
- `components/launcher/skypilot/config.py` - SkyPilotConfig dataclass
- `_cli/app.py` - CLI entry point and launcher routing logic

## Pitfalls

- **Port collisions**: if the default `master_port` (13742) is in use by another job on the same node, change it to avoid connection failures.
- **Container mounts**: the `source` path in `extra_mounts` must exist on all nodes in the allocation. Missing paths cause container startup failures.
- **Slurm fault tolerance**: the fault tolerance plugin is Slurm-specific and does not work with SkyPilot or interactive mode.
- **SkyPilot spot preemption**: spot instances (`use_spot: true`) may be preempted by the cloud provider. Enable checkpointing with short intervals to minimize lost work.
- **Environment variable syntax**: use `${VAR}` syntax in YAML for shell variable expansion. Bare variable names will not be expanded.
- **Time limit vs async checkpoint**: if the Slurm `time` limit is too short, an in-progress async checkpoint write may be killed before completion, resulting in a corrupted checkpoint. Leave at least 5-10 minutes of margin.

© NVIDIA · Apache-2.0 · NVIDIA/skills

Похожие скиллы

Всё по теме «ИИ и ML» →
nemo-evaluator-sdk Orchestra Research Скилл запускает оценку языковых моделей на 100+ бенчмарках из 18+ харнессов: MMLU, HumanEval, GSM8K, safety и VLM. Пригодится, когда нужно сравнить модели воспроизводимо. CX Codex +1 943установок skypilot-multi-cloud-orchestration Orchestra Research Скилл помогает запускать обучение ML-моделей в разных облаках и срезать расходы на GPU за счёт автоматического подбора зон и спотовых инстансов. CX Codex +1 944установок agent-launcher-orchestrator Alireza Rezvani Оркеструет создание, оценку и расписание Claude Managed Agent в аккаунте Anthropic. Читает цель из goal.json и собирает цикл запуска без прямых вызовов API. 11установок firebase-remote-config-basics Google LLC Скилл помогает управлять Remote Config в приложениях на Android и iOS через Firebase CLI. Позволяет менять флаги функций и параметры без выкатки обновлений в магазины. CX Codex +1 121 300установок loki-config-generator akin-ozer Генерирует рабочие конфигурации Grafana Loki и Helm values под S3, GCS, Azure или локальный диск. Помогает развернуть кластер логов без ручного подбора параметров schema и ingester. CX Codex +1 580установок firewall-config devops-skills Скилл для настройки хостовых и облачных фаерволов: правила iptables, nftables, UFW и security groups. Пригодится, когда закрываешь периметр сервера или делишь сеть на зоны. CX Codex +1 458установок

Из того же набора178

nemo-mbridge-recipe-recommender Скилл помогает выбрать стартовый рецепт Megatron Bridge под вашу модель, число GPU и цель обучения, а потом подстроить параллелизм. CX Codex +1 1 900установок launch-nemo-rl Скилл помогает запускать, отслеживать и отлаживать рецепты обучения NeMo-RL в Kubernetes через CLI nrl-k8s. CX Codex +1 1 900установок nemo-mbridge-perf-memory-tuning Помогает разбирать ошибки нехватки памяти GPU при обучении в Megatron Bridge и выбирать настройки для снижения пикового потребления. CX Codex +1 1 900установок nemo-rl-auto-research Автономный цикл исследований для NeMo-RL и NeMo-gym с фиксацией гипотез в git и TSV. Помогает проверять метрики и запускать базовые рецепты. CX Codex +1 1 900установок nemo-automodel-model-onboarding Ведёт по шагам добавления новой архитектуры модели в NeMo AutoModel: от разбора config.json до регистрации класса и тестов. CX Codex +1 1 900установок nemo-automodel-recipe-development Скилл помогает создавать и настраивать рецепты обучения NeMo AutoModel. Он объясняет синтаксис YAML-конфигов, порядок компонентов и вызовы билдеров. CX Codex +1 1 900установок earth2studio-deterministic-forecast Скилл помогает собрать скрипт детерминированного прогноза погоды на Earth2Studio: подбирает модель, источник данных и бэкенд записи. CX Codex +1 1 900установок earth2studio-data-fetch Помогает скачать погодные и климатические данные из источников Earth2Studio: сверяет переменные с лексиконом и собирает рабочий скрипт на Python. CX Codex +1 1 900установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой