Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Global MMLU Lite #2567

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lm_eval/tasks/global_mmlu/_default_yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
tag:
- global_mmlu
dataset_path: CohereForAI/Global-MMLU-Lite
test_split: test
fewshot_split: dev
fewshot_config:
sampler: default
output_type: multiple_choice
doc_to_text: "{{question.strip()}}\nA. {{option_a}}\nB. {{option_b}}\nC. {{option_c}}\nD. {{option_d}}\nAnswer:"
doc_to_choice: ["A", "B", "C", "D"]
doc_to_target: answer
metric_list:
- metric: acc
aggregation: mean
higher_is_better: true
metadata:
version: 0.0
42 changes: 42 additions & 0 deletions lm_eval/tasks/global_mmlu/_generate_configs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import yaml


languages = [
"en",
"ar",
"fr",
"es",
"hi",
"de",
"id",
"it",
"ja",
"ko",
"pt",
"zh",
"yo",
"bn",
"sw",
]


def main() -> None:
for language in languages:
file_name = f"global_mmlu_{language}.yaml"
try:
with open(f"{file_name}", "w") as f:
f.write("# Generated by _generate_configs.py\n")
yaml.dump(
{
"include": "_default_yaml",
"task": f"global_mmlu_{language}",
"dataset_name": language,
},
f,
)
except FileExistsError:
pass


if __name__ == "__main__":
main()
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_ar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: ar
include: _default_yaml
task: global_mmlu_ar
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_bn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: bn
include: _default_yaml
task: global_mmlu_bn
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_de.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: de
include: _default_yaml
task: global_mmlu_de
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_en.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: en
include: _default_yaml
task: global_mmlu_en
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_es.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: es
include: _default_yaml
task: global_mmlu_es
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_fr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: fr
include: _default_yaml
task: global_mmlu_fr
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_hi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: hi
include: _default_yaml
task: global_mmlu_hi
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_id.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: id
include: _default_yaml
task: global_mmlu_id
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_it.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: it
include: _default_yaml
task: global_mmlu_it
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_ja.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: ja
include: _default_yaml
task: global_mmlu_ja
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_ko.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: ko
include: _default_yaml
task: global_mmlu_ko
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_pt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: pt
include: _default_yaml
task: global_mmlu_pt
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_sw.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: sw
include: _default_yaml
task: global_mmlu_sw
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_yo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: yo
include: _default_yaml
task: global_mmlu_yo
4 changes: 4 additions & 0 deletions lm_eval/tasks/global_mmlu/global_mmlu_zh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by _generate_configs.py
dataset_name: zh
include: _default_yaml
task: global_mmlu_zh
Loading