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
4bdf11e1
Commit
4bdf11e1
authored
Aug 29, 2023
by
lintangsutawika
Browse files
udpated to work
parent
d1c3cb3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
lm_eval/benchmarks/flan/flan_held_in.yaml
lm_eval/benchmarks/flan/flan_held_in.yaml
+6
-6
lm_eval/benchmarks/flan/prompt_templates/flan_boolq.yaml
lm_eval/benchmarks/flan/prompt_templates/flan_boolq.yaml
+10
-10
lm_eval/prompts/__init__.py
lm_eval/prompts/__init__.py
+1
-1
No files found.
lm_eval/benchmarks/flan/flan_held_in.yaml
View file @
4bdf11e1
...
@@ -3,13 +3,13 @@ task:
...
@@ -3,13 +3,13 @@ task:
-
include
:
held_in_template_yaml
-
include
:
held_in_template_yaml
dataset_path
:
super_glue
dataset_path
:
super_glue
dataset_name
:
boolq
dataset_name
:
boolq
use_prompt
:
flan_boolq.yaml:*
use_prompt
:
prompt_templates/flan_boolq.yaml:*
validation_split
:
validation
-
include
:
held_in_template_yaml
dataset_path
:
super_glue
dataset_name
:
rte
use_prompt
:
prompt_templates/flan_rte.yaml:*
validation_split
:
validation
validation_split
:
validation
# - include: held_in_template_yaml
# dataset_path: super_glue
# dataset_name: rte
# use_prompt: local:*
# validation_split: validation
# - include: held_in_template_yaml
# - include: held_in_template_yaml
# task: anli_r1
# task: anli_r1
# dataset_path: anli
# dataset_path: anli
...
...
lm_eval/benchmarks/flan/flan_boolq.yaml
→
lm_eval/benchmarks/flan/
prompt_templates/
flan_boolq.yaml
View file @
4bdf11e1
# Flan Prompt Templates
# Flan Prompt Templates
prompts
:
prompts
:
"
template-0"
:
"
template-0"
:
doc_to_text
:
"
{{text}}
\n\n
Can
we
conclude
that
{{question}}?
\n\n
{{options_}}
"
doc_to_text
:
"
{{text}}
\n\n
Can
we
conclude
that
{{question}}?
\n\n
OPTIONS:
\n
-
no
\n
-
yes
"
doc_to_target
:
"
{{answer}}"
doc_to_target
:
"
{{answer}}"
"
template-1"
:
"
template-1"
:
doc_to_text
:
"
{{text}}
\n\n
Is
it
true
that
{{question}}?
\n\n
{{options_}}
"
doc_to_text
:
"
{{text}}
\n\n
Is
it
true
that
{{question}}?
\n\n
OPTIONS:
\n
-
no
\n
-
yes
"
doc_to_target
:
"
{{answer}}"
doc_to_target
:
"
{{answer}}"
"
template-2"
:
"
template-2"
:
doc_to_text
:
"
{{text}}
\n\n
{{question}}?
\n\n
{{options_}}
"
doc_to_text
:
"
{{text}}
\n\n
{{question}}?
\n\n
OPTIONS:
\n
-
no
\n
-
yes
"
doc_to_target
:
"
{{answer}}"
doc_to_target
:
"
{{answer}}"
"
template-3"
:
"
template-3"
:
doc_to_text
:
"
Text:
{{text}}
\n\n
Question:
{{question}}?
\n\n
{{options_}}
"
doc_to_text
:
"
Text:
{{text}}
\n\n
Question:
{{question}}?
\n\n
OPTIONS:
\n
-
no
\n
-
yes
"
doc_to_target
:
"
{{answer}}"
doc_to_target
:
"
{{answer}}"
"
template-4"
:
"
template-4"
:
doc_to_text
:
"
{{text}}
\n\n
What's
the
best
answer
to
this
question:
{{question}}?
\n\n
{{options_}}
"
doc_to_text
:
"
{{text}}
\n\n
What's
the
best
answer
to
this
question:
{{question}}?
\n\n
OPTIONS:
\n
-
no
\n
-
yes
"
doc_to_target
:
"
{{answer}}"
doc_to_target
:
"
{{answer}}"
"
template-5"
:
"
template-5"
:
doc_to_text
:
"
{{text}}
\n
Based
on
the
above
text
what's
the
best
answer
to
this
question:
{{question}}?
\n\n
{{options_}}
"
doc_to_text
:
"
{{text}}
\n
Based
on
the
above
text
what's
the
best
answer
to
this
question:
{{question}}?
\n\n
OPTIONS:
\n
-
no
\n
-
yes
"
doc_to_target
:
"
{{answer}}"
doc_to_target
:
"
{{answer}}"
"
template-6"
:
"
template-6"
:
doc_to_text
:
"
{{text}}
\n
Answer
this
question
making
sure
that
the
answer
is
supposed
by
the
text:
{{question}}?
\n\n
{{options_}}
"
doc_to_text
:
"
{{text}}
\n
Answer
this
question
making
sure
that
the
answer
is
supposed
by
the
text:
{{question}}?
\n\n
OPTIONS:
\n
-
no
\n
-
yes
"
doc_to_target
:
"
{{answer}}"
doc_to_target
:
"
{{answer}}"
"
template-7"
:
"
template-7"
:
doc_to_text
:
"
{{text}}
\n\n
Is
the
following
statement
correct
based
on
the
text
\n\n
{{question}}
\n\n
{{options_}}
"
doc_to_text
:
"
{{text}}
\n\n
Is
the
following
statement
correct
based
on
the
text
\n\n
{{question}}
\n\n
OPTIONS:
\n
-
no
\n
-
yes
"
doc_to_target
:
"
{{answer}}"
doc_to_target
:
"
{{answer}}"
"
template-8"
:
"
template-8"
:
doc_to_text
:
"
{{title}}
\n\n
{{text}}
\n\n
Is
this
statement
correct
\"
{{question}}
\"
?
\n\n
{{options_}}
"
doc_to_text
:
"
{{title}}
\n\n
{{text}}
\n\n
Is
this
statement
correct
\"
{{question}}
\"
?
\n\n
OPTIONS:
\n
-
no
\n
-
yes
"
doc_to_target
:
"
{{answer}}"
doc_to_target
:
"
{{answer}}"
"
template-9"
:
"
template-9"
:
doc_to_text
:
"
Is
it
true
that
{{question}}
based
on
the
following
text?
\n\n
{{text}}
\n\n
{{options_}}
"
doc_to_text
:
"
Is
it
true
that
{{question}}
based
on
the
following
text?
\n\n
{{text}}
\n\n
OPTIONS:
\n
-
no
\n
-
yes
"
doc_to_target
:
"
{{answer}}"
doc_to_target
:
"
{{answer}}"
lm_eval/prompts/__init__.py
View file @
4bdf11e1
...
@@ -92,7 +92,7 @@ def load_prompt_list(use_prompt: str, dataset_name=None, subset_name=None, **kwa
...
@@ -92,7 +92,7 @@ def load_prompt_list(use_prompt: str, dataset_name=None, subset_name=None, **kwa
class
PromptString
:
class
PromptString
:
def
__init__
(
prompt_string
):
def
__init__
(
self
,
prompt_string
):
self
.
prompt_string
=
prompt_string
self
.
prompt_string
=
prompt_string
def
apply
(
self
,
doc
):
def
apply
(
self
,
doc
):
...
...
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