> This page is for version v1.0.1.
> For other versions, use one of these documentation indexes:
> - Latest (default): https://docs.nvidia.com/nemo/datadesigner/latest/llms.txt
> - v1.0.1: https://docs.nvidia.com/nemo/datadesigner/v1.0.1/llms.txt
> - v1.0.0: https://docs.nvidia.com/nemo/datadesigner/v1.0.0/llms.txt
> - v0.10.0: https://docs.nvidia.com/nemo/datadesigner/v0.10.0/llms.txt
> - v0.9.7: https://docs.nvidia.com/nemo/datadesigner/v0.9.7/llms.txt
> - v0.9.6: https://docs.nvidia.com/nemo/datadesigner/v0.9.6/llms.txt
> - v0.9.5: https://docs.nvidia.com/nemo/datadesigner/v0.9.5/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/datadesigner/v0.9.4/llms.txt
> - v0.9.3: https://docs.nvidia.com/nemo/datadesigner/v0.9.3/llms.txt
> - v0.9.2: https://docs.nvidia.com/nemo/datadesigner/v0.9.2/llms.txt
> - v0.9.1: https://docs.nvidia.com/nemo/datadesigner/v0.9.1/llms.txt
> - v0.9.0: https://docs.nvidia.com/nemo/datadesigner/v0.9.0/llms.txt
> - v0.8.0: https://docs.nvidia.com/nemo/datadesigner/v0.8.0/llms.txt
> - v0.7.0: https://docs.nvidia.com/nemo/datadesigner/v0.7.0/llms.txt
> - v0.6.1: https://docs.nvidia.com/nemo/datadesigner/v0.6.1/llms.txt
> - v0.6.0: https://docs.nvidia.com/nemo/datadesigner/v0.6.0/llms.txt
> - v0.5.9: https://docs.nvidia.com/nemo/datadesigner/v0.5.9/llms.txt
> - v0.5.8: https://docs.nvidia.com/nemo/datadesigner/v0.5.8/llms.txt
> - Older versions: https://docs.nvidia.com/nemo/datadesigner/older-versions/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/datadesigner/llms.txt.

# Slurm benchmarks

Use a benchmark to compare concurrency and deployment topology while keeping each case as an ordinary Data Designer Slurm run. No benchmark controller stays resident after submission.

Complete [Getting Started](/nemo/datadesigner/v1.0.1/slurm/getting-started) first so the profile, serving image, and builder config are ready.

## Prepare a compatible base run

This example requires two nodes with eight GPUs per node. Confirm that the selected profile or its detected GPU count requests eight GPUs per node. Reuse `builder.yaml` and the registered `vllm` image from Getting Started, and select a model that supports TP8 and fits in eight GPUs. The TP1 run from Getting Started cannot span two nodes with the default PP1.

Create `benchmark-run.yaml` next to `builder.yaml`:

```yaml
schema_version: 1
name: benchmark-base-run
builder:
  source: builder.yaml
invocation:
  num_records: 8
  dataset_name: greetings
  model_concurrency:
    generator: 8
deployments:
  - model_alias: generator
    served_model_name: example/generator
    model: example/generator
    server:
      type: vllm
      image:
        name: vllm
      startup_timeout: 15m
      distributed_init_timeout: 10m
    topology:
      tensor_parallel: 8
submission:
  time_limit: 01:00:00
```

The repository ships this base run as `packages/data-designer-slurm/examples/benchmark-run.yaml`, alongside the matching `benchmark.yaml`. Keep PP omitted to use its default of one stage. For other GPU counts, choose a TP size that distributes evenly across both one-node and two-node groups and fits the GPUs available in each group.

## Define cases

Create `benchmark.yaml` next to `benchmark-run.yaml`:

```yaml
schema_version: 1
name: generator-scaling
base_run: benchmark-run.yaml
model_aliases: all
concurrency_values:
  - 32
  - 64
deployment_cases:
  - name: single-node-groups
    deployments:
      generator:
        nodes: 2
        nodes_per_replica: 1
  - name: two-node-group
    deployments:
      generator:
        nodes: 2
        nodes_per_replica: 2
analysis:
  target_total_records: 1000000
  target_runtime: 4h
```

`model_aliases` is required. Set it to `all` to apply each concurrency value to every model in the base run. For a two-model run with `generator` and `reviewer`, values `[32, 64]` produce concurrency pairs `(32, 32)` and `(64, 64)` at each deployment case. To vary only one model, set `model_aliases: [generator]`; the reviewer then keeps its base-run concurrency. Every selected model receives the same value, so this sweep does not produce mixed pairs such as `(32, 64)`.

