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
26e55d33
Commit
26e55d33
authored
Mar 13, 2023
by
ingyuseong
Browse files
Fix KLUE few-shot label
parent
94c2c064
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/tasks/klue.py
lm_eval/tasks/klue.py
+2
-2
No files found.
lm_eval/tasks/klue.py
View file @
26e55d33
...
@@ -58,11 +58,11 @@ class STS(Task):
...
@@ -58,11 +58,11 @@ class STS(Task):
)
)
def
doc_to_target
(
self
,
doc
):
def
doc_to_target
(
self
,
doc
):
return
" {}"
.
format
({
1
:
"
예
"
,
0
:
"
아니
"
}[
doc
[
"labels"
][
"binary-label"
]])
return
" {}"
.
format
({
0
:
"
아니오
"
,
1
:
"
예
"
}[
doc
[
"labels"
][
"binary-label"
]])
def
construct_requests
(
self
,
doc
,
ctx
):
def
construct_requests
(
self
,
doc
,
ctx
):
ll_positive
,
_
=
rf
.
loglikelihood
(
ctx
,
" 예"
)
ll_positive
,
_
=
rf
.
loglikelihood
(
ctx
,
" 예"
)
ll_negative
,
_
=
rf
.
loglikelihood
(
ctx
,
" 아니"
)
ll_negative
,
_
=
rf
.
loglikelihood
(
ctx
,
" 아니
오
"
)
return
ll_positive
,
ll_negative
return
ll_positive
,
ll_negative
def
process_results
(
self
,
doc
,
results
):
def
process_results
(
self
,
doc
,
results
):
...
...
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