From ae33e4f7ac96235d6e8189ee0cbbdb4c43cc14f9 Mon Sep 17 00:00:00 2001 From: Taichi-Ibi Date: Wed, 7 Feb 2024 18:01:39 +0900 Subject: [PATCH] change 'torch.as_tensor(input_ids).cuda()' to kwargs --- fastchat/llm_judge/gen_model_answer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastchat/llm_judge/gen_model_answer.py b/fastchat/llm_judge/gen_model_answer.py index 708aa0bc3..13c8cf1f7 100644 --- a/fastchat/llm_judge/gen_model_answer.py +++ b/fastchat/llm_judge/gen_model_answer.py @@ -121,7 +121,7 @@ def get_model_answers( # some models may error out when generating long outputs try: output_ids = model.generate( - torch.as_tensor(input_ids).cuda(), + input_ids=torch.as_tensor(input_ids).cuda(), do_sample=do_sample, temperature=temperature, max_new_tokens=max_new_token,