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

Adding MMLU and Winogrande human-translated into 11 African languages #3237

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jessicalundin
Copy link

Description
This pull request introduces the first low-resource language translation of 3 medical subjects of Massive Multitask Language Understanding (MMLU) and Winograde Small dataset to be added to the HELM benchmark. This project focuses on bridging the gap for low-resource African languages, providing a valuable resource for researchers and developers working in this area.

Repository
https://github.com/InstituteforDiseaseModeling/Bridging-the-Gap-Low-Resource-African-Languages
Dataset
https://huggingface.co/datasets/Institute-Disease-Modeling/mmlu-winogrande-afr
Paper
https://arxiv.org/pdf/2412.12417

Highlights

  • First low-resource language human translation of MMLU and Winogrande to be added to HELM.
  • Aims to enhance the HELM benchmark with more diverse language data.
  • Provides a foundation for future translations and research in low-resource languages.

Copy link
Collaborator

@yifanmai yifanmai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, thanks! I have some minor suggestions; let me know if you'd like to make those changes.

"""Run spec functions for three clinical sections of MMLU human-translated into 11 African languages

Available subjects: "clinical_knowledge", "college_medicine", "virology"
Available langs: "af", "zu", "xh", "am", "bm", "ig", "nso", "sn", "st", "tn", "ts" (see lang_map below for language code mapping to language name, or here for ISO code reference: https://huggingface.co/languages)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +38 to +48
'af': 'Afrikaans',
'zu': 'Zulu',
'xh': 'Xhosa',
'am': 'Amharic',
'bm': 'Bambara',
'ig': 'Igbo',
'nso': 'Sepedi',
'sn': 'Shona',
'st': 'Sesotho',
'tn': 'Setswana',
'ts': 'Tsonga',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side note: the format here is "use the two-letter code if available, otherwise use the three-letter code". This seems fine to me (since three-letter codes are rarely used), but note that another alternative would be to just use the three-letter codes for all languages.

@@ -0,0 +1,64 @@
"""Run spec functions for Winogrande human-translated into 11 African languages

Available langs: "af", "zu", "xh", "am", "bm", "ig", "nso", "sn", "st", "tn", "ts" (see lang_map below for language code mapping to language name, or here for ISO code reference: https://huggingface.co/languages)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


def download_mmlu_clinical_afr(self, path: str):
ensure_file_downloaded(
source_url="https://github.com/InstituteforDiseaseModeling/Bridging-the-Gap-Low-Resource-African-Languages/raw/refs/heads/main/data/evaluation_benchmarks_afr_release.zip",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


def download_winogrande_afr(self, path: str):
ensure_file_downloaded(
source_url="https://github.com/InstituteforDiseaseModeling/Bridging-the-Gap-Low-Resource-African-Languages/raw/refs/heads/main/data/evaluation_benchmarks_afr_release.zip",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description = "Winogrande (S) translated into 11 African low-resource languages"
tags = ["knowledge", "multiple_choice", "low_resource_languages"]

def __init__(self, lang: str = "af"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: don't set default values here

description = "Massive Multitask Language Understanding (MMLU) translated into 11 African low-resource languages"
tags = ["knowledge", "multiple_choice", "low_resource_languages"]

def __init__(self, subject: str = "clinical_knowledge", lang: str = "af"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: don't set default values here

unpack_type='unzip'
)

def process_csv(self, csv_path: str, split: str, pseudo_split: str) -> List[Instance]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: rename split and pseudo_split to helm_split and source_split / csv_split for clarity

@yifanmai
Copy link
Collaborator

Could you also run the linter:

pip install black==24.3.0 mypy==1.5.1 flake8==5.0.4

then run ./pre-commit.sh and resolve any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants