File tree Expand file tree Collapse file tree
src/megatron/bridge/recipes/nemotronh/gb200 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ def nemotron_3_nano_pretrain_8gpu_gb200_bf16_config() -> ConfigContainer:
4141 cfg = _pretrain_common ()
4242
4343 cfg .model = AutoBridge .from_hf_pretrained (_NEMOTRON_3_NANO_MODEL_ID ).to_megatron_provider (load_weights = False )
44+ # Pretraining may use a tokenizer other than the HF checkpoint tokenizer.
45+ # Defer the model vocabulary size to the runtime tokenizer, matching the
46+ # pre-migration MambaModelProvider recipe behavior.
47+ cfg .model .vocab_size = None
4448 cfg .tokenizer .tokenizer_model = _NEMOTRON_3_NANO_MODEL_ID
4549
4650 cfg .model .seq_length = 4096
Original file line number Diff line number Diff line change @@ -139,6 +139,13 @@ def test_nemotronh_recipe_rejects_unknown_cli_override():
139139 assert not hasattr (cfg .model , "not_a_real_field" )
140140
141141
142+ def test_nemotron_3_nano_gb200_defers_vocab_size_to_training_tokenizer ():
143+ """The GB200 pretraining model vocabulary must follow its runtime tokenizer."""
144+ cfg = _nemotronh_module .nemotron_3_nano_pretrain_8gpu_gb200_bf16_config ()
145+
146+ assert cfg .model .vocab_size is None
147+
148+
142149def test_nemotron_nano_9b_v2_lora_defaults ():
143150 """Test that Nemotron Nano 9B v2 LoRA has correct default parallelism."""
144151 from megatron .bridge .recipes .nemotronh import nemotron_nano_9b_v2_peft_config
You can’t perform that action at this time.
0 commit comments