Skip to content

Commit

Permalink
update ppo
Browse files Browse the repository at this point in the history
  • Loading branch information
Joyce94 committed Aug 26, 2023
1 parent 16bc92e commit 0d81294
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/utils/ppo_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _init_actor(self):
)

if self.model_args.actor_peft_path is not None:
model = PeftModel.from_pretrained(model, self.model_args.actor_peft_path)
model = PeftModel.from_pretrained(model, self.model_args.actor_peft_path, is_trainable=True)
else:
lora_config = LoraConfig(
task_type=TaskType.CAUSAL_LM,
Expand Down Expand Up @@ -109,7 +109,7 @@ def _init_critic(self):
model = model.merge_and_unload()

if self.model_args.critic_peft_path is not None:
model = PeftModel.from_pretrained(model, self.model_args.critic_peft_path, adapter_name="default")
model = PeftModel.from_pretrained(model, self.model_args.critic_peft_path, adapter_name="default", is_trainable=True)

else:
lora_config = LoraConfig(
Expand Down

0 comments on commit 0d81294

Please sign in to comment.