You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vocab_size=128256, # Explicitly set (must be >= tokenizer vocab size)
@@ -726,6 +744,17 @@ config = ConfigContainer(
726
744
)
727
745
```
728
746
747
+
Pretraining recipes enable `use_tokenizer_vocab_size` by default. For a new run, use an empty checkpoint directory so the runtime tokenizer defines the model vocabulary. A checkpoint created by that policy can be resumed with the same tokenizer and recipe configuration.
748
+
749
+
Checkpoints created before a recipe enabled `use_tokenizer_vocab_size` may have used the model provider's larger explicit vocabulary. To preserve their embedding and output tensor shapes, disable the new policy and retain the vocabulary used to create the checkpoint:
750
+
751
+
```python
752
+
config.tokenizer.use_tokenizer_vocab_size =False
753
+
config.model.vocab_size =128256# The vocabulary used to create the checkpoint
754
+
```
755
+
756
+
Do not change this setting partway through a run. Switching vocabulary policies changes model tensor shapes and is not a checkpoint migration mechanism.
757
+
729
758
730
759
### Parallelism Configuration Migration
731
760
In NeMo 2.0, parallelism settings were configured on `MegatronStrategy`. In Megatron Bridge, these are set directly on the model provider:
0 commit comments