From 83cee2a6049b8287de1b5ebf41b2a0728e235b11 Mon Sep 17 00:00:00 2001 From: hiyouga Date: Thu, 16 Nov 2023 03:27:19 +0800 Subject: [PATCH] tiny fix --- src/llmtuner/extras/callbacks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llmtuner/extras/callbacks.py b/src/llmtuner/extras/callbacks.py index 1d9e0051..5cf62cdc 100644 --- a/src/llmtuner/extras/callbacks.py +++ b/src/llmtuner/extras/callbacks.py @@ -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):