Skip to content

Commit

Permalink
Check tokenizer is present.
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandros Koumparoulis <[email protected]>
  • Loading branch information
akoumpa committed Jan 30, 2024
1 parent 7d82bd4 commit 01860ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/nlp_language_modeling/convert_hf_mixtral_to_nemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def load_model(cls, checkpoint, strict, **kwargs):

# register the artifacts
cfg = checkpoint[cls.CHECKPOINT_HYPER_PARAMS_KEY]
assert os.path.exists(
cfg.tokenizer.model
), f"Expected cfg.tokenizer.model {cfg.tokenizer.model} to be present"
if cfg.tokenizer.model is not None:
model.register_artifact("tokenizer.tokenizer_model", cfg.tokenizer.model)
if cfg.tokenizer.vocab_file is not None:
Expand Down

0 comments on commit 01860ff

Please sign in to comment.