This commit is contained in:
hiyouga 2023-11-16 03:27:19 +08:00
parent 1817ffc86f
commit 83cee2a604
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class SavePeftModelCallback(TrainerCallback):
if model.pretrained_model.can_generate():
model.pretrained_model.generation_config.save_pretrained(args.output_dir)
if getattr(model, "is_peft_model", False):
getattr(model, "pretrained_model").save_pretrained(args.output_dir)
model.pretrained_model.save_pretrained(args.output_dir)
class LogCallback(TrainerCallback):