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
620d8a36
Commit
620d8a36
authored
Aug 08, 2023
by
haileyschoelkopf
Browse files
add draft abstract algebra task, fix genning script
parent
25a4e2c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
.pre-commit-config.yaml
.pre-commit-config.yaml
+1
-1
lm_eval/tasks/mmlu/gen_all_splits.py
lm_eval/tasks/mmlu/gen_all_splits.py
+1
-0
lm_eval/tasks/mmlu/hendrycks_test_original_default.yaml
lm_eval/tasks/mmlu/hendrycks_test_original_default.yaml
+5
-5
No files found.
.pre-commit-config.yaml
View file @
620d8a36
...
...
@@ -40,6 +40,6 @@ repos:
-
id
:
codespell
exclude
:
>
(?x)^(
.*\.json|ignore.txt
.*\.json|ignore.txt
|.*\.yaml
)$
args
:
[
--check-filenames
,
--check-hidden
,
--ignore-words=ignore.txt
]
lm_eval/tasks/mmlu/gen_all_splits.py
View file @
620d8a36
...
...
@@ -97,6 +97,7 @@ if __name__ == "__main__":
"include"
:
base_yaml_name
,
"task"
:
base_yaml
[
"task"
].
strip
(
"abstract_algebra"
)
+
"subject"
,
"dataset_name"
:
subject
,
"description"
:
f
"The following are multiple choice questions (with answers) about
{
' '
.
join
(
subject
.
split
(
'_'
))
}
.
\n\n
"
,
}
file_save_path
=
args
.
task_save_path
+
f
"_
{
subject
}
.yaml"
...
...
lm_eval/tasks/mmlu/hendrycks_test_original_default.yaml
View file @
620d8a36
...
...
@@ -2,16 +2,16 @@ group:
-
mmlu
-
mmlu_original
-
multiple_choice
task
:
mmlu_original_
task
:
mmlu_original_
abstract_algebra
dataset_path
:
cais/mmlu
dataset_name
:
abstract_algebra
output_type
:
multiple_choice
training_split
:
train
validation_split
:
validation
test_split
:
test
doc_to_text
:
"
Question:
{{question}}
\n
Answer:"
doc_to_target
:
"
{{choices.label.index(answerKey)}}"
doc_to_choice
:
"
{{choices.text}}"
description
:
"
The
following
are
multiple
choice
questions
(with
answers)
about
abstract
algebra.
\n\n
"
doc_to_text
:
"
{{question.strip()}}
\n
A.
{{choices[0]}}
\n
B.
{{choices[1]}}
\n
C.
{{choices[2]}}
\n
D.
{{choices[3]}}
\n
Answer:"
doc_to_choice
:
"
{{choices}}"
doc_to_target
:
"
{{answer}}"
metric_list
:
-
metric
:
acc
aggregation
:
mean
...
...
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