From f5d77c32ec3d1b31efc06825f75d59d6c4e43137 Mon Sep 17 00:00:00 2001 From: Ao Tang Date: Thu, 9 Jan 2025 01:07:59 -0500 Subject: [PATCH] Fix Mistral Conversion Issue (#11786) * Fix Mistral Conversion issue * Fix Mistral Conversion issue --- scripts/checkpoint_converters/convert_mixtral_hf_to_nemo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/checkpoint_converters/convert_mixtral_hf_to_nemo.py b/scripts/checkpoint_converters/convert_mixtral_hf_to_nemo.py index 7a7bb93fb2ca..0a2634896369 100644 --- a/scripts/checkpoint_converters/convert_mixtral_hf_to_nemo.py +++ b/scripts/checkpoint_converters/convert_mixtral_hf_to_nemo.py @@ -545,6 +545,8 @@ def save_to_nemo(args, checkpoint): model.cfg.use_cpu_initialization = False model.cfg.perform_initialization = True + torch.distributed.init_process_group() + parallel_state.initialize_model_parallel() model.save_to(args.output_path) logging.info(f'NeMo model saved to: {args.output_path}')