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
557e6779
Unverified
Commit
557e6779
authored
Jul 06, 2023
by
Hailey Schoelkopf
Committed by
GitHub
Jul 06, 2023
Browse files
Merge pull request #651 from farzanehnakhaee70/add-qa4mre-config
[refactor] Add qa4mre config
parents
45737a38
80b429aa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
0 deletions
+66
-0
lm_eval/tasks/qa4mre/preprocess_qa4mre.py
lm_eval/tasks/qa4mre/preprocess_qa4mre.py
+6
-0
lm_eval/tasks/qa4mre/qa4mre_2011.yaml
lm_eval/tasks/qa4mre/qa4mre_2011.yaml
+20
-0
lm_eval/tasks/qa4mre/qa4mre_2012.yaml
lm_eval/tasks/qa4mre/qa4mre_2012.yaml
+20
-0
lm_eval/tasks/qa4mre/qa4mre_2013.yaml
lm_eval/tasks/qa4mre/qa4mre_2013.yaml
+20
-0
No files found.
lm_eval/tasks/qa4mre/preprocess_qa4mre.py
0 → 100644
View file @
557e6779
def
qa4mre_process
(
doc
):
return
int
(
doc
[
"correct_answer_id"
])
-
1
def
doc_to_target
(
doc
):
return
doc
[
"answer_options"
][
"answer_str"
][
qa4mre_process
(
doc
)]
lm_eval/tasks/qa4mre/qa4mre_2011.yaml
0 → 100644
View file @
557e6779
group
:
-
multiple_choice
task
:
qa4mre_2011
dataset_path
:
qa4mre
dataset_name
:
2011.main.EN
output_type
:
multiple_choice
test_split
:
train
template_aliases
:
"
{%
set
answer_choices
=
answer_options['answer_str']
%}"
doc_to_text
:
"
{{document_str.strip()}}
\n
Question:
{{question_str}}
\n
Choices:
\n
-
{{answer_choices|join('
\n
-
')}}
\n
Answer:"
doc_to_target
:
!function
preprocess_qa4mre.doc_to_target
gold_alias
:
!function
preprocess_qa4mre.qa4mre_process
should_decontaminate
:
true
doc_to_decontamination_query
:
"
{{document_str.strip()}}
+
'
'
+
{{question_str}}"
metric_list
:
-
metric
:
acc
aggregation
:
mean
higher_is_better
:
true
-
metric
:
acc_norm
aggregation
:
mean
higher_is_better
:
true
lm_eval/tasks/qa4mre/qa4mre_2012.yaml
0 → 100644
View file @
557e6779
group
:
-
multiple_choice
task
:
qa4mre_2012
dataset_path
:
qa4mre
dataset_name
:
2012.main.EN
output_type
:
multiple_choice
test_split
:
train
template_aliases
:
"
{%
set
answer_choices
=
answer_options['answer_str']
%}"
doc_to_text
:
"
{{document_str.strip()}}
\n
Question:
{{question_str}}
\n
Choices:
\n
-
{{answer_choices|join('
\n
-
')}}
\n
Answer:"
doc_to_target
:
!function
preprocess_qa4mre.doc_to_target
gold_alias
:
!function
preprocess_qa4mre.qa4mre_process
should_decontaminate
:
true
doc_to_decontamination_query
:
"
{{document_str.strip()}}
+
'
'
+
{{question_str}}"
metric_list
:
-
metric
:
acc
aggregation
:
mean
higher_is_better
:
true
-
metric
:
acc_norm
aggregation
:
mean
higher_is_better
:
true
lm_eval/tasks/qa4mre/qa4mre_2013.yaml
0 → 100644
View file @
557e6779
group
:
-
multiple_choice
task
:
qa4mre_2013
dataset_path
:
qa4mre
dataset_name
:
2013.main.EN
output_type
:
multiple_choice
test_split
:
train
template_aliases
:
"
{%
set
answer_choices
=
answer_options['answer_str']
%}"
doc_to_text
:
"
{{document_str.strip()}}
\n
Question:
{{question_str}}
\n
Choices:
\n
-
{{answer_choices|join('
\n
-
')}}
\n
Answer:"
doc_to_target
:
!function
preprocess_qa4mre.doc_to_target
gold_alias
:
!function
preprocess_qa4mre.qa4mre_process
should_decontaminate
:
true
doc_to_decontamination_query
:
"
{{document_str.strip()}}
+
'
'
+
{{question_str}}"
metric_list
:
-
metric
:
acc
aggregation
:
mean
higher_is_better
:
true
-
metric
:
acc_norm
aggregation
:
mean
higher_is_better
:
true
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