Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
04b69f5c
Commit
04b69f5c
authored
Nov 14, 2023
by
lintangsutawika
Browse files
Merge branch 'big-refactor' of
https://github.com/EleutherAI/lm-evaluation-harness
into alt_worlds
parents
f8740ff4
e35b0667
Changes
64
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
37 additions
and
49 deletions
+37
-49
lm_eval/evaluator.py
lm_eval/evaluator.py
+4
-12
lm_eval/tasks/mmlu/default/_default_template_yaml
lm_eval/tasks/mmlu/default/_default_template_yaml
+0
-1
lm_eval/tasks/mmlu/flan_cot_fewshot/_mmlu_flan_cot_fewshot_template_yaml
...mlu/flan_cot_fewshot/_mmlu_flan_cot_fewshot_template_yaml
+0
-1
lm_eval/tasks/mmlu/flan_cot_zeroshot/_mmlu_flan_cot_zeroshot_template_yaml
...u/flan_cot_zeroshot/_mmlu_flan_cot_zeroshot_template_yaml
+0
-1
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/_mmlu.yaml
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/_mmlu.yaml
+5
-5
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/_mmlu_flan_loglikelihood_template_yaml
...shot/loglikelihood/_mmlu_flan_loglikelihood_template_yaml
+0
-1
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_abstract_algebra.yaml
...mmlu/flan_n_shot/loglikelihood/mmlu_abstract_algebra.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_anatomy.yaml
...al/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_anatomy.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_astronomy.yaml
.../tasks/mmlu/flan_n_shot/loglikelihood/mmlu_astronomy.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_business_ethics.yaml
.../mmlu/flan_n_shot/loglikelihood/mmlu_business_ethics.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_clinical_knowledge.yaml
...lu/flan_n_shot/loglikelihood/mmlu_clinical_knowledge.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_biology.yaml
.../mmlu/flan_n_shot/loglikelihood/mmlu_college_biology.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_chemistry.yaml
...mlu/flan_n_shot/loglikelihood/mmlu_college_chemistry.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_computer_science.yaml
...n_n_shot/loglikelihood/mmlu_college_computer_science.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_mathematics.yaml
...u/flan_n_shot/loglikelihood/mmlu_college_mathematics.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_medicine.yaml
...mmlu/flan_n_shot/loglikelihood/mmlu_college_medicine.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_physics.yaml
.../mmlu/flan_n_shot/loglikelihood/mmlu_college_physics.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_computer_security.yaml
...mlu/flan_n_shot/loglikelihood/mmlu_computer_security.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_conceptual_physics.yaml
...lu/flan_n_shot/loglikelihood/mmlu_conceptual_physics.yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_econometrics.yaml
...sks/mmlu/flan_n_shot/loglikelihood/mmlu_econometrics.yaml
+2
-2
No files found.
lm_eval/evaluator.py
View file @
04b69f5c
...
...
@@ -564,8 +564,6 @@ def evaluate(
task_hierarchy
,
task_order
,
versions
,
task_group_alias
)
_results_agg
=
collections
.
defaultdict
(
dict
)
_versions
=
collections
.
defaultdict
(
dict
)
for
task
in
results_agg
:
task_results
=
results_agg
[
task
]
...
...
@@ -579,15 +577,10 @@ def evaluate(
if
task
in
task_group_alias
:
task_alias
=
task_group_alias
[
task
]
_results_agg
[
tab_string
+
task_alias
]
=
task_results
_versions
[
tab_string
+
task_alias
]
=
versions
[
task
]
results_agg
[
task
][
"alias"
]
=
tab_string
+
task_alias
else
:
_results_agg
[
tab_string
+
task
]
=
task_results
_versions
[
tab_string
+
task
]
=
versions
[
task
]
results_agg
=
_results_agg
versions
=
_versions
results_agg
[
task
][
"alias"
]
=
tab_string
+
task
_groups_agg
=
collections
.
defaultdict
(
dict
)
for
group
in
groups_agg
:
group_results
=
groups_agg
[
group
]
...
...
@@ -601,10 +594,9 @@ def evaluate(
if
group
in
task_group_alias
:
group_alias
=
task_group_alias
[
group
]
_
groups_agg
[
tab_string
+
group_alias
]
=
group_results
groups_agg
[
group
][
"alias"
]
=
tab_string
+
group_alias
else
:
_groups_agg
[
tab_string
+
group
]
=
group_results
groups_agg
=
_groups_agg
groups_agg
[
group
][
"alias"
]
=
tab_string
+
group
results_dict
=
{
"results"
:
dict
(
results_agg
.
items
()),
...
...
lm_eval/tasks/mmlu/default/_default_template_yaml
View file @
04b69f5c
group: mmlu
dataset_path: hails/mmlu_no_train # a copy of `cais/mmlu` with no auxiliary_train split
test_split: test
fewshot_split: dev
...
...
lm_eval/tasks/mmlu/flan_cot_fewshot/_mmlu_flan_cot_fewshot_template_yaml
View file @
04b69f5c
group: mmlu_flan_cot_fewshot
dataset_path: hails/mmlu_no_train # a copy of `cais/mmlu` with no auxiliary_train split
validation_split: validation
fewshot_split: dev
...
...
lm_eval/tasks/mmlu/flan_cot_zeroshot/_mmlu_flan_cot_zeroshot_template_yaml
View file @
04b69f5c
group: mmlu_flan_cot_zeroshot
dataset_path: hails/mmlu_no_train # a copy of `cais/mmlu` with no auxiliary_train split
validation_split: validation
fewshot_split: dev
...
...
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/_mmlu.yaml
View file @
04b69f5c
group
:
mmlu_flan_n_shot_
generative
group
:
mmlu_flan_n_shot_
loglikelihood
task
:
-
mmlu_flan_n_shot_
generative
_stem
-
mmlu_flan_n_shot_
generative
_other
-
mmlu_flan_n_shot_
generative
_social_sciences
-
mmlu_flan_n_shot_
generative
_humanities
-
mmlu_flan_n_shot_
loglikelihood
_stem
-
mmlu_flan_n_shot_
loglikelihood
_other
-
mmlu_flan_n_shot_
loglikelihood
_social_sciences
-
mmlu_flan_n_shot_
loglikelihood
_humanities
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/_mmlu_flan_loglikelihood_template_yaml
View file @
04b69f5c
group: mmlu_flan_n_shot_loglikelihood
dataset_path: hails/mmlu_no_train # a copy of `cais/mmlu` with no auxiliary_train split
test_split: test
fewshot_split: dev
...
...
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_abstract_algebra.yaml
View file @
04b69f5c
"
dataset_name"
:
"
abstract_algebra"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
abstract
\
\
algebra.
\n\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_stem"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_stem"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_abstract_algebra"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_abstract_algebra"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_anatomy.yaml
View file @
04b69f5c
"
dataset_name"
:
"
anatomy"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
anatomy.
\n\
\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_stem"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_stem"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_anatomy"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_anatomy"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_astronomy.yaml
View file @
04b69f5c
"
dataset_name"
:
"
astronomy"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
astronomy.
\n\
\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_stem"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_stem"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_astronomy"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_astronomy"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_business_ethics.yaml
View file @
04b69f5c
"
dataset_name"
:
"
business_ethics"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
business
\
\
ethics.
\n\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_other"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_other"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_business_ethics"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_business_ethics"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_clinical_knowledge.yaml
View file @
04b69f5c
"
dataset_name"
:
"
clinical_knowledge"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
clinical
\
\
knowledge.
\n\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_other"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_other"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_clinical_knowledge"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_clinical_knowledge"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_biology.yaml
View file @
04b69f5c
"
dataset_name"
:
"
college_biology"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
college
\
\
biology.
\n\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_stem"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_stem"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_college_biology"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_college_biology"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_chemistry.yaml
View file @
04b69f5c
"
dataset_name"
:
"
college_chemistry"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
college
\
\
chemistry.
\n\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_stem"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_stem"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_college_chemistry"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_college_chemistry"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_computer_science.yaml
View file @
04b69f5c
"
dataset_name"
:
"
college_computer_science"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
college
\
\
computer
science.
\n\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_stem"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_stem"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_college_computer_science"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_college_computer_science"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_mathematics.yaml
View file @
04b69f5c
"
dataset_name"
:
"
college_mathematics"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
college
\
\
mathematics.
\n\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_stem"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_stem"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_college_mathematics"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_college_mathematics"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_medicine.yaml
View file @
04b69f5c
"
dataset_name"
:
"
college_medicine"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
college
\
\
medicine.
\n\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_other"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_other"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_college_medicine"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_college_medicine"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_college_physics.yaml
View file @
04b69f5c
"
dataset_name"
:
"
college_physics"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
college
\
\
physics.
\n\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_stem"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_stem"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_college_physics"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_college_physics"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_computer_security.yaml
View file @
04b69f5c
"
dataset_name"
:
"
computer_security"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
computer
\
\
security.
\n\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_stem"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_stem"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_computer_security"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_computer_security"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_conceptual_physics.yaml
View file @
04b69f5c
"
dataset_name"
:
"
conceptual_physics"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
conceptual
\
\
physics.
\n\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_stem"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_stem"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_conceptual_physics"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_conceptual_physics"
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/mmlu_econometrics.yaml
View file @
04b69f5c
"
dataset_name"
:
"
econometrics"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
econometrics.
\n\
\n
"
"
group"
:
"
mmlu_flan_n_shot_
generative
_social_sciences"
"
group"
:
"
mmlu_flan_n_shot_
loglikelihood
_social_sciences"
"
include"
:
"
_mmlu_flan_loglikelihood_template_yaml"
"
task"
:
"
mmlu_flan_n_shot_
generative
_econometrics"
"
task"
:
"
mmlu_flan_n_shot_
loglikelihood
_econometrics"
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment