Skip to content

Commit 8e4f258

Browse files
committed
[bugfix] fix mcore to hf (#5929)
1 parent a5e9c7d commit 8e4f258

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swift/megatron/utils/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def convert_mcore2hf(args: ExportArguments) -> None:
283283
mg_model = peft_model.merge_and_unload()
284284
logger.info('Megatron model created successfully.')
285285
if args.to_hf:
286-
hf_model = prepare_model_template(args, patch_offload=not args.test_convert_precision)[0]
286+
hf_model, template = prepare_model_template(args, patch_offload=not args.test_convert_precision)
287287
megatron_model_meta.convert_mcore2hf(hf_model, mg_model)
288288
if args.test_convert_precision:
289289
test_convert_precision(hf_model, mg_model, template, args.test_convert_dtype)

0 commit comments

Comments
 (0)