forked from EleutherAI/lm-evaluation-harness
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[m_mmul] added multilingual evaluation from alexandrainst/m_mmlu (Ele…
- Loading branch information
Showing
34 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
group: | ||
- m_mmlu | ||
dataset_path: alexandrainst/m_mmlu | ||
test_split: test | ||
fewshot_split: train | ||
fewshot_config: | ||
sampler: first_n | ||
output_type: multiple_choice | ||
doc_to_text: "{{instruction.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 |
33 changes: 33 additions & 0 deletions
33
lm_eval/tasks/okapi/mmlu_multilingual/_generate_configs.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import yaml | ||
import datasets | ||
|
||
from tqdm import tqdm | ||
|
||
|
||
def main() -> None: | ||
dataset_path = "alexandrainst/m_mmlu" | ||
|
||
# Removed hy and sk subdataset because the original dataset is broken | ||
# I created this PR https://huggingface.co/datasets/alexandrainst/m_mmlu/discussions/3 | ||
# on the dataset for the authors, in case it will be accepeted the filter can be removed | ||
keys_without_hy_sk = list(filter(lambda k: ('hy' not in k and 'sk' not in k), | ||
datasets.get_dataset_infos(dataset_path).keys())) | ||
|
||
for task in tqdm(): | ||
file_name = f"m_mmlu_{task}.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"{dataset_path.split('/')[-1]}_{task}", | ||
"dataset_name": task, | ||
}, | ||
f, | ||
) | ||
except FileExistsError: | ||
pass | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: m_mmlu_ar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: m_mmlu_bn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: ca | ||
include: _default_yaml | ||
task: m_mmlu_ca |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: da | ||
include: _default_yaml | ||
task: m_mmlu_da |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: m_mmlu_de |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: m_mmlu_en |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: m_mmlu_es |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: eu | ||
include: _default_yaml | ||
task: m_mmlu_eu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: m_mmlu_fr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: gu | ||
include: _default_yaml | ||
task: m_mmlu_gu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: m_mmlu_hi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: hr | ||
include: _default_yaml | ||
task: m_mmlu_hr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: hu | ||
include: _default_yaml | ||
task: m_mmlu_hu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: m_mmlu_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: is | ||
include: _default_yaml | ||
task: m_mmlu_is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: m_mmlu_it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: kn | ||
include: _default_yaml | ||
task: m_mmlu_kn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: ml | ||
include: _default_yaml | ||
task: m_mmlu_ml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: mr | ||
include: _default_yaml | ||
task: m_mmlu_mr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: nb | ||
include: _default_yaml | ||
task: m_mmlu_nb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: ne | ||
include: _default_yaml | ||
task: m_mmlu_ne |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: nl | ||
include: _default_yaml | ||
task: m_mmlu_nl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: m_mmlu_pt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: ro | ||
include: _default_yaml | ||
task: m_mmlu_ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: ru | ||
include: _default_yaml | ||
task: m_mmlu_ru |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: sr | ||
include: _default_yaml | ||
task: m_mmlu_sr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: sv | ||
include: _default_yaml | ||
task: m_mmlu_sv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: ta | ||
include: _default_yaml | ||
task: m_mmlu_ta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: te | ||
include: _default_yaml | ||
task: m_mmlu_te |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: uk | ||
include: _default_yaml | ||
task: m_mmlu_uk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by _generate_configs.py | ||
dataset_name: vi | ||
include: _default_yaml | ||
task: m_mmlu_vi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: m_mmlu_zh |