[GLM4.6v] Required changes for bumping up to transformer 5.x (#13229)

This commit is contained in:
Binyao Jiang
2025-11-18 10:58:00 +08:00
committed by GitHub
parent d7984f3125
commit 90c18a16cb
11 changed files with 29 additions and 26 deletions
+3 -1
View File
@@ -68,7 +68,9 @@ class TestRewardModels(CustomTestCase):
torch_dtype=torch_dtype,
model_type="reward",
) as srt_runner:
prompts = srt_runner.tokenizer.apply_chat_template(convs, tokenize=False)
prompts = srt_runner.tokenizer.apply_chat_template(
convs, tokenize=False, return_dict=False
)
srt_outputs = srt_runner.forward(prompts)
hf_scores = torch.tensor(hf_outputs.scores)