Skip to content

Commit

Permalink
debug
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 3bb3b11 commit 2124d0d
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 @@ -61,6 +61,7 @@ def load_model(cls, checkpoint, strict, **kwargs):
if 'cfg' in kwargs:
model = ptl_load_state(cls, checkpoint, strict=strict, **kwargs)
else:
print('cfg= ', checkpoint[cls.CHECKPOINT_HYPER_PARAMS_KEY])
model = cls(cfg=checkpoint[cls.CHECKPOINT_HYPER_PARAMS_KEY], **kwargs)
for name, module in model.named_parameters():
if name in checkpoint['state_dict']:
Expand Down Expand Up @@ -151,6 +152,8 @@ def convert(args):
logging.info(f"loading checkpoint {args.in_file}")

model_args, ckpt, tokenizer = load_mixtral_ckpt(args.in_file)
print('type tok= ', type(tokenizer))
print('vocab-file= ', tokenizer.vocab_file)
nemo_config = load_config(model_args, tokenizer.vocab_file)

if args.precision in ["32", "16"]:
Expand Down

0 comments on commit 2124d0d

Please sign in to comment.