fix bug in web ui

Former-commit-id: 6efa38be46
This commit is contained in:
hiyouga
2023-11-16 15:21:24 +08:00
parent e4f97615f0
commit 3f53155a90
3 changed files with 19 additions and 13 deletions

View File

@@ -202,7 +202,6 @@ def load_model_and_tokenizer(
# Prepare model with valuehead for RLHF
if stage in ["rm", "ppo"]:
model: "AutoModelForCausalLMWithValueHead" = AutoModelForCausalLMWithValueHead.from_pretrained(model)
reset_logging()
vhead_path = (
model_args.checkpoint_dir[-1] if model_args.checkpoint_dir is not None else model_args.model_name_or_path
)