-
Notifications
You must be signed in to change notification settings - Fork 8
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
New MLMM tasks #99
New MLMM tasks #99
Conversation
""" | ||
|
||
# The default QA preset prompt for all models. | ||
QA_PROMPT = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default QA prompt being English may bias the results in favour of English when being compared to the base truthful_qa benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point. But I would keep it as it is to be comparable with the literature.
Alternatively, we can make language-specific prompts but then the task should be named differently.
NUM_FEW_SHOT = 25 | ||
DATASET_NAME = None | ||
|
||
def __init__(self, lang): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MMLU dataset is subdivided into various categories (cf. https://github.com/OpenGPTX/lm-evaluation-harness/blob/master/lm_eval/tasks/hendrycks_test.py), this would be a nice option to have for comparison purposes with the english task. However, the dataset as loaded here is not split by subject, the dataset builder script would have to be modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subject-level tasks are added in the latest commit. To achieve that, I uploaded the datasets to HF and updated the builder script to include the subject.
return True | ||
|
||
def validation_docs(self): | ||
return map(self._process_doc, self.dataset["validation"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strangely, the dataset builder loads {lang}_dev.json
as the validation split instead of {lang}_val.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be easily changed but I could keep it like this for consistency.
See my comments + updates. @jjbuschhoff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected when using the dataset at malteos/m_mmlu.
@@ -49,9 +123,10 @@ class GeneralHendrycksTest(MultipleChoiceTask): | |||
NUM_FEW_SHOT = 25 | |||
DATASET_NAME = None | |||
|
|||
def __init__(self, lang): | |||
def __init__(self, lang, subject=None): | |||
self.DATASET_NAME = f"mmlu_{lang}" | |||
self.DATASET_PATH = get_mlmm_dataset_path("datasets/m_mmlu") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be self.DATASET_PATH = "malteos/m_mmlu"
instead?
@jjbuschhoff HF data is no fully integrated and automatically downloaded. Can this be merged then? |
This PR adds the multilingual from https://github.com/nlp-uoregon/mlmm-evaluation/ (arc, hellaswag, mmlu, truthfulqa).
The datasets support 26 languages: Russian, German, Chinese, French, Spanish, Italian, Dutch, Vietnamese, Indonesian, Arabic, Hungarian, Romanian, Danish, Slovak, Ukrainian, Catalan, Serbian, Croatian, Hindi, Bengali, Tamil, Nepali, Malayalam, Marathi, Telugu, and Kannada.
All task data is mirrored to HF hub (e.g., https://huggingface.co/datasets/malteos/m_truthfulqa) and is downloaded automatically.
All tasks: