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
a81ef1a7
Commit
a81ef1a7
authored
Sep 01, 2023
by
lintangsutawika
Browse files
edit stop token
parent
c3764d2c
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
22 additions
and
3 deletions
+22
-3
lm_eval/tasks/super_glue/boolq/t5-prompt.yaml
lm_eval/tasks/super_glue/boolq/t5-prompt.yaml
+3
-0
lm_eval/tasks/super_glue/cb/t5-prompt.yaml
lm_eval/tasks/super_glue/cb/t5-prompt.yaml
+3
-0
lm_eval/tasks/super_glue/cb/t5_utils.py
lm_eval/tasks/super_glue/cb/t5_utils.py
+1
-1
lm_eval/tasks/super_glue/copa/t5-prompt.yaml
lm_eval/tasks/super_glue/copa/t5-prompt.yaml
+3
-0
lm_eval/tasks/super_glue/multirc/t5-prompt.yaml
lm_eval/tasks/super_glue/multirc/t5-prompt.yaml
+0
-2
lm_eval/tasks/super_glue/record/t5-prompt.yaml
lm_eval/tasks/super_glue/record/t5-prompt.yaml
+3
-0
lm_eval/tasks/super_glue/rte/t5-prompt.yaml
lm_eval/tasks/super_glue/rte/t5-prompt.yaml
+3
-0
lm_eval/tasks/super_glue/wic/t5-prompt.yaml
lm_eval/tasks/super_glue/wic/t5-prompt.yaml
+3
-0
lm_eval/tasks/super_glue/wsc/t5-prompt.yaml
lm_eval/tasks/super_glue/wsc/t5-prompt.yaml
+3
-0
No files found.
lm_eval/tasks/super_glue/boolq/t5-prompt.yaml
View file @
a81ef1a7
...
@@ -9,6 +9,9 @@ output_type: greedy_until
...
@@ -9,6 +9,9 @@ output_type: greedy_until
doc_to_text
:
"
boolq
passage:
{{passage}}
question:
{{question}}"
doc_to_text
:
"
boolq
passage:
{{passage}}
question:
{{question}}"
doc_to_target
:
label
doc_to_target
:
label
doc_to_choice
:
[
'
False'
,
'
True'
]
doc_to_choice
:
[
'
False'
,
'
True'
]
generation_kwargs
:
until
:
-
"
</s>"
metric_list
:
metric_list
:
-
metric
:
exact_match
-
metric
:
exact_match
aggregation
:
mean
aggregation
:
mean
...
...
lm_eval/tasks/super_glue/cb/t5-prompt.yaml
View file @
a81ef1a7
...
@@ -9,6 +9,9 @@ output_type: greedy_until
...
@@ -9,6 +9,9 @@ output_type: greedy_until
doc_to_text
:
"
cb
hypothesis:
{{hypothesis}}
premise:
{{premise}}"
doc_to_text
:
"
cb
hypothesis:
{{hypothesis}}
premise:
{{premise}}"
doc_to_target
:
label
doc_to_target
:
label
doc_to_choice
:
[
'
entailment'
,
'
contradiction'
,
'
neutral'
]
doc_to_choice
:
[
'
entailment'
,
'
contradiction'
,
'
neutral'
]
generation_kwargs
:
until
:
-
"
</s>"
metric_list
:
metric_list
:
-
metric
:
exact_match
-
metric
:
exact_match
aggregation
:
mean
aggregation
:
mean
...
...
lm_eval/tasks/super_glue/cb/t5_utils.py
View file @
a81ef1a7
...
@@ -4,7 +4,7 @@ import sklearn.metrics
...
@@ -4,7 +4,7 @@ import sklearn.metrics
def
mean_3class_f1
(
predictions
,
references
):
# This is a passthrough function
def
mean_3class_f1
(
predictions
,
references
):
# This is a passthrough function
string_label
=
[
"entailment"
,
"contradiction"
,
"neutral"
]
string_label
=
[
"entailment"
,
"contradiction"
,
"neutral"
]
predictions
=
string_label
.
index
(
predictions
[
0
])
predictions
=
string_label
.
index
(
predictions
[
0
])
if
predictions
[
0
]
in
string_label
else
0
references
=
string_label
.
index
(
references
[
0
])
references
=
string_label
.
index
(
references
[
0
])
return
(
predictions
,
references
)
return
(
predictions
,
references
)
...
...
lm_eval/tasks/super_glue/copa/t5-prompt.yaml
View file @
a81ef1a7
...
@@ -9,6 +9,9 @@ output_type: greedy_until
...
@@ -9,6 +9,9 @@ output_type: greedy_until
doc_to_text
:
"
copa
choice1:
{{choice1}}
choice2:
{{choice2}}
premise:
{{premise}}
question:
{{question}}"
doc_to_text
:
"
copa
choice1:
{{choice1}}
choice2:
{{choice2}}
premise:
{{premise}}
question:
{{question}}"
doc_to_target
:
label
doc_to_target
:
label
doc_to_choice
:
[
'
choice1'
,
'
choice2'
]
doc_to_choice
:
[
'
choice1'
,
'
choice2'
]
generation_kwargs
:
until
:
-
"
</s>"
metric_list
:
metric_list
:
-
metric
:
exact_match
-
metric
:
exact_match
aggregation
:
mean
aggregation
:
mean
...
...
lm_eval/tasks/super_glue/multirc/t5-prompt.yaml
View file @
a81ef1a7
...
@@ -12,8 +12,6 @@ doc_to_choice: "{% set group_id = idx.question|string %}{{[group_id+'_False', gr
...
@@ -12,8 +12,6 @@ doc_to_choice: "{% set group_id = idx.question|string %}{{[group_id+'_False', gr
generation_kwargs
:
generation_kwargs
:
until
:
until
:
-
"
</s>"
-
"
</s>"
do_sample
:
false
temperature
:
0.5
metric_list
:
metric_list
:
-
metric
:
!function
t5_utils.f1
-
metric
:
!function
t5_utils.f1
aggregation
:
!function
t5_utils.agg_f1
aggregation
:
!function
t5_utils.agg_f1
...
...
lm_eval/tasks/super_glue/record/t5-prompt.yaml
View file @
a81ef1a7
...
@@ -8,6 +8,9 @@ output_type: greedy_until
...
@@ -8,6 +8,9 @@ output_type: greedy_until
process_docs
:
!function
t5_utils.process_docs
process_docs
:
!function
t5_utils.process_docs
doc_to_text
:
!function
t5_utils.doc_to_text
doc_to_text
:
!function
t5_utils.doc_to_text
doc_to_target
:
"
{{idx.passage|string}}+{{idx.query}}_{{answers}}"
doc_to_target
:
"
{{idx.passage|string}}+{{idx.query}}_{{answers}}"
generation_kwargs
:
until
:
-
"
</s>"
metric_list
:
metric_list
:
-
metric
:
!function
t5_utils.em
-
metric
:
!function
t5_utils.em
aggregation
:
!function
t5_utils.squad_em_agg
aggregation
:
!function
t5_utils.squad_em_agg
...
...
lm_eval/tasks/super_glue/rte/t5-prompt.yaml
View file @
a81ef1a7
...
@@ -9,6 +9,9 @@ output_type: greedy_until
...
@@ -9,6 +9,9 @@ output_type: greedy_until
doc_to_text
:
"
rte
hypothesis:
{{hypothesis}}
premise:
{{premise}}"
doc_to_text
:
"
rte
hypothesis:
{{hypothesis}}
premise:
{{premise}}"
doc_to_target
:
label
doc_to_target
:
label
doc_to_choice
:
[
'
entailment'
,
'
not_entailment'
]
doc_to_choice
:
[
'
entailment'
,
'
not_entailment'
]
generation_kwargs
:
until
:
-
"
</s>"
metric_list
:
metric_list
:
-
metric
:
exact_match
-
metric
:
exact_match
aggregation
:
mean
aggregation
:
mean
...
...
lm_eval/tasks/super_glue/wic/t5-prompt.yaml
View file @
a81ef1a7
...
@@ -9,6 +9,9 @@ output_type: greedy_until
...
@@ -9,6 +9,9 @@ output_type: greedy_until
doc_to_text
:
"
wic
sentence1:
{{sentence1}}
sentence2:
{{sentence2}}
word:
{{word}}"
doc_to_text
:
"
wic
sentence1:
{{sentence1}}
sentence2:
{{sentence2}}
word:
{{word}}"
doc_to_target
:
label
doc_to_target
:
label
doc_to_choice
:
[
'
False'
,
'
True'
]
doc_to_choice
:
[
'
False'
,
'
True'
]
generation_kwargs
:
until
:
-
"
</s>"
metric_list
:
metric_list
:
-
metric
:
exact_match
-
metric
:
exact_match
aggregation
:
mean
aggregation
:
mean
...
...
lm_eval/tasks/super_glue/wsc/t5-prompt.yaml
View file @
a81ef1a7
...
@@ -8,6 +8,9 @@ validation_split: validation
...
@@ -8,6 +8,9 @@ validation_split: validation
output_type
:
greedy_until
output_type
:
greedy_until
doc_to_text
:
!function
"
t5_utils.doc_to_text"
doc_to_text
:
!function
"
t5_utils.doc_to_text"
doc_to_target
:
label
doc_to_target
:
label
generation_kwargs
:
until
:
-
"
</s>"
metric_list
:
metric_list
:
-
metric
:
accuracy
-
metric
:
accuracy
aggregation
:
mean
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