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
27a8f231
Commit
27a8f231
authored
Apr 28, 2022
by
Jan-Christoph Kalo
Browse files
added bigscience-lama evaluation script.
parent
9cd70235
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
lm_eval/tasks/bigsciencelama.py
lm_eval/tasks/bigsciencelama.py
+44
-0
No files found.
lm_eval/tasks/bigsciencelama.py
0 → 100644
View file @
27a8f231
from
lm_eval.base
import
PromptSourceTask
_CITATION
=
"""
@inproceedings{petroni2019language, title={Language Models as Knowledge Bases?},
author={F. Petroni, T. Rockt{"{a}}schel, A. H. Miller, P. Lewis, A. Bakhtin, Y. Wu and S. Riedel},
booktitle={In: Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2019}, year={2019} }
@inproceedings{petroni2020how,
title={How Context Affects Language Models' Factual Predictions},
author={Fabio Petroni and Patrick Lewis and Aleksandra Piktus and Tim Rockt{"a}schel and Yuxiang Wu and Alexander H. Miller and Sebastian Riedel},
booktitle={Automated Knowledge Base Construction}, year={2020}, url={https://openreview.net/forum?id=025X0zPfn} }
"""
class
BigScienceLAMA
(
PromptSourceTask
):
VERSION
=
0
DATASET_PATH
=
"janck/bigscience-lama"
DATASET_NAME
=
None
def
has_training_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has training data; else `False`.
return
False
def
has_validation_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has validation data; else `False`.
return
False
def
has_test_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has test data; else `False`.
return
True
def
training_docs
(
self
):
if
self
.
has_training_docs
():
return
self
.
dataset
[
"train"
]
def
validation_docs
(
self
):
if
self
.
has_validation_docs
():
return
self
.
dataset
[
"train"
]
def
test_docs
(
self
):
if
self
.
has_test_docs
():
self
.
_test_docs
=
list
(
self
.
dataset
[
"test"
])
return
self
.
_test_docs
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