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
19eba1fe
Commit
19eba1fe
authored
Mar 11, 2024
by
LucWeber
Browse files
Run pre-commit
parent
a1b665d9
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
12 deletions
+16
-12
lm_eval/tasks/tinyBenchmarks/README.md
lm_eval/tasks/tinyBenchmarks/README.md
+4
-4
lm_eval/tasks/tinyBenchmarks/tinyGSM8k.yaml
lm_eval/tasks/tinyBenchmarks/tinyGSM8k.yaml
+0
-1
lm_eval/tasks/tinyBenchmarks/tinyMMLU.yaml
lm_eval/tasks/tinyBenchmarks/tinyMMLU.yaml
+1
-1
lm_eval/tasks/tinyBenchmarks/utils_hellaswag.py
lm_eval/tasks/tinyBenchmarks/utils_hellaswag.py
+5
-2
lm_eval/tasks/tinyBenchmarks/utils_truthfulqa.py
lm_eval/tasks/tinyBenchmarks/utils_truthfulqa.py
+4
-3
lm_eval/tasks/tinyBenchmarks/utils_winogrande.py
lm_eval/tasks/tinyBenchmarks/utils_winogrande.py
+2
-1
No files found.
lm_eval/tasks/tinyBenchmarks/README.md
View file @
19eba1fe
lm_eval/tasks/tinyBenchmarks/tinyGSM8k.yaml
View file @
19eba1fe
...
@@ -44,4 +44,3 @@ filter_list:
...
@@ -44,4 +44,3 @@ filter_list:
-
function
:
"
take_first"
-
function
:
"
take_first"
metadata
:
metadata
:
version
:
0.0
version
:
0.0
lm_eval/tasks/tinyBenchmarks/tinyMMLU.yaml
View file @
19eba1fe
lm_eval/tasks/tinyBenchmarks/utils_hellaswag.py
View file @
19eba1fe
import
datasets
import
re
import
re
''' This code mirrors the utils of the original hellaswag task '''
import
datasets
""" This code mirrors the utils of the original hellaswag task """
def
preprocess
(
text
):
def
preprocess
(
text
):
text
=
text
.
strip
()
text
=
text
.
strip
()
...
...
lm_eval/tasks/tinyBenchmarks/utils_truthfulqa.py
View file @
19eba1fe
import
datasets
import
datasets
import
sacrebleu
import
numpy
as
np
import
numpy
as
np
import
sacrebleu
from
rouge_score
import
rouge_scorer
,
scoring
from
rouge_score
import
rouge_scorer
,
scoring
''' This code mirrors the utils of the original truthful_qa task '''
""" This code mirrors the utils of the original truthful_qa task """
def
process_results_mc2
(
doc
,
results
):
def
process_results_mc2
(
doc
,
results
):
lls
,
is_greedy
=
zip
(
*
results
)
lls
,
is_greedy
=
zip
(
*
results
)
...
...
lm_eval/tasks/tinyBenchmarks/utils_winogrande.py
View file @
19eba1fe
''' This code mirrors the utils of the original winogrande task '''
""" This code mirrors the utils of the original winogrande task """
def
doc_to_text
(
doc
):
def
doc_to_text
(
doc
):
answer_to_num
=
{
"1"
:
0
,
"2"
:
1
}
answer_to_num
=
{
"1"
:
0
,
"2"
:
1
}
...
...
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