Skip to content

Commit 38ddd8b

Browse files
committed
MMLU: Fix prompt
1 parent 1a298a8 commit 38ddd8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eval/mmlu.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def main(args):
7474

7575
# Format
7676
def format_question(question: str, choices: list[str], answer: int | None):
77-
f = question + "\n"
77+
f = "Question: " + question + "\n"
7878
for i, c in enumerate(c_options):
7979
f += c + ". " + choices[i] + "\n"
8080
f += "Answer:"
@@ -93,7 +93,7 @@ def format_question(question: str, choices: list[str], answer: int | None):
9393
if fewshots == args.fewshot_examples: break
9494
if pq["subject"] != subject: continue
9595
preprompt += format_question(pq["question"], pq["choices"], pq["answer"])
96-
preprompt_ids[subject] = tokenizer.encode(preprompt, add_bos = True)
96+
preprompt_ids[subject] = tokenizer.encode(preprompt, add_bos = False)
9797
progress.update(idx + 1)
9898

9999
# Questions

0 commit comments

Comments
 (0)