Unverified Commit b69c67c1 authored by Alessandro Ercolani's avatar Alessandro Ercolani Committed by GitHub
Browse files

[m_mmul] added multilingual evaluation from alexandrainst/m_mmlu (#1358)

parent 7397b965
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
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()
# Generated by _generate_configs.py
dataset_name: ar
include: _default_yaml
task: m_mmlu_ar
# Generated by _generate_configs.py
dataset_name: bn
include: _default_yaml
task: m_mmlu_bn
# Generated by _generate_configs.py
dataset_name: ca
include: _default_yaml
task: m_mmlu_ca
# Generated by _generate_configs.py
dataset_name: da
include: _default_yaml
task: m_mmlu_da
# Generated by _generate_configs.py
dataset_name: de
include: _default_yaml
task: m_mmlu_de
# Generated by _generate_configs.py
dataset_name: en
include: _default_yaml
task: m_mmlu_en
# Generated by _generate_configs.py
dataset_name: es
include: _default_yaml
task: m_mmlu_es
# Generated by _generate_configs.py
dataset_name: eu
include: _default_yaml
task: m_mmlu_eu
# Generated by _generate_configs.py
dataset_name: fr
include: _default_yaml
task: m_mmlu_fr
# Generated by _generate_configs.py
dataset_name: gu
include: _default_yaml
task: m_mmlu_gu
# Generated by _generate_configs.py
dataset_name: hi
include: _default_yaml
task: m_mmlu_hi
# Generated by _generate_configs.py
dataset_name: hr
include: _default_yaml
task: m_mmlu_hr
# Generated by _generate_configs.py
dataset_name: hu
include: _default_yaml
task: m_mmlu_hu
# Generated by _generate_configs.py
dataset_name: id
include: _default_yaml
task: m_mmlu_id
# Generated by _generate_configs.py
dataset_name: is
include: _default_yaml
task: m_mmlu_is
# Generated by _generate_configs.py
dataset_name: it
include: _default_yaml
task: m_mmlu_it
# Generated by _generate_configs.py
dataset_name: kn
include: _default_yaml
task: m_mmlu_kn
# Generated by _generate_configs.py
dataset_name: ml
include: _default_yaml
task: m_mmlu_ml
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment