Extend YAML Reference#
The tokenizer_extension/extend step ships src/nemotron/steps/tokenizer_extension/extend/config/default.yaml as its starter configuration.
This page lists the keys you can override with nemotron steps run tokenizer_extension/extend key=value dotlists, with the full file inlined below.
Default Configuration File#
# Tokenizer extension — ONE arm per job (add OR replace). CPU-only. Production starter.
model_id: nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-Base-BF16
trust_remote_code: true
method: replace # add | replace (run the two as separate jobs)
extension_size: 30000
# `language:` selects the corpus normalizer AND the Replace prune script from
# the profile table in ../../languages.py (hindi, vietnamese, malayalam, ...).
# Set it to match your corpus. Left unset, the legacy Devanagari defaults apply.
language: hindi
# Both are optional overrides; leave unset (or null) to use the profile above.
# Setting remove_script here OVERRIDES `language:` -- that is how a Vietnamese
# run can silently end up pruning Devanagari rows.
# remove_script: devanagari # for Replace: script(s) whose residual tokens are pruned
# script_normalizer: devanagari
# Corpus for TRAINING the BPE. Provide EITHER an HF dataset OR a local path.
# HF subset model: hf_dataset (path) -> hf_name (config/subset) -> hf_split,
# plus optional hf_data_dir / hf_data_files / hf_revision.
corpus:
hf_dataset: ai4bharat/sangraha
hf_name: verified # e.g. 'verified' (sangraha) or 'hi' (samanantar)
hf_split: hin # e.g. 'hin' (sangraha) or 'train' (samanantar)
hf_data_dir: null
hf_data_files: null
hf_revision: null
streaming: false # false = download+cache (reused by later jobs)
path: null # OR a local parquet dir/glob or jsonl (leave hf_dataset null)
glob: "*.parquet"
text_field: text # the text column
samples: 1000000
max_doc_chars: 20000
min_frequency: 0 # 0 = keep all merges (splice is rank-dead-proof)
diversify: true
batch_size: 1000
output_dir: ./output/tokenizer_extension
Keys Grouped by Concern#
Base Tokenizer and Method#
Key |
Default |
Description |
|---|---|---|
|
|
Hugging Face identifier or local path whose tokenizer is extended. Only the tokenizer is read. |
|
|
Passed to |
|
|
|
|
|
Number of new tokens to splice into the vocabulary. |
|
|
Documents per batch fed to the BPE trainer. |
|
|
Parent directory; the step writes to |
Language and Overrides#
Key |
Default |
Description |
|---|---|---|
|
|
Registered language profile that selects the corpus normalizer and the Replace prune script. Absent, the Devanagari defaults apply. |
|
unset |
Comma-separated |
|
unset |
|
Corpus#
The corpus block accepts either a Hugging Face dataset or a local path; the corpus_source_unset error is raised when neither is set.
Key |
Default |
Description |
|---|---|---|
|
|
Dataset identifier passed as |
|
|
Dataset configuration or subset passed as |
|
|
Split to read. |
|
|
Optional |
|
|
Optional |
|
|
Optional dataset revision. |
|
|
|
|
|
Local Parquet directory or glob, or a JSON Lines path. |
|
|
File pattern applied when |
|
|
Column that holds the document text. For a Hugging Face dataset or JSON Lines input, a missing column raises an error listing the available columns. For local Parquet, it raises |
|
|
Maximum documents used for training. |
|
|
Documents are truncated to this many characters. Lower it on a memory-limited node. |
|
|
Minimum word frequency for a merge; |
|
|
For a local directory, sample evenly across shards. |