The compiler expands the authored order deterministically. For this example, the first cases are `single-node-groups-c32` and `two-node-group-c32`. By default, each case requests `min(5000, max(1000, ceil(concurrency * 1.0)))` records. Thus concurrency 512 requests 1,000 records and concurrency 1,024 requests 1,024. For a longer sample at those concurrency values, set `record_policy: {type: adaptive, base_records: 1000, max_records: 5000, records_per_concurrency: 4.0}` to request 2,048 and 4,096 records. Raise `max_records` when testing larger concurrency values. A fixed policy with `type: fixed` and `records` is also available.

Each benchmark case runs as one Slurm array task, even when the base run uses multiple tasks. The record policy sets the sample size for that task. This measures the throughput of one allocation, which analysis uses to estimate how many such tasks are needed for `target_total_records` within `target_runtime`.

`nodes_per_replica` controls the number of nodes hosting each replica. `pipeline_parallel` defaults to `1`, independently of the node count. Each replica uses `tensor_parallel * pipeline_parallel` GPUs, distributed evenly across its nodes; the resolved replica count is `(nodes * gpus_per_node) / (tensor_parallel * pipeline_parallel)`. Benchmark deployment cases change `nodes` and `nodes_per_replica`; they keep each deployment's TP and PP sizes from the base run. Changing the node count does not add pipeline stages. Each child plan is validated before its submission. An invalid later case can leave earlier cases submitted, so choose a base topology compatible with every case. See [GPU topology and replica count](/nemo/datadesigner/v1.0.1/slurm/run-configuration#gpu-topology-and-replica-count) for concrete eight-GPU examples.

Changing only `nodes_per_replica` changes placement, not GPUs per replica or replica count. For example, with TP8, default PP1, and eight GPUs per node, both cases above create two eight-GPU replicas. The first places each replica on one node; the second spreads each replica across both nodes with four GPUs per node. Use a different base run to compare different TP or PP sizes.

## Run

```bash
data-designer slurm benchmark run benchmark.yaml
```

This uses `DATA_DESIGNER_SLURM_PROFILE_FILE` and the default cluster from Getting Started. The command writes `benchmarks/<benchmark-id>/config.json`, the resolved `base-run.json`, and `benchmark.json` before submitting any child. The manifest is an immutable ordered mapping from case IDs to normal run IDs. Each child keeps its authored config, state, attempts, scheduler evidence, and results under `runs/<run-id>`.

If submission stops partway through, rerun the same command with the same installed revision. Children with scheduler submission evidence are not submitted again, and missing children are attempted in the original order. If a child has initialized inputs but no submission evidence, rerun with `--force` to resume it. Force never replaces benchmark or child metadata. Partial scheduler evidence across a child's shards is preserved as a conflict for operator investigation and cannot be overwritten with force.

## Observe and analyze

Inspect any child with the normal run command:

```bash
data-designer slurm status <child-run-id>
```

Write a point-in-time benchmark report from persisted child state:

```bash
data-designer slurm benchmark analyze <benchmark-id> --refresh-state
```

`--refresh-state` performs one fresh-process scheduler reconciliation per child before analysis. Add `--fail-if-incomplete` when automation should return a conflict after the report is persisted if any case is not successful.

Reports retain every manifest case in order. Outcomes include `pending`, `accounting_lag`, `succeeded`, `failed`, `incomplete`, `missing`, `stale`, and `scheduler_inconsistent`. Successful cases can be infeasible when boot time consumes the runtime budget. Boot and wall timing begin when execution starts inside the allocation, so queue wait does not affect topology comparisons. For new one-task cases, `rows_per_second` measures that task's generation rate. Reports for saved multi-task benchmarks retain their aggregate shard rate. `generation_seconds` is the target runtime remaining after startup, and GPU-hour estimates assume each projected task uses the full target runtime. Only successful feasible cases participate in Pareto, minimum-job, and minimum-GPU-hour recommendations.

## Python API

```python
from pathlib import Path

from data_designer.slurm.config import load_benchmark_config
from data_designer.slurm.services import create_slurm_benchmark_service

benchmark_file = Path("benchmark.yaml").resolve()
config = load_benchmark_config(benchmark_file)
service = create_slurm_benchmark_service()

manifest = service.run(config, source_root=benchmark_file.parent)
report = service.analyze(manifest.benchmark_id, refresh_state=True)
```

For child failure recovery and output collection, use [Retry and collection](/nemo/datadesigner/v1.0.1/slurm/retry-and-collection).