Skip to content

Commit

Permalink
chore: update model instance pass into is peft model checks
Browse files Browse the repository at this point in the history
  • Loading branch information
lh0x00 committed Jan 28, 2024
1 parent 4db8f90 commit 00905fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,7 @@ def _inner_training_loop(
if resume_from_checkpoint is not None:
if self.is_deepspeed_enabled:
deepspeed_load_checkpoint(
self.model_wrapped, resume_from_checkpoint, load_module_strict=not _is_peft_model(model)
self.model_wrapped, resume_from_checkpoint, load_module_strict=not _is_peft_model(self.model)
)
elif is_sagemaker_mp_enabled() or self.is_fsdp_enabled:
self._load_from_checkpoint(resume_from_checkpoint, self.model_wrapped)
Expand Down Expand Up @@ -2182,7 +2182,7 @@ def _load_best_model(self):
model = self.model_wrapped if is_sagemaker_mp_enabled() else self.model
if self.is_deepspeed_enabled:
deepspeed_load_checkpoint(
self.model_wrapped, self.state.best_model_checkpoint, load_module_strict=not _is_peft_model(model),
self.model_wrapped, self.state.best_model_checkpoint, load_module_strict=not _is_peft_model(self.model),
)
elif self.is_fsdp_enabled:
load_result = load_fsdp_model(
Expand Down

0 comments on commit 00905fc

Please sign in to comment.