curate/profile#
The curate/profile step measures quality-signal distributions on an unfiltered corpus and reports what candidate thresholds would remove from it.
It writes a profile report, a human-readable summary, and a set of candidate policies that carry approved: false.
The step never approves a policy; approval is a separate, recorded act described in Filter Policy File.
Syntax#
uv run --no-sync nemotron steps run curate/profile \
[-c <config-name-or-path>] \
[-d] \
[<dotlist-overrides>...]
Refer to the Nemotron Steps CLI Reference for the shared flag set.
Configuration Files#
The step ships two configuration files under src/nemotron/steps/curate/nemo_curator/profile/config/.
File |
Purpose |
|---|---|
|
Profiles |
|
Profiles the packaged tiny fixture with the packaged English reference pack and four pack-backed signals. |
Inputs and Outputs#
Direction |
Artifact type |
Content |
|---|---|---|
Consumes |
|
The corpus to profile, before any filtering. |
Produces |
|
|
Produces |
|
|
The step also writes profile_summary.md, the human-readable summary, and sample_manifest.json, which records the sample that was measured.
The report carries a profile_digest taken over everything except the producer block, so re-profiling the same corpus under the same configuration does not make an approved policy appear stale.
Parameters#
- input_glob#
JSONL files to profile. Profile the unfiltered corpus; profiling filtered output measures the gates after they have already removed what they remove.
- output_dir#
Directory for
profile_report.json,profile_summary.md,candidate_policies.yaml, andsample_manifest.json.
- language#
BCP-47 tag that selects the language pack. There is no default.
- langpack_dir#
Root directory of the language packs. There is no default; a pack root must be named explicitly. The
enconfiguration names the packaged reference root,src/nemotron/steps/curate/nemo_curator/data/langpacks.Default:
null.
- text_field#
Record field holding the text to score.
Default:
text.
- source_field#
Field identifying the source of each record. When records do not carry it, each shard path is treated as a source and the report states so.
Default:
source.
- id_field#
Field holding a stable document identifier, used to make sampling reproducible. Falls back to a content hash.
Default:
null.
- signals#
Signals to profile, from the closed registry in
src/nemotron/steps/curate/nemo_curator/runtime/registry.py. An empty list profiles every signal whose requirements the language pack meets. A named signal whose requirements are unmet is an error, not a skip.Default:
[].
- max_total_docs#
Cap on sampled documents. Per-source counts are derived from it proportionally.
0profiles the whole corpus.Default:
200000.
- seed#
Seed for hash-bottom-k sampling. The same seed and cap reproduce the same sample.
Default:
0.
- band_search#
Retention range reported as a candidate band, as
min_keep_rateandmax_keep_rate. These bounds are analysis choices, not properties discovered in the data.Default:
{min_keep_rate: 0.80, max_keep_rate: 0.995}.
- models#
Optional models.
models.fasttext_langidis a path to a FastText language-identification model and enables the language-composition table; a configured path that is not a file is refused.models.tokenizeris a{name, revision}mapping and enables thetoken_countsignal;revisionis required because counts from two revisions are not comparable.
Signals#
Every signal declares a bound (min, max, or interval) and, where applicable, the language-pack capability it requires.
Six signals are language-agnostic and require nothing from the pack.
Signal |
Bound |
Units |
|---|---|---|
|
|
ratio |
|
|
ratio |
|
|
ratio |
|
|
ratio |
|
|
ratio |
|
|
ratio |
The remaining signals declare a pack capability and are skipped, with a named warning, when the pack does not declare it.
Signal |
Bound |
Units |
Requires |
|---|---|---|---|
|
|
patterns |
|
|
|
ratio |
|
|
|
ratio |
|
|
|
ratio |
|
|
|
ratio |
|
|
|
ratio |
|
|
|
ratio |
|
|
|
ratio |
|
|
|
characters |
|
|
|
characters |
|
|
|
ratio |
|
|
|
ratio |
|
|
|
ratio |
|
|
|
ratio |
|
|
|
ratio |
|
|
|
tokens |
|
|
|
words |
|
|
|
ratio |
|
Refer to Signals and Language Packs for what the capability requirements mean.
Strategies#
When |
Then |
|---|---|
You are curating a language for which NeMo Curator publishes no thresholds |
Run with the upstream filters disabled and read the retention curves. Promote a candidate only after validating it. |
|
Profile the unfiltered input. The retention curves and the co-occurrence table identify the responsible gate. |
You want to compare two filtering policies fairly |
Profile first, then hold the token budget fixed with |
Common Errors#
- language_pack_not_found#
Set
langpack_direxplicitly and confirm that it contains a directory for the requested BCP-47 tag.
- language_pack_invalid#
The pack exists but breaks its contract, usually a capability declared without the word list or character set behind it. The message names what is missing.
- unknown_signal#
The configuration named a signal that is not in the registry.
- signal_requirements_unmet#
A named signal needs something this run does not have, such as a tokenizer for
token_count. Supply it or remove the signal from the list.
- direction_mismatch#
A registered signal’s declared direction disagrees with the underlying filter’s
keep_documentbehavior. The run stops because the retention figures would be wrong. Report the defect rather than overriding it.
- empty_corpus#
input_globmatched files but no parsable records. Checktext_fieldand confirm that the files are JSONL.
- config_error#
The configuration requests a figure that cannot be reported, usually
models.tokenizerwithout arevision. The message names the field.
Examples#
Profile the packaged fixture with the English reference pack:
uv run --no-sync nemotron steps run curate/profile -c en
Profile an ingested Vietnamese corpus with every supported signal:
uv run --no-sync nemotron steps run curate/profile -c default \
input_glob=./output/vi/ingested/*.jsonl \
output_dir=./output/vi/profile \
language=vi \
langpack_dir=./src/nemotron/steps/curate/nemo_curator/data/langpacks \
id_field=id