From 8b681ee273c28813c599d9d55b2a3540c8ac257d Mon Sep 17 00:00:00 2001 From: hiyouga Date: Sun, 3 Dec 2023 21:40:40 +0800 Subject: [PATCH] fix bug --- src/llmtuner/train/ppo/trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llmtuner/train/ppo/trainer.py b/src/llmtuner/train/ppo/trainer.py index ade5a41c..f02dbdc3 100644 --- a/src/llmtuner/train/ppo/trainer.py +++ b/src/llmtuner/train/ppo/trainer.py @@ -66,7 +66,7 @@ class CustomPPOTrainer(PPOTrainer, Trainer): if self.args.max_steps > 0: logger.info("max_steps is given, it will override any value given in num_train_epochs") - if reward_model is not None: + if finetuning_args.reward_model_type == "full": if self.is_deepspeed_enabled: if not ( getattr(reward_model.pretrained_model, "is_loaded_in_8bit", False)