Spaces:
Running
Running
edbeeching
commited on
Commit
•
a460f7a
1
Parent(s):
db6f218
updated text
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ from utils import get_eval_results_dicts, make_clickable_model
|
|
13 |
# clone / pull the lmeh eval data
|
14 |
H4_TOKEN = os.environ.get("H4_TOKEN", None)
|
15 |
LMEH_REPO = "HuggingFaceH4/lmeh_evaluations"
|
16 |
-
IS_PUBLIC = bool(
|
17 |
|
18 |
repo=None
|
19 |
if H4_TOKEN:
|
@@ -47,7 +47,7 @@ def load_results(model, benchmark, metric):
|
|
47 |
return mean_acc, data["config"]["model_args"]
|
48 |
|
49 |
|
50 |
-
COLS = ["
|
51 |
TYPES = ["markdown","str", "number", "number", "number", "number", "number", ]
|
52 |
|
53 |
if not IS_PUBLIC:
|
@@ -64,10 +64,10 @@ def get_leaderboard():
|
|
64 |
all_data = get_eval_results_dicts(IS_PUBLIC)
|
65 |
|
66 |
gpt4_values = {
|
67 |
-
"
|
68 |
-
"
|
69 |
"8bit":None,
|
70 |
-
"
|
71 |
"ARC (25-shot) ⬆️":96.3,
|
72 |
"HellaSwag (10-shot) ⬆️":95.3,
|
73 |
"MMLU (5-shot) ⬆️":86.4,
|
@@ -75,10 +75,10 @@ def get_leaderboard():
|
|
75 |
}
|
76 |
all_data.append(gpt4_values)
|
77 |
gpt35_values = {
|
78 |
-
"
|
79 |
-
"
|
80 |
"8bit":None,
|
81 |
-
"
|
82 |
"ARC (25-shot) ⬆️":85.2,
|
83 |
"HellaSwag (10-shot) ⬆️":85.5,
|
84 |
"MMLU (5-shot) ⬆️":70.0,
|
@@ -87,7 +87,7 @@ def get_leaderboard():
|
|
87 |
all_data.append(gpt35_values)
|
88 |
|
89 |
dataframe = pd.DataFrame.from_records(all_data)
|
90 |
-
dataframe = dataframe.sort_values(by=['
|
91 |
print(dataframe)
|
92 |
dataframe = dataframe[COLS]
|
93 |
return dataframe
|
@@ -202,13 +202,13 @@ with block:
|
|
202 |
gr.Markdown(f"""
|
203 |
# 🤗 Open Chatbot Leaderboard
|
204 |
<font size="4">With the plethora of chatbot LLMs being released week upon week, often with grandiose claims of their performance, it can be hard to filter out the genuine progress that is being made by the open-source community and which chatbot is the current state of the art. The 🤗 Open Chatbot Leaderboard aims to track, rank and evaluate chatbot models as they are released. We evaluate models of 4 key benchmarks from the <a href="https://github.com/EleutherAI/lm-evaluation-harness" target="_blank"> Eleuther AI Language Model Evaluation Harness </a>, a unified framework to test generative language models on a large number of different evaluation tasks. A key advantage of this leaderboard is that anyone from the community can submit a model for automated evaluation on the 🤗 research cluster. As long as it is Transformers model with weights on the 🤗 hub. We also support delta-weights for non-commercial licensed models, such as llama.
|
205 |
-
|
206 |
Evaluation is performed against 4 popular benchmarks:
|
207 |
- <a href="https://arxiv.org/abs/1803.05457" target="_blank"> AI2 Reasoning Challenge </a> (25-shot) - a set of grade-school science questions.
|
208 |
- <a href="https://arxiv.org/abs/1905.07830" target="_blank"> HellaSwag </a> (10-shot) - a test of commonsense inference, which is easy for humans (~95%) but challenging for SOTA models.
|
209 |
- <a href="https://arxiv.org/abs/2009.03300" target="_blank"> MMLU </a> (5-shot) - a test to measure a text model's multitask accuracy. The test covers 57 tasks including elementary mathematics, US history, computer science, law, and more.
|
210 |
- <a href="https://arxiv.org/abs/2109.07958" target="_blank"> Truthful QA MC </a> (0-shot) - a benchmark to measure whether a language model is truthful in generating answers to questions.
|
211 |
-
|
212 |
We chose these benchmarks as they test a variety of reasoning and general knowledge across a wide variety of fields in 0-shot and few-shot settings. </font>
|
213 |
""")
|
214 |
|
|
|
13 |
# clone / pull the lmeh eval data
|
14 |
H4_TOKEN = os.environ.get("H4_TOKEN", None)
|
15 |
LMEH_REPO = "HuggingFaceH4/lmeh_evaluations"
|
16 |
+
IS_PUBLIC = bool(os.environ.get("IS_PUBLIC", None))
|
17 |
|
18 |
repo=None
|
19 |
if H4_TOKEN:
|
|
|
47 |
return mean_acc, data["config"]["model_args"]
|
48 |
|
49 |
|
50 |
+
COLS = ["Model", "Revision", "Average ⬆️", "ARC (25-shot) ⬆️", "HellaSwag (10-shot) ⬆️", "MMLU (5-shot) ⬆️", "TruthQA (0-shot) ⬆️"]
|
51 |
TYPES = ["markdown","str", "number", "number", "number", "number", "number", ]
|
52 |
|
53 |
if not IS_PUBLIC:
|
|
|
64 |
all_data = get_eval_results_dicts(IS_PUBLIC)
|
65 |
|
66 |
gpt4_values = {
|
67 |
+
"Model":f'<a target="_blank" href=https://arxiv.org/abs/2303.08774 style="color: blue; text-decoration: underline;text-decoration-style: dotted;">gpt4</a>',
|
68 |
+
"Revision":"tech report",
|
69 |
"8bit":None,
|
70 |
+
"Average ⬆️":84.3,
|
71 |
"ARC (25-shot) ⬆️":96.3,
|
72 |
"HellaSwag (10-shot) ⬆️":95.3,
|
73 |
"MMLU (5-shot) ⬆️":86.4,
|
|
|
75 |
}
|
76 |
all_data.append(gpt4_values)
|
77 |
gpt35_values = {
|
78 |
+
"Model":f'<a target="_blank" href=https://arxiv.org/abs/2303.08774 style="color: blue; text-decoration: underline;text-decoration-style: dotted;">gpt3.5</a>',
|
79 |
+
"Revision":"tech report",
|
80 |
"8bit":None,
|
81 |
+
"Average ⬆️":71.9,
|
82 |
"ARC (25-shot) ⬆️":85.2,
|
83 |
"HellaSwag (10-shot) ⬆️":85.5,
|
84 |
"MMLU (5-shot) ⬆️":70.0,
|
|
|
87 |
all_data.append(gpt35_values)
|
88 |
|
89 |
dataframe = pd.DataFrame.from_records(all_data)
|
90 |
+
dataframe = dataframe.sort_values(by=['Average ⬆️'], ascending=False)
|
91 |
print(dataframe)
|
92 |
dataframe = dataframe[COLS]
|
93 |
return dataframe
|
|
|
202 |
gr.Markdown(f"""
|
203 |
# 🤗 Open Chatbot Leaderboard
|
204 |
<font size="4">With the plethora of chatbot LLMs being released week upon week, often with grandiose claims of their performance, it can be hard to filter out the genuine progress that is being made by the open-source community and which chatbot is the current state of the art. The 🤗 Open Chatbot Leaderboard aims to track, rank and evaluate chatbot models as they are released. We evaluate models of 4 key benchmarks from the <a href="https://github.com/EleutherAI/lm-evaluation-harness" target="_blank"> Eleuther AI Language Model Evaluation Harness </a>, a unified framework to test generative language models on a large number of different evaluation tasks. A key advantage of this leaderboard is that anyone from the community can submit a model for automated evaluation on the 🤗 research cluster. As long as it is Transformers model with weights on the 🤗 hub. We also support delta-weights for non-commercial licensed models, such as llama.
|
205 |
+
|
206 |
Evaluation is performed against 4 popular benchmarks:
|
207 |
- <a href="https://arxiv.org/abs/1803.05457" target="_blank"> AI2 Reasoning Challenge </a> (25-shot) - a set of grade-school science questions.
|
208 |
- <a href="https://arxiv.org/abs/1905.07830" target="_blank"> HellaSwag </a> (10-shot) - a test of commonsense inference, which is easy for humans (~95%) but challenging for SOTA models.
|
209 |
- <a href="https://arxiv.org/abs/2009.03300" target="_blank"> MMLU </a> (5-shot) - a test to measure a text model's multitask accuracy. The test covers 57 tasks including elementary mathematics, US history, computer science, law, and more.
|
210 |
- <a href="https://arxiv.org/abs/2109.07958" target="_blank"> Truthful QA MC </a> (0-shot) - a benchmark to measure whether a language model is truthful in generating answers to questions.
|
211 |
+
|
212 |
We chose these benchmarks as they test a variety of reasoning and general knowledge across a wide variety of fields in 0-shot and few-shot settings. </font>
|
213 |
""")
|
214 |
|
utils.py
CHANGED
@@ -49,9 +49,9 @@ class EvalResult:
|
|
49 |
|
50 |
data_dict["eval_name"] = self.eval_name
|
51 |
data_dict["8bit"] = self.is_8bit
|
52 |
-
data_dict["
|
53 |
-
data_dict["
|
54 |
-
data_dict["
|
55 |
#data_dict["# params"] = get_n_params(base_model)
|
56 |
|
57 |
for benchmark in BENCHMARKS:
|
|
|
49 |
|
50 |
data_dict["eval_name"] = self.eval_name
|
51 |
data_dict["8bit"] = self.is_8bit
|
52 |
+
data_dict["Model"] = make_clickable_model(base_model)
|
53 |
+
data_dict["Revision"] = self.revision
|
54 |
+
data_dict["Average ⬆️"] = round(sum([v for k,v in self.results.items()])/4.0,1)
|
55 |
#data_dict["# params"] = get_n_params(base_model)
|
56 |
|
57 |
for benchmark in BENCHMARKS:
|