Skip to content

Commit

Permalink
fix code (PaddlePaddle#6880)
Browse files Browse the repository at this point in the history
  • Loading branch information
DesmonDay authored Aug 31, 2023
1 parent 4c4ef61 commit 3b41581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddlenlp/trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def _load_from_checkpoint(self, resume_from_checkpoint=None):
if os.path.isfile(weights_file):
# We load the model state dict on the CPU to avoid an OOM error.
state_dict = paddle.load(weights_file, return_numpy=True)
if (isinstance(self.model, LoRAModel) and self.lmodel.lora_config.tensor_parallel_degree > 1) or (
if (isinstance(self.model, LoRAModel) and self.model.lora_config.tensor_parallel_degree > 1) or (
isinstance(self.model, PrefixModelForCausalLM)
and self.model.prefix_config.tensor_parallel_degree > 1
):
Expand Down

0 comments on commit 3b41581

Please sign in to comment.