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
60c9c170
Commit
60c9c170
authored
May 29, 2024
by
haileyschoelkopf
Browse files
Merge branch 'main' into inverse-scaling-tasks
parents
4b2d565b
b4cd85d4
Changes
605
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
133 additions
and
11 deletions
+133
-11
lm_eval/tasks/mmlu/continuation/mmlu_professional_law.yaml
lm_eval/tasks/mmlu/continuation/mmlu_professional_law.yaml
+6
-0
lm_eval/tasks/mmlu/continuation/mmlu_professional_medicine.yaml
...l/tasks/mmlu/continuation/mmlu_professional_medicine.yaml
+6
-0
lm_eval/tasks/mmlu/continuation/mmlu_professional_psychology.yaml
...tasks/mmlu/continuation/mmlu_professional_psychology.yaml
+6
-0
lm_eval/tasks/mmlu/continuation/mmlu_public_relations.yaml
lm_eval/tasks/mmlu/continuation/mmlu_public_relations.yaml
+6
-0
lm_eval/tasks/mmlu/continuation/mmlu_security_studies.yaml
lm_eval/tasks/mmlu/continuation/mmlu_security_studies.yaml
+6
-0
lm_eval/tasks/mmlu/continuation/mmlu_sociology.yaml
lm_eval/tasks/mmlu/continuation/mmlu_sociology.yaml
+6
-0
lm_eval/tasks/mmlu/continuation/mmlu_us_foreign_policy.yaml
lm_eval/tasks/mmlu/continuation/mmlu_us_foreign_policy.yaml
+6
-0
lm_eval/tasks/mmlu/continuation/mmlu_virology.yaml
lm_eval/tasks/mmlu/continuation/mmlu_virology.yaml
+6
-0
lm_eval/tasks/mmlu/continuation/mmlu_world_religions.yaml
lm_eval/tasks/mmlu/continuation/mmlu_world_religions.yaml
+6
-0
lm_eval/tasks/mmlu/flan_cot_fewshot/_mmlu_flan_cot_fewshot_template_yaml
...mlu/flan_cot_fewshot/_mmlu_flan_cot_fewshot_template_yaml
+4
-2
lm_eval/tasks/mmlu/flan_cot_zeroshot/_mmlu_flan_cot_zeroshot_template_yaml
...u/flan_cot_zeroshot/_mmlu_flan_cot_zeroshot_template_yaml
+2
-2
lm_eval/tasks/mmlu/flan_n_shot/generative/_mmlu_flan_generative_template_yaml
...lan_n_shot/generative/_mmlu_flan_generative_template_yaml
+5
-2
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/_mmlu_flan_loglikelihood_template_yaml
...shot/loglikelihood/_mmlu_flan_loglikelihood_template_yaml
+4
-5
lm_eval/tasks/mmlu/generative/_default_template_yaml
lm_eval/tasks/mmlu/generative/_default_template_yaml
+18
-0
lm_eval/tasks/mmlu/generative/_mmlu.yaml
lm_eval/tasks/mmlu/generative/_mmlu.yaml
+6
-0
lm_eval/tasks/mmlu/generative/mmlu_abstract_algebra.yaml
lm_eval/tasks/mmlu/generative/mmlu_abstract_algebra.yaml
+8
-0
lm_eval/tasks/mmlu/generative/mmlu_anatomy.yaml
lm_eval/tasks/mmlu/generative/mmlu_anatomy.yaml
+8
-0
lm_eval/tasks/mmlu/generative/mmlu_astronomy.yaml
lm_eval/tasks/mmlu/generative/mmlu_astronomy.yaml
+8
-0
lm_eval/tasks/mmlu/generative/mmlu_business_ethics.yaml
lm_eval/tasks/mmlu/generative/mmlu_business_ethics.yaml
+8
-0
lm_eval/tasks/mmlu/generative/mmlu_clinical_knowledge.yaml
lm_eval/tasks/mmlu/generative/mmlu_clinical_knowledge.yaml
+8
-0
No files found.
lm_eval/tasks/mmlu/continuation/mmlu_professional_law.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
professional_law"
"
description"
:
"
The
following
are
questions
(with
answers)
about
professional
\
\
law.
\n\n
"
"
group"
:
"
mmlu_continuation_humanities"
"
include"
:
"
_continuation_template_yaml"
"
task"
:
"
mmlu_continuation_professional_law"
lm_eval/tasks/mmlu/continuation/mmlu_professional_medicine.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
professional_medicine"
"
description"
:
"
The
following
are
questions
(with
answers)
about
professional
\
\
medicine.
\n\n
"
"
group"
:
"
mmlu_continuation_other"
"
include"
:
"
_continuation_template_yaml"
"
task"
:
"
mmlu_continuation_professional_medicine"
lm_eval/tasks/mmlu/continuation/mmlu_professional_psychology.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
professional_psychology"
"
description"
:
"
The
following
are
questions
(with
answers)
about
professional
\
\
psychology.
\n\n
"
"
group"
:
"
mmlu_continuation_social_sciences"
"
include"
:
"
_continuation_template_yaml"
"
task"
:
"
mmlu_continuation_professional_psychology"
lm_eval/tasks/mmlu/continuation/mmlu_public_relations.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
public_relations"
"
description"
:
"
The
following
are
questions
(with
answers)
about
public
\
\
relations.
\n\n
"
"
group"
:
"
mmlu_continuation_social_sciences"
"
include"
:
"
_continuation_template_yaml"
"
task"
:
"
mmlu_continuation_public_relations"
lm_eval/tasks/mmlu/continuation/mmlu_security_studies.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
security_studies"
"
description"
:
"
The
following
are
questions
(with
answers)
about
security
\
\
studies.
\n\n
"
"
group"
:
"
mmlu_continuation_social_sciences"
"
include"
:
"
_continuation_template_yaml"
"
task"
:
"
mmlu_continuation_security_studies"
lm_eval/tasks/mmlu/continuation/mmlu_sociology.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
sociology"
"
description"
:
"
The
following
are
questions
(with
answers)
about
sociology.
\n\
\n
"
"
group"
:
"
mmlu_continuation_social_sciences"
"
include"
:
"
_continuation_template_yaml"
"
task"
:
"
mmlu_continuation_sociology"
lm_eval/tasks/mmlu/continuation/mmlu_us_foreign_policy.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
us_foreign_policy"
"
description"
:
"
The
following
are
questions
(with
answers)
about
us
\
\
foreign
policy.
\n\n
"
"
group"
:
"
mmlu_continuation_social_sciences"
"
include"
:
"
_continuation_template_yaml"
"
task"
:
"
mmlu_continuation_us_foreign_policy"
lm_eval/tasks/mmlu/continuation/mmlu_virology.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
virology"
"
description"
:
"
The
following
are
questions
(with
answers)
about
virology.
\n\
\n
"
"
group"
:
"
mmlu_continuation_other"
"
include"
:
"
_continuation_template_yaml"
"
task"
:
"
mmlu_continuation_virology"
lm_eval/tasks/mmlu/continuation/mmlu_world_religions.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
world_religions"
"
description"
:
"
The
following
are
questions
(with
answers)
about
world
\
\
religions.
\n\n
"
"
group"
:
"
mmlu_continuation_humanities"
"
include"
:
"
_continuation_template_yaml"
"
task"
:
"
mmlu_continuation_world_religions"
lm_eval/tasks/mmlu/flan_cot_fewshot/_mmlu_flan_cot_fewshot_template_yaml
View file @
60c9c170
dataset_path: hails/mmlu_no_train # a copy of `cais/mmlu` with no auxiliary_train split
dataset_path: hails/mmlu_no_train # a copy of `cais/mmlu` with no auxiliary_train split
validation_split: validation
validation_split: validation
fewshot_split: dev
fewshot_split: dev
fewshot_config:
sampler: first_n
output_type: generate_until
output_type: generate_until
doc_to_text: "Q: {{question.strip()}}\n(A) {{choices[0]}} (B) {{choices[1]}} (C) {{choices[2]}} (D) {{choices[3]}}\nA: Let's think step by step."
doc_to_text: "Q: {{question.strip()}}\n(A) {{choices[0]}} (B) {{choices[1]}} (C) {{choices[2]}} (D) {{choices[3]}}\nA: Let's think step by step."
doc_to_target: "{{['(A)', '(B)', '(C)', '(D)'][answer]}}"
doc_to_target: "{{['(A)', '(B)', '(C)', '(D)'][answer]}}"
...
@@ -8,7 +10,7 @@ filter_list:
...
@@ -8,7 +10,7 @@ filter_list:
- name: "get-answer"
- name: "get-answer"
filter:
filter:
- function: "regex"
- function: "regex"
regex_pattern: "(?<=
The
answer is )(.*)(?=.)"
regex_pattern: "(?<=answer is )(.*)(?=.)"
- function: "take_first"
- function: "take_first"
generation_kwargs:
generation_kwargs:
until:
until:
...
@@ -23,4 +25,4 @@ metric_list:
...
@@ -23,4 +25,4 @@ metric_list:
ignore_case: true
ignore_case: true
ignore_punctuation: true
ignore_punctuation: true
metadata:
metadata:
version:
0
.0
version:
1
.0
lm_eval/tasks/mmlu/flan_cot_zeroshot/_mmlu_flan_cot_zeroshot_template_yaml
View file @
60c9c170
...
@@ -8,7 +8,7 @@ filter_list:
...
@@ -8,7 +8,7 @@ filter_list:
- name: "strict-match"
- name: "strict-match"
filter:
filter:
- function: "regex"
- function: "regex"
regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=
the
answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
- function: "take_first"
- function: "take_first"
- name: "flexible-extract"
- name: "flexible-extract"
filter:
filter:
...
@@ -33,4 +33,4 @@ metric_list:
...
@@ -33,4 +33,4 @@ metric_list:
ignore_case: true
ignore_case: true
ignore_punctuation: true
ignore_punctuation: true
metadata:
metadata:
version:
1
.0
version:
2
.0
lm_eval/tasks/mmlu/flan_n_shot/generative/_mmlu_flan_generative_template_yaml
View file @
60c9c170
...
@@ -2,8 +2,10 @@ group: mmlu_flan_n_shot_generative
...
@@ -2,8 +2,10 @@ group: mmlu_flan_n_shot_generative
dataset_path: hails/mmlu_no_train # a copy of `cais/mmlu` with no auxiliary_train split
dataset_path: hails/mmlu_no_train # a copy of `cais/mmlu` with no auxiliary_train split
test_split: test
test_split: test
fewshot_split: dev
fewshot_split: dev
fewshot_config:
sampler: first_n
output_type: generate_until
output_type: generate_until
doc_to_text: "Q: {{question.strip()}}\n(A) {{choices[0]}} (B) {{choices[1]}} (C) {{choices[2]}} (D) {{choices[3]}}\nA:
"
doc_to_text: "Q: {{question.strip()}}\n(A) {{choices[0]}} (B) {{choices[1]}} (C) {{choices[2]}} (D) {{choices[3]}}\nA:"
doc_to_target: "{{['(A)', '(B)', '(C)', '(D)'][answer]}}"
doc_to_target: "{{['(A)', '(B)', '(C)', '(D)'][answer]}}"
filter_list:
filter_list:
- name: "strict-match"
- name: "strict-match"
...
@@ -22,9 +24,10 @@ generation_kwargs:
...
@@ -22,9 +24,10 @@ generation_kwargs:
- "</s>"
- "</s>"
- "Q:"
- "Q:"
- "<|im_end|>"
- "<|im_end|>"
- "\n"
metric_list:
metric_list:
- metric: exact_match
- metric: exact_match
aggregation: mean
aggregation: mean
higher_is_better: true
higher_is_better: true
metadata:
metadata:
version:
1
.0
version:
2
.0
lm_eval/tasks/mmlu/flan_n_shot/loglikelihood/_mmlu_flan_loglikelihood_template_yaml
View file @
60c9c170
dataset_path: hails/mmlu_no_train # a copy of `cais/mmlu` with no auxiliary_train split
dataset_path: hails/mmlu_no_train # a copy of `cais/mmlu` with no auxiliary_train split
test_split: test
test_split: test
fewshot_split: dev
fewshot_split: dev
fewshot_config:
sampler: first_n
output_type: multiple_choice
output_type: multiple_choice
doc_to_text: "Q: {{question.strip()}}\n(A) {{choices[0]}} (B) {{choices[1]}} (C) {{choices[2]}} (D) {{choices[3]}}\nA:
"
doc_to_text: "Q: {{question.strip()}}\n(A) {{choices[0]}} (B) {{choices[1]}} (C) {{choices[2]}} (D) {{choices[3]}}\nA:"
doc_to_choice: ["(A)", "(B)", "(C)", "(D)"]
doc_to_choice: ["(A)", "(B)", "(C)", "(D)"]
doc_to_target: answer
doc_to_target: answer
metric_list:
metric_list:
- metric: acc
- metric: acc
aggregation: mean
aggregation: mean
higher_is_better: true
higher_is_better: true
- metric: acc_norm
aggregation: mean
higher_is_better: true
metadata:
metadata:
version:
0
.0
version:
1
.0
lm_eval/tasks/mmlu/generative/_default_template_yaml
0 → 100644
View file @
60c9c170
dataset_path: hails/mmlu_no_train # a copy of `cais/mmlu` with no auxiliary_train split
test_split: test
fewshot_split: dev
fewshot_config:
sampler: first_n
output_type: generate_until
doc_to_text: "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\nD. {{choices[3]}}\nAnswer:"
doc_to_target: "{{['A', 'B', 'C', 'D'][answer]}}"
generation_kwargs:
until:
- "</s>"
- "\n"
metric_list:
- metric: exact_match
aggregation: mean
higher_is_better: true
metadata:
version: 1.0
lm_eval/tasks/mmlu/generative/_mmlu.yaml
0 → 100644
View file @
60c9c170
group
:
mmlu_generative
task
:
-
mmlu_stem_generative
-
mmlu_other_generative
-
mmlu_social_sciences_generative
-
mmlu_humanities_generative
lm_eval/tasks/mmlu/generative/mmlu_abstract_algebra.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
abstract_algebra"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
abstract
\
\
algebra.
\n\n
"
"
group"
:
"
mmlu_stem_generative"
"
group_alias"
:
"
stem"
"
include"
:
"
_default_template_yaml"
"
task"
:
"
mmlu_abstract_algebra_generative"
"
task_alias"
:
"
abstract_algebra"
lm_eval/tasks/mmlu/generative/mmlu_anatomy.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
anatomy"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
anatomy.
\n\
\n
"
"
group"
:
"
mmlu_stem_generative"
"
group_alias"
:
"
stem"
"
include"
:
"
_default_template_yaml"
"
task"
:
"
mmlu_anatomy_generative"
"
task_alias"
:
"
anatomy"
lm_eval/tasks/mmlu/generative/mmlu_astronomy.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
astronomy"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
astronomy.
\n\
\n
"
"
group"
:
"
mmlu_stem_generative"
"
group_alias"
:
"
stem"
"
include"
:
"
_default_template_yaml"
"
task"
:
"
mmlu_astronomy_generative"
"
task_alias"
:
"
astronomy"
lm_eval/tasks/mmlu/generative/mmlu_business_ethics.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
business_ethics"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
business
\
\
ethics.
\n\n
"
"
group"
:
"
mmlu_other_generative"
"
group_alias"
:
"
other"
"
include"
:
"
_default_template_yaml"
"
task"
:
"
mmlu_business_ethics_generative"
"
task_alias"
:
"
business_ethics"
lm_eval/tasks/mmlu/generative/mmlu_clinical_knowledge.yaml
0 → 100644
View file @
60c9c170
"
dataset_name"
:
"
clinical_knowledge"
"
description"
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
clinical
\
\
knowledge.
\n\n
"
"
group"
:
"
mmlu_other_generative"
"
group_alias"
:
"
other"
"
include"
:
"
_default_template_yaml"
"
task"
:
"
mmlu_clinical_knowledge_generative"
"
task_alias"
:
"
clinical_knowledge"
Prev
1
…
16
17
18
19
20
21
22
23
24
…
31
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