fix bug in web ui

Former-commit-id: a598f145ec903dd2b2c984d951b6c450b142ece5
This commit is contained in:
hiyouga
2023-11-16 15:21:24 +08:00
parent df83def566
commit dab9385297
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
)