Datasets:

Modalities:
Tabular
Text
Formats:
parquet
Languages:
English
ArXiv:
DOI:
Libraries:
Datasets
Dask
License:
guipenedo HF staff commited on
Commit
0c14fbe
1 Parent(s): e4f5f2b

Update lighteval_tasks.py

Browse files
Files changed (1) hide show
  1. lighteval_tasks.py +0 -20
lighteval_tasks.py CHANGED
@@ -242,26 +242,6 @@ MMLU_TASKS = [
242
  ]
243
 
244
 
245
- def mmlu_harness(line, task_name: str = None):
246
- topic = line["subject"]
247
- prompt = f"The following are multiple choice questions (with answers) about {topic.replace('_', ' ')}.\n\n"
248
- prompt += line["question"] + "\n"
249
- prompt += "".join([f"{key}. {choice}\n" for key, choice in zip(LETTER_INDICES, line["choices"])])
250
- prompt += "Answer:"
251
-
252
- gold_ix = LETTER_INDICES.index(line["answer"]) if isinstance(line["answer"], str) else line["answer"]
253
- "__few_shots" in line and line["__few_shots"] is True # We are adding few shots
254
-
255
- return Doc(
256
- task_name=task_name,
257
- query=prompt,
258
- choices=[" A", " B", " C", " D"],
259
- target_for_fewshot_sorting=[" A", " B", " C", " D"][gold_ix],
260
- gold_index=gold_ix,
261
- instruction=f"The following are multiple choice questions (with answers) about {topic.replace('_', ' ')}.\n\n",
262
- )
263
-
264
-
265
  def mmlu_prompt(line, task_name: str = None):
266
  """MMLU prompt without letters"""
267
  topic = line["subject"]
 
242
  ]
243
 
244
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  def mmlu_prompt(line, task_name: str = None):
246
  """MMLU prompt without letters"""
247
  topic = line["subject"]