eval-tasks / preprocess_mmlu.py
CultriX's picture
Upload folder using huggingface_hub
6afe180 verified
raw
history blame contribute delete
217 Bytes
def doc_to_text(doc) -> str:
choices = ""
for idx, choice in enumerate(doc["choices"]):
letter = "ABCD"[idx]
choices += f"{letter}. {choice}\n"
return f"Question: {doc['question']}\n{choices}\nAnswer:"