We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5e9c7d commit 8e4f258Copy full SHA for 8e4f258
swift/megatron/utils/convert.py
@@ -283,7 +283,7 @@ def convert_mcore2hf(args: ExportArguments) -> None:
283
mg_model = peft_model.merge_and_unload()
284
logger.info('Megatron model created successfully.')
285
if args.to_hf:
286
- hf_model = prepare_model_template(args, patch_offload=not args.test_convert_precision)[0]
+ hf_model, template = prepare_model_template(args, patch_offload=not args.test_convert_precision)
287
megatron_model_meta.convert_mcore2hf(hf_model, mg_model)
288
if args.test_convert_precision:
289
test_convert_precision(hf_model, mg_model, template, args.test_convert_dtype)
0 commit comments