From 543ffaf6170b057c20aa6934bea928a8665fd98a Mon Sep 17 00:00:00 2001 From: qinxy3 Date: Tue, 15 Aug 2023 11:03:24 +0800 Subject: [PATCH] fix code --- eval/evaluate_ceval.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval/evaluate_ceval.py b/eval/evaluate_ceval.py index 65423e8..e1616a5 100644 --- a/eval/evaluate_ceval.py +++ b/eval/evaluate_ceval.py @@ -95,10 +95,10 @@ def eval_subject( softval = torch.nn.functional.softmax( torch.tensor( [ - logits[tokenizer("A")['input_ids'][-1]], - logits[tokenizer("B")['input_ids'][-1]], - logits[tokenizer("C")['input_ids'][-1]], - logits[tokenizer("D")['input_ids'][-1]], + logits[tokenizer("A")['input_ids']], + logits[tokenizer("B")['input_ids']], + logits[tokenizer("C")['input_ids']], + logits[tokenizer("D")['input_ids']], ] ), dim=0,