From 1dedbf477bd4d7e52d503f3f64d1bc7bda413b7d Mon Sep 17 00:00:00 2001 From: hitoshizuku7 Date: Thu, 30 Nov 2023 16:17:52 +0900 Subject: [PATCH] fix the parameters of tokenizer --- llm_judge/gen_model_answer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llm_judge/gen_model_answer.py b/llm_judge/gen_model_answer.py index 8d2ef41..e60ed9e 100644 --- a/llm_judge/gen_model_answer.py +++ b/llm_judge/gen_model_answer.py @@ -47,7 +47,7 @@ def generate_response( generation_config (Optional[dict]): Generation config. special_token_map (Optional[dict]): Special token map used to replace special tokens. """ - inputs = tokenizer(input_text, return_tensors="pt", add_special_tokens=False) + inputs = tokenizer(input_text, return_tensors="pt", add_special_tokens=False, return_token_type_ids=False) inputs = inputs.to(model.device) input_token_ids = inputs["input_ids"]