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
1b69fb43
Commit
1b69fb43
authored
Aug 03, 2023
by
jon-tow
Browse files
fix: use formatting from paper
parent
48baeea9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/tasks/siqa.py
lm_eval/tasks/siqa.py
+2
-2
No files found.
lm_eval/tasks/siqa.py
View file @
1b69fb43
...
@@ -57,10 +57,10 @@ class SIQA(MultipleChoiceTask):
...
@@ -57,10 +57,10 @@ class SIQA(MultipleChoiceTask):
def
_process_doc
(
self
,
doc
):
def
_process_doc
(
self
,
doc
):
return
{
return
{
"query"
:
f
"
{
doc
[
'context'
]
}
\n
Question:
{
doc
[
'question'
]
}
"
,
"query"
:
f
"
{
doc
[
'context'
]
}
{
doc
[
'question'
]
}
"
,
"choices"
:
[
doc
[
'answerA'
],
doc
[
'answerB'
],
doc
[
'answerC'
]],
"choices"
:
[
doc
[
'answerA'
],
doc
[
'answerB'
],
doc
[
'answerC'
]],
"gold"
:
int
(
doc
[
'label'
])
-
1
,
# `-1` because the labels are 1-indexed.
"gold"
:
int
(
doc
[
'label'
])
-
1
,
# `-1` because the labels are 1-indexed.
}
}
def
doc_to_text
(
self
,
doc
):
def
doc_to_text
(
self
,
doc
):
return
doc
[
"query"
]
+
"
\n
Answer:"
return
doc
[
"query"
]
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