Spaces:
Running
Running
wenhuchen
commited on
Commit
·
01877fc
1
Parent(s):
bb81b02
adding MMLU-STEM
Browse files
utils.py
CHANGED
@@ -15,9 +15,10 @@ MODEL_INFO = [
|
|
15 |
"MATH",
|
16 |
"GSM",
|
17 |
"GPQA",
|
|
|
18 |
]
|
19 |
|
20 |
-
DATA_TITILE_TYPE = ['markdown', 'number', 'number', 'number', 'number', 'number']
|
21 |
|
22 |
SUBMISSION_NAME = "science_leaderboard_submission"
|
23 |
SUBMISSION_URL = os.path.join("https://huggingface.co/datasets/TIGER-Lab/", SUBMISSION_NAME)
|
@@ -37,6 +38,7 @@ LEADERBORAD_INTRODUCTION = """# Science Leaderboard
|
|
37 |
<li> GSM8K (4-shot): this contains the test set of 1320 questions from grade school math word problems. This dataset is mainly covering algebra problems.
|
38 |
<li> TheoremQA (5-shot): this contains the test set of 800 questions collected from college-level exams. This covers math, physics, engineering and finance.
|
39 |
<li> GPQA (5-shot): this contains the test of 198 questions from college-level dataset GPQA-diamond. This covers many fields like chemistry, genetics, biology, etc.
|
|
|
40 |
</ul>
|
41 |
|
42 |
**"How to evaluate your model and submit your results?"**<br>
|
@@ -66,6 +68,10 @@ TheoremQA: A Theorem-driven Question Answering dataset<br>
|
|
66 |
GPQA: A Graduate-Level Google-Proof Q&A Benchmark<br>
|
67 |
<a href='https://arxiv.org/pdf/2311.12022.pdf'>Paper</a><br>
|
68 |
<a href='https://github.com/idavidrein/gpqa'>Code</a>
|
|
|
|
|
|
|
|
|
69 |
"""
|
70 |
|
71 |
CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
|
@@ -92,6 +98,12 @@ CITATION_BUTTON_TEXT = r"""@inproceedings{hendrycks2021measuring,
|
|
92 |
author={Rein, David and Hou, Betty Li and Stickland, Asa Cooper and Petty, Jackson and Pang, Richard Yuanzhe and Dirani, Julien and Michael, Julian and Bowman, Samuel R},
|
93 |
journal={arXiv preprint arXiv:2311.12022},
|
94 |
year={2023}
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}"""
|
96 |
|
97 |
SUBMIT_INTRODUCTION = """# Submit on Science Leaderboard Introduction
|
@@ -104,8 +116,9 @@ SUBMIT_INTRODUCTION = """# Submit on Science Leaderboard Introduction
|
|
104 |
"Repo": "https://huggingface.co/[MODEL_NAME]"
|
105 |
"TheoremQA": 50,
|
106 |
"MATH": 50,
|
107 |
-
"GSM": 50
|
108 |
-
"GPQA": 50
|
|
|
109 |
}
|
110 |
```
|
111 |
After submitting, you can click the "Refresh" button to see the updated leaderboard(it may takes few seconds).
|
@@ -115,7 +128,8 @@ def get_df():
|
|
115 |
repo = Repository(local_dir=SUBMISSION_NAME, clone_from=SUBMISSION_URL, use_auth_token=HF_TOKEN)
|
116 |
repo.git_pull()
|
117 |
df = pd.read_csv(CSV_DIR)
|
118 |
-
df
|
|
|
119 |
df = df.sort_values(by=['Avg'], ascending=False)
|
120 |
return df[COLUMN_NAMES]
|
121 |
|
@@ -126,7 +140,7 @@ def add_new_eval(
|
|
126 |
return "Error! Empty file!"
|
127 |
|
128 |
upload_data=json.loads(input_file)
|
129 |
-
data_row = [f'[{upload_data["Model"]}]({upload_data["Repo"]})', upload_data['TheoremQA'], upload_data['MATH'], upload_data['GSM'], upload_data['GPQA']]
|
130 |
|
131 |
submission_repo = Repository(local_dir=SUBMISSION_NAME, clone_from=SUBMISSION_URL, use_auth_token=HF_TOKEN, repo_type="dataset")
|
132 |
submission_repo.git_pull()
|
|
|
15 |
"MATH",
|
16 |
"GSM",
|
17 |
"GPQA",
|
18 |
+
"MMLU-STEM"
|
19 |
]
|
20 |
|
21 |
+
DATA_TITILE_TYPE = ['markdown', 'number', 'number', 'number', 'number', 'number', 'number']
|
22 |
|
23 |
SUBMISSION_NAME = "science_leaderboard_submission"
|
24 |
SUBMISSION_URL = os.path.join("https://huggingface.co/datasets/TIGER-Lab/", SUBMISSION_NAME)
|
|
|
38 |
<li> GSM8K (4-shot): this contains the test set of 1320 questions from grade school math word problems. This dataset is mainly covering algebra problems.
|
39 |
<li> TheoremQA (5-shot): this contains the test set of 800 questions collected from college-level exams. This covers math, physics, engineering and finance.
|
40 |
<li> GPQA (5-shot): this contains the test of 198 questions from college-level dataset GPQA-diamond. This covers many fields like chemistry, genetics, biology, etc.
|
41 |
+
<li> MMLU-STEM (5-shot): this contains the test of 3.3K questions from MMLU dataset. This covers many fields like math, chemistry, genetics, biology, computer science, anatomy, astronomy, etc.
|
42 |
</ul>
|
43 |
|
44 |
**"How to evaluate your model and submit your results?"**<br>
|
|
|
68 |
GPQA: A Graduate-Level Google-Proof Q&A Benchmark<br>
|
69 |
<a href='https://arxiv.org/pdf/2311.12022.pdf'>Paper</a><br>
|
70 |
<a href='https://github.com/idavidrein/gpqa'>Code</a>
|
71 |
+
|
72 |
+
MMLU: Measuring Massive Multitask Language Understanding<br>
|
73 |
+
<a href='https://arxiv.org/pdf/2009.03300.pdf'>Paper</a><br>
|
74 |
+
<a href='https://github.com/hendrycks/test'>Code</a>
|
75 |
"""
|
76 |
|
77 |
CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
|
|
|
98 |
author={Rein, David and Hou, Betty Li and Stickland, Asa Cooper and Petty, Jackson and Pang, Richard Yuanzhe and Dirani, Julien and Michael, Julian and Bowman, Samuel R},
|
99 |
journal={arXiv preprint arXiv:2311.12022},
|
100 |
year={2023}
|
101 |
+
}
|
102 |
+
@inproceedings{hendrycks2020measuring,
|
103 |
+
title={Measuring Massive Multitask Language Understanding},
|
104 |
+
author={Hendrycks, Dan and Burns, Collin and Basart, Steven and Zou, Andy and Mazeika, Mantas and Song, Dawn and Steinhardt, Jacob},
|
105 |
+
booktitle={International Conference on Learning Representations},
|
106 |
+
year={2020}
|
107 |
}"""
|
108 |
|
109 |
SUBMIT_INTRODUCTION = """# Submit on Science Leaderboard Introduction
|
|
|
116 |
"Repo": "https://huggingface.co/[MODEL_NAME]"
|
117 |
"TheoremQA": 50,
|
118 |
"MATH": 50,
|
119 |
+
"GSM": 50,
|
120 |
+
"GPQA": 50,
|
121 |
+
"MMLU-STEM": 50
|
122 |
}
|
123 |
```
|
124 |
After submitting, you can click the "Refresh" button to see the updated leaderboard(it may takes few seconds).
|
|
|
128 |
repo = Repository(local_dir=SUBMISSION_NAME, clone_from=SUBMISSION_URL, use_auth_token=HF_TOKEN)
|
129 |
repo.git_pull()
|
130 |
df = pd.read_csv(CSV_DIR)
|
131 |
+
print(df)
|
132 |
+
df['Avg'] = df[['TheoremQA', 'MATH', 'GSM', 'GPQA', 'MMLU-STEM']].mean(axis=1).round(1)
|
133 |
df = df.sort_values(by=['Avg'], ascending=False)
|
134 |
return df[COLUMN_NAMES]
|
135 |
|
|
|
140 |
return "Error! Empty file!"
|
141 |
|
142 |
upload_data=json.loads(input_file)
|
143 |
+
data_row = [f'[{upload_data["Model"]}]({upload_data["Repo"]})', upload_data['TheoremQA'], upload_data['MATH'], upload_data['GSM'], upload_data['GPQA'], upload_data['MMLU-STEM']]
|
144 |
|
145 |
submission_repo = Repository(local_dir=SUBMISSION_NAME, clone_from=SUBMISSION_URL, use_auth_token=HF_TOKEN, repo_type="dataset")
|
146 |
submission_repo.git_pull()
|