Curation CLI#
The curation category registers six steps, each run through nemotron steps run, and one flow driver, run as a Python module.
Command |
Purpose |
Reference |
|---|---|---|
|
Normalize Parquet or JSONL and mint document identifiers |
|
|
Measure quality-signal distributions and write candidate policies |
|
|
Apply language, length, and domain gates and an approved policy |
|
|
Verify a curated corpus against its manifest and ledger |
|
|
Remove training documents that overlap a holdout |
|
|
Cut nested token-budget tiers |
|
|
Run the six steps from one configuration |
|
|
Score an approved policy against labelled documents |
Install the dependencies once with uv sync --extra curate.
The decontamination similarity pass additionally needs --extra curate-gpu and a GPU.
curate/nemo_curator Syntax#
uv run --no-sync nemotron steps run curate/nemo_curator \
[-c <config-name-or-path>] \
[-r <run-profile> | -b <batch-profile>] \
[-d] \
[<dotlist-overrides>...]
Use -c tiny for a small initial validation configuration and -c default for the Hugging Face snapshot example.
Refer to Nemotron Steps CLI Reference for the shared flag set.
Common Commands#
Show the step contract:
$ uv run --no-sync nemotron steps show curate/nemo_curator
Run a local JSONL initial validation:
$ uv run --no-sync nemotron steps run curate/nemo_curator -c tiny \
input_glob="${PWD}/src/nemotron/steps/curate/nemo_curator/data/tiny.jsonl" \
output_dir="${PWD}/output/curate-tiny"
Run on Lepton with the generated Curator profile:
$ uv run --no-sync nemotron steps run curate/nemo_curator -c tiny --batch lepton_curate
Run against local corpus shards:
$ uv run --no-sync nemotron steps run curate/nemo_curator -c tiny \
input_glob="${PWD}/data/my_corpus/**/*.jsonl" \
output_dir="${PWD}/output/curated-jsonl" \
text_field=text \
language_codes=[] \
domains=[] \
quality_filters={}
Dotlist Overrides#
All YAML fields can be overridden from the command line with key=value syntax.
Examples:
input_glob=/data/**/*.jsonloutput_dir=/output/curatedtext_field=bodylanguage_codes=[EN]quality_filters.min_words=50quality_filters.max_words=5000ray.num_cpus=4mode=bothheuristic_filters.approved_policy=./output/vi/policy/approved_policy.yaml
Use shell quoting around globs or lists when your shell expands them unexpectedly.
Flow Driver Syntax#
uv run --extra curate --extra xenna \
python -m nemotron.steps.curate.nemo_curator.scripts.run_flow \
--config <path/to/flow.yaml> [--plan]
The flow driver takes a configuration path and accepts no dotlist overrides; copy a configuration file and edit it.
--plan writes flow_plan.json and exits without running any step.
Refer to Curate Flow Configuration.
Policy Evaluation Syntax#
uv run --extra curate \
python -m nemotron.steps.curate.nemo_curator.scripts.run_evaluate \
--policy <approved_policy.yaml> \
--labelled <labelled.jsonl> [<labelled.jsonl> ...] \
[--language <bcp47>] [--langpack-dir <dir>] [--report <report.json>]
Flag |
Meaning |
|---|---|
|
Required. The approved policy whose thresholds are evaluated. |
|
Required. One or more JSONL files of labelled documents. |
|
BCP-47 tag. Defaults to the policy’s |
|
Pack root. Defaults to the policy’s |
|
Write the full report as JSON to this path. |
Refer to Evaluate a Policy.