Init Embeddings YAML Reference#
The tokenizer_extension/init_embeddings step ships src/nemotron/steps/tokenizer_extension/init_embeddings/config/default.yaml as its starter configuration.
This page lists the keys you can override with nemotron steps run tokenizer_extension/init_embeddings key=value dotlists, with the full file inlined below.
Default Configuration File#
# Embedding init -> resized HF checkpoint for CPT. Needs a GPU node (loads the model).
#
# Dispatches to an init engine (embeddings.py):
# method: baseline | subword | focus
# The default is subword/uniform (a.k.a. mean-of-constituents): every new token
# is initialized from the uniform mean of its base-vocabulary subword rows, with
# input norm correction to the median Devanagari norm.
# Nemotron-H and similar architectures ship their modeling code in the model
# repo, so loading them executes that code. The step defaults to false; this
# config opts in because the base model below requires it. Set false for any
# repo you do not trust, and prefer a pinned revision.
trust_remote_code: true
base_model: nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-Base-BF16
dtype: bfloat16
# Target language. Selects the script used to find the base model's existing
# target rows, and the auxiliary encoder / fastText vectors (MuRIL for Indic,
# XLM-R otherwise). Set this instead of hardcoding bert_model / candidate_pool.
language: hindi
arm: add # add | replace (replace needs extend's replace/ output + its id_remap.json)
# Extended (append-style) tokenizer from the extend step.
extended_tokenizer: ./output/tokenizer_extension/add
# Resized HF checkpoint (weights + tokenizer) -> becomes CPT's hf_model_path.
output_dir: ./output/resized_checkpoint
method: subword
baseline:
mode: mean_target # hf_default | mean_all | mean_target
norm_correction: true
num_samples: 10
subword:
input_averaging: uniform # uniform | char_weighted | max_char | bert_weighted | gemma_weighted
output_averaging: uniform
input_norm_correction: true
output_norm_correction: false # ON risks LM-head over-confidence -> loss explosion
input_target_norm: true # normalize to the median target-script norm
output_target_norm: false
temperature: 0.1 # only used by bert_weighted / gemma_weighted
# Leave bert_model unset so `language:` picks the right encoder. Setting it
# here OVERRIDES the profile -- that is how a Vietnamese run silently ended up
# weighting with MuRIL, which has no Vietnamese.
# bert_model: google/muril-base-cased
gemma_model: google/gemma-2-27b
num_samples: 10
focus:
fasttext_model: null # required for method: focus (a cc.hi.300.bin)
candidate_pool: target # target | all
sparsemax_temperature: 0.05
num_samples: 10
top_contributors: 5
Keys Grouped by Concern#
Model, Tokenizer, and Arm#
Key |
Default |
Description |
|---|---|---|
|
|
Base checkpoint whose embeddings are resized. Its embedding row count must equal the base tokenizer size. |
|
|
Passed when loading the model. The step default is |
|
|
Weight dtype for loading and saving. |
|
|
Registered language profile that selects the target script, the auxiliary encoder, and the fastText vectors. |
|
|
|
|
|
Tokenizer directory written by |
|
|
Resized checkpoint directory; the value for |
|
|
|
baseline#
Key |
Default |
Description |
|---|---|---|
|
|
|
|
|
Rescale new rows to the median norm of the existing rows. |
|
|
Number of new tokens whose initialization is reported in the log. |
subword#
Key |
Default |
Description |
|---|---|---|
|
|
|
|
|
Same choices for language-model-head rows. |
|
|
Rescale new input rows to the median norm. |
|
|
Rescale new output rows. Enabling it risks language-model-head over-confidence and loss divergence. |
|
|
Use the median norm of the target-script rows rather than of all rows. |
|
|
Same for output rows. |
|
|
Softmax temperature; used only by |
|
unset |
Encoder for |
|
|
Decoder whose input embedding table |
|
|
Number of new tokens reported in the log. |
focus#
Key |
Default |
Description |
|---|---|---|
|
|
Path to a fastText |
|
|
|
|
|
Divisor applied to cosine similarities before Sparsemax. |
|
|
Number of new tokens reported in the log. |
|
|
Number of contributing base tokens listed per reported token. |