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
83683ddd
Commit
83683ddd
authored
Aug 13, 2023
by
lintangsutawika
Browse files
update
parent
18e2d093
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
51 additions
and
33 deletions
+51
-33
lm_eval/tasks/xnli/utils.py
lm_eval/tasks/xnli/utils.py
+6
-2
lm_eval/tasks/xnli/xnli_ar.yaml
lm_eval/tasks/xnli/xnli_ar.yaml
+3
-2
lm_eval/tasks/xnli/xnli_bg.yaml
lm_eval/tasks/xnli/xnli_bg.yaml
+3
-2
lm_eval/tasks/xnli/xnli_common_yaml
lm_eval/tasks/xnli/xnli_common_yaml
+0
-1
lm_eval/tasks/xnli/xnli_de.yaml
lm_eval/tasks/xnli/xnli_de.yaml
+3
-2
lm_eval/tasks/xnli/xnli_el.yaml
lm_eval/tasks/xnli/xnli_el.yaml
+3
-2
lm_eval/tasks/xnli/xnli_en.yaml
lm_eval/tasks/xnli/xnli_en.yaml
+3
-2
lm_eval/tasks/xnli/xnli_es.yaml
lm_eval/tasks/xnli/xnli_es.yaml
+3
-2
lm_eval/tasks/xnli/xnli_fr.yaml
lm_eval/tasks/xnli/xnli_fr.yaml
+3
-2
lm_eval/tasks/xnli/xnli_hi.yaml
lm_eval/tasks/xnli/xnli_hi.yaml
+3
-2
lm_eval/tasks/xnli/xnli_ru.yaml
lm_eval/tasks/xnli/xnli_ru.yaml
+3
-2
lm_eval/tasks/xnli/xnli_sw.yaml
lm_eval/tasks/xnli/xnli_sw.yaml
+3
-2
lm_eval/tasks/xnli/xnli_th.yaml
lm_eval/tasks/xnli/xnli_th.yaml
+3
-2
lm_eval/tasks/xnli/xnli_tr.yaml
lm_eval/tasks/xnli/xnli_tr.yaml
+3
-2
lm_eval/tasks/xnli/xnli_ur.yaml
lm_eval/tasks/xnli/xnli_ur.yaml
+3
-2
lm_eval/tasks/xnli/xnli_vi.yaml
lm_eval/tasks/xnli/xnli_vi.yaml
+3
-2
lm_eval/tasks/xnli/xnli_zh.yaml
lm_eval/tasks/xnli/xnli_zh.yaml
+3
-2
No files found.
lm_eval/tasks/xnli/utils.py
View file @
83683ddd
...
@@ -124,8 +124,12 @@ def gen_lang_yamls(output_dir: str, overwrite: bool) -> None:
...
@@ -124,8 +124,12 @@ def gen_lang_yamls(output_dir: str, overwrite: bool) -> None:
"include"
:
"xnli_common_yaml"
,
"include"
:
"xnli_common_yaml"
,
"dataset_name"
:
lang
,
"dataset_name"
:
lang
,
"task"
:
f
"xnli_
{
lang
}
"
,
"task"
:
f
"xnli_
{
lang
}
"
,
"doc_to_text"
:
f
"{{{{premise}}}},
{
QUESTION_WORD
}
?"
,
"doc_to_text"
:
""
,
"doc_to_choice"
:
f
"{{[
\"
{
ENTAILMENT_LABEL
}
, {{{{hypothesis}}}}
\"
,
\"
{
NEUTRAL_LABEL
}
, {{{{hypothesis}}}}
\"
,
\"
{
CONTRADICTION_LABEL
}
, {{{{hypothesis}}}}
\"
]}}"
"doc_to_choice"
:
f
"{{{{["
f
"""premise+
\"
,
{
QUESTION_WORD
}
?
{
ENTAILMENT_LABEL
}
,
\"
+hypothesis,"""
f
"""premise+
\"
,
{
QUESTION_WORD
}
?
{
NEUTRAL_LABEL
}
,
\"
+hypothesis,"""
f
"""premise+
\"
,
{
QUESTION_WORD
}
?
{
CONTRADICTION_LABEL
}
,
\"
+hypothesis"""
f
"]}}}}"
},
},
f
,
f
,
allow_unicode
=
True
allow_unicode
=
True
...
...
lm_eval/tasks/xnli/xnli_ar.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
ar
dataset_name
:
ar
doc_to_choice
:
'
{["نعم,
{{hypothesis}}",
"لذا,
{{hypothesis}}",
"رقم,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
صحيح?
نعم,
"+hypothesis,premise+",
صحيح?
لذا,
"+hypothesis,premise+",
doc_to_text
:
'
{{premise}},
صحيح?'
صحيح?
رقم,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_ar
task
:
xnli_ar
lm_eval/tasks/xnli/xnli_bg.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
bg
dataset_name
:
bg
doc_to_choice
:
'
{["да,
{{hypothesis}}",
"така,
{{hypothesis}}",
"не,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
правилно?
да,
"+hypothesis,premise+",
правилно?
така,
doc_to_text
:
'
{{premise}},
правилно?'
"+hypothesis,premise+",
правилно?
не,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_bg
task
:
xnli_bg
lm_eval/tasks/xnli/xnli_common_yaml
View file @
83683ddd
...
@@ -8,7 +8,6 @@ dataset_name: null
...
@@ -8,7 +8,6 @@ dataset_name: null
output_type: multiple_choice
output_type: multiple_choice
training_split: train
training_split: train
validation_split: validation
validation_split: validation
test_split: test
doc_to_text: null
doc_to_text: null
doc_to_target: label
doc_to_target: label
doc_to_choice: null
doc_to_choice: null
...
...
lm_eval/tasks/xnli/xnli_de.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
de
dataset_name
:
de
doc_to_choice
:
'
{["Ja,
{{hypothesis}}",
"Auch,
{{hypothesis}}",
"Nein,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
richtig?
Ja,
"+hypothesis,premise+",
richtig?
Auch,
doc_to_text
:
'
{{premise}},
richtig?'
"+hypothesis,premise+",
richtig?
Nein,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_de
task
:
xnli_de
lm_eval/tasks/xnli/xnli_el.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
el
dataset_name
:
el
doc_to_choice
:
'
{["Ναί,
{{hypothesis}}",
"Έτσι,
{{hypothesis}}",
"όχι,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
σωστός?
Ναί,
"+hypothesis,premise+",
σωστός?
Έτσι,
"+hypothesis,premise+",
doc_to_text
:
'
{{premise}},
σωστός?'
σωστός?
όχι,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_el
task
:
xnli_el
lm_eval/tasks/xnli/xnli_en.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
en
dataset_name
:
en
doc_to_choice
:
'
{["Yes,
{{hypothesis}}",
"Also,
{{hypothesis}}",
"No,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
right?
Yes,
"+hypothesis,premise+",
right?
Also,
"+hypothesis,premise+",
doc_to_text
:
'
{{premise}},
right?'
right?
No,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_en
task
:
xnli_en
lm_eval/tasks/xnli/xnli_es.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
es
dataset_name
:
es
doc_to_choice
:
'
{["Sí,
{{hypothesis}}",
"Asi
que,
{{hypothesis}}",
"No,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
correcto?
Sí,
"+hypothesis,premise+",
correcto?
Asi
doc_to_text
:
'
{{premise}},
correcto?'
que,
"+hypothesis,premise+",
correcto?
No,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_es
task
:
xnli_es
lm_eval/tasks/xnli/xnli_fr.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
fr
dataset_name
:
fr
doc_to_choice
:
'
{["Oui,
{{hypothesis}}",
"Aussi,
{{hypothesis}}",
"Non,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
correct?
Oui,
"+hypothesis,premise+",
correct?
Aussi,
doc_to_text
:
'
{{premise}},
correct?'
"+hypothesis,premise+",
correct?
Non,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_fr
task
:
xnli_fr
lm_eval/tasks/xnli/xnli_hi.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
hi
dataset_name
:
hi
doc_to_choice
:
'
{["हाँ,
{{hypothesis}}",
"इसलिए,
{{hypothesis}}",
"नहीं,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
सही?
हाँ,
"+hypothesis,premise+",
सही?
इसलिए,
"+hypothesis,premise+",
doc_to_text
:
'
{{premise}},
सही?'
सही?
नहीं,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_hi
task
:
xnli_hi
lm_eval/tasks/xnli/xnli_ru.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
ru
dataset_name
:
ru
doc_to_choice
:
'
{["Да,
{{hypothesis}}",
"Так,
{{hypothesis}}",
"Нет,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
правильно?
Да,
"+hypothesis,premise+",
правильно?
Так,
doc_to_text
:
'
{{premise}},
правильно?'
"+hypothesis,premise+",
правильно?
Нет,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_ru
task
:
xnli_ru
lm_eval/tasks/xnli/xnli_sw.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
sw
dataset_name
:
sw
doc_to_choice
:
'
{["Ndiyo,
{{hypothesis}}",
"Hivyo,
{{hypothesis}}",
"Hapana,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
sahihi?
Ndiyo,
"+hypothesis,premise+",
sahihi?
Hivyo,
doc_to_text
:
'
{{premise}},
sahihi?'
"+hypothesis,premise+",
sahihi?
Hapana,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_sw
task
:
xnli_sw
lm_eval/tasks/xnli/xnli_th.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
th
dataset_name
:
th
doc_to_choice
:
'
{["ใช่,
{{hypothesis}}",
"ดังนั้น,
{{hypothesis}}",
"ไม่,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
ถูกต้อง?
ใช่,
"+hypothesis,premise+",
ถูกต้อง?
ดังนั้น,
doc_to_text
:
'
{{premise}},
ถูกต้อง?'
"+hypothesis,premise+",
ถูกต้อง?
ไม่,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_th
task
:
xnli_th
lm_eval/tasks/xnli/xnli_tr.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
tr
dataset_name
:
tr
doc_to_choice
:
'
{["Evet,
{{hypothesis}}",
"Böylece,
{{hypothesis}}",
"Hayır,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
doğru?
Evet,
"+hypothesis,premise+",
doğru?
Böylece,
doc_to_text
:
'
{{premise}},
doğru?'
"+hypothesis,premise+",
doğru?
Hayır,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_tr
task
:
xnli_tr
lm_eval/tasks/xnli/xnli_ur.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
ur
dataset_name
:
ur
doc_to_choice
:
'
{["جی
ہاں,
{{hypothesis}}",
"اس
لئے,
{{hypothesis}}",
"نہیں,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
صحیح?
جی
ہاں,
"+hypothesis,premise+",
صحیح?
اس
لئے,
doc_to_text
:
'
{{premise}},
صحیح?'
"+hypothesis,premise+",
صحیح?
نہیں,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_ur
task
:
xnli_ur
lm_eval/tasks/xnli/xnli_vi.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
vi
dataset_name
:
vi
doc_to_choice
:
'
{["Vâng,
{{hypothesis}}",
"Vì
vậy,
{{hypothesis}}",
"Không,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
đúng?
Vâng,
"+hypothesis,premise+",
đúng?
Vì
vậy,
"+hypothesis,premise+",
doc_to_text
:
'
{{premise}},
đúng?'
đúng?
Không,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_vi
task
:
xnli_vi
lm_eval/tasks/xnli/xnli_zh.yaml
View file @
83683ddd
# Generated by utils.py
# Generated by utils.py
dataset_name
:
zh
dataset_name
:
zh
doc_to_choice
:
'
{["是的,
{{hypothesis}}",
"所以,
{{hypothesis}}",
"不是的,
{{hypothesis}}"]}'
doc_to_choice
:
'
{{[premise+",
正确?
是的,
"+hypothesis,premise+",
正确?
所以,
"+hypothesis,premise+",
doc_to_text
:
'
{{premise}},
正确?'
正确?
不是的,
"+hypothesis]}}'
doc_to_text
:
'
'
include
:
xnli_common_yaml
include
:
xnli_common_yaml
task
:
xnli_zh
task
:
xnli_zh
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