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
601be343
Commit
601be343
authored
Jun 23, 2025
by
Baber
Browse files
Merge branch 'main' into feature/eval_from_config
parents
d0884a96
68c3a811
Changes
1000
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
208 additions
and
32 deletions
+208
-32
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_sna.yaml
...s/afrimmlu/translate/prompt_5/afrimmlu_translate_sna.yaml
+4
-0
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_sot.yaml
...s/afrimmlu/translate/prompt_5/afrimmlu_translate_sot.yaml
+4
-0
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_swa.yaml
...s/afrimmlu/translate/prompt_5/afrimmlu_translate_swa.yaml
+4
-0
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_twi.yaml
...s/afrimmlu/translate/prompt_5/afrimmlu_translate_twi.yaml
+4
-0
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_wol.yaml
...s/afrimmlu/translate/prompt_5/afrimmlu_translate_wol.yaml
+4
-0
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_xho.yaml
...s/afrimmlu/translate/prompt_5/afrimmlu_translate_xho.yaml
+4
-0
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_yor.yaml
...s/afrimmlu/translate/prompt_5/afrimmlu_translate_yor.yaml
+4
-0
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_zul.yaml
...s/afrimmlu/translate/prompt_5/afrimmlu_translate_zul.yaml
+4
-0
lm_eval/tasks/afrimmlu/translate/prompt_5/utils.py
lm_eval/tasks/afrimmlu/translate/prompt_5/utils.py
+28
-0
lm_eval/tasks/afrimmlu/translate/utils.py
lm_eval/tasks/afrimmlu/translate/utils.py
+0
-32
lm_eval/tasks/afrixnli/direct/afrixnli.yaml
lm_eval/tasks/afrixnli/direct/afrixnli.yaml
+13
-0
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_amh.yaml
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_amh.yaml
+15
-0
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_eng.yaml
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_eng.yaml
+15
-0
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_ewe.yaml
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_ewe.yaml
+15
-0
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_fra.yaml
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_fra.yaml
+15
-0
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_hau.yaml
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_hau.yaml
+15
-0
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_ibo.yaml
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_ibo.yaml
+15
-0
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_kin.yaml
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_kin.yaml
+15
-0
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_lin.yaml
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_lin.yaml
+15
-0
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_lug.yaml
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_lug.yaml
+15
-0
No files found.
Too many changes to show.
To preserve performance only
1000 of 1000+
files are displayed.
Plain diff
Email patch
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_sna.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
sna
include
:
afrimmlu_translate
task
:
afrimmlu_translate_sna_prompt_5
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_sot.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
sot
include
:
afrimmlu_translate
task
:
afrimmlu_translate_sot_prompt_5
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_swa.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
swa
include
:
afrimmlu_translate
task
:
afrimmlu_translate_swa_prompt_5
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_twi.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
twi
include
:
afrimmlu_translate
task
:
afrimmlu_translate_twi_prompt_5
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_wol.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
wol
include
:
afrimmlu_translate
task
:
afrimmlu_translate_wol_prompt_5
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_xho.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
xho
include
:
afrimmlu_translate
task
:
afrimmlu_translate_xho_prompt_5
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_yor.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
yor
include
:
afrimmlu_translate
task
:
afrimmlu_translate_yor_prompt_5
lm_eval/tasks/afrimmlu/translate/prompt_5/afrimmlu_translate_zul.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
zul
include
:
afrimmlu_translate
task
:
afrimmlu_translate_zul_prompt_5
lm_eval/tasks/afrimmlu/translate/prompt_5/utils.py
0 → 100644
View file @
601be343
from
lm_eval.utils
import
weighted_f1_score
def
doc_to_choice
(
doc
):
choices
=
eval
(
doc
[
"choices"
])
return
choices
def
doc_to_text
(
doc
):
output
=
"""Given your proficiency in {subject}, please answer the subsequent multiple-choice question with 'A', 'B', 'C', or 'D'.
Question: {question}
Choices:
A: {choice1}
B: {choice2}
C: {choice3}
D: {choice4}
Answer: """
choices
=
eval
(
doc
[
"choices"
])
text
=
output
.
format
(
subject
=
doc
[
"subject"
],
question
=
doc
[
"question"
],
choice1
=
choices
[
0
],
choice2
=
choices
[
1
],
choice3
=
choices
[
2
],
choice4
=
choices
[
3
],
)
return
text
lm_eval/tasks/afrimmlu/translate/utils.py
deleted
100644 → 0
View file @
d0884a96
from
lm_eval.utils
import
weighted_f1_score
def
doc_to_choice
(
doc
):
choices
=
eval
(
doc
[
"choices"
])
return
choices
def
doc_to_text
(
doc
):
output
=
"""You are a highly knowledgeable and intelligent artificial intelligence
model answers multiple-choice questions about '{subject}'
Question: '''{question}'''
Choices:
A: ''{choice1}'''
B: ''{choice2}'''
C: ''{choice3}'''
D: ''{choice4}'''
Answer: """
choices
=
eval
(
doc
[
"choices"
])
text
=
output
.
format
(
subject
=
doc
[
"subject"
],
question
=
doc
[
"question"
],
choice1
=
choices
[
0
],
choice2
=
choices
[
1
],
choice3
=
choices
[
2
],
choice4
=
choices
[
3
],
)
return
text
lm_eval/tasks/afrixnli/direct/afrixnli.yaml
0 → 100644
View file @
601be343
group
:
afrixnli-irokobench
task
:
-
afrixnli_tasks_prompt_1
-
afrixnli_tasks_prompt_2
-
afrixnli_tasks_prompt_3
-
afrixnli_tasks_prompt_4
-
afrixnli_tasks_prompt_5
aggregate_metric_list
:
-
metric
:
acc
aggregation
:
mean
weight_by_size
:
true
metadata
:
version
:
2
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_amh.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
amh
doc_to_text
:
'
Please
identify
whether
the
premise
entails
or
contradicts
the
hypothesis
in
the
following
premise
and
hypothesis.
The
answer
should
be
exact
entailment,
contradiction,
or
neutral.
Premise:
{premise}
Hypothesis:
{hypothesis}
Is
it
entailment,
contradiction,
or
neutral?'
include
:
afrixnli_yaml
task
:
afrixnli_amh_prompt_1
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_eng.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
eng
doc_to_text
:
'
Please
identify
whether
the
premise
entails
or
contradicts
the
hypothesis
in
the
following
premise
and
hypothesis.
The
answer
should
be
exact
entailment,
contradiction,
or
neutral.
Premise:
{premise}
Hypothesis:
{hypothesis}
Is
it
entailment,
contradiction,
or
neutral?'
include
:
afrixnli_yaml
task
:
afrixnli_eng_prompt_1
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_ewe.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
ewe
doc_to_text
:
'
Please
identify
whether
the
premise
entails
or
contradicts
the
hypothesis
in
the
following
premise
and
hypothesis.
The
answer
should
be
exact
entailment,
contradiction,
or
neutral.
Premise:
{premise}
Hypothesis:
{hypothesis}
Is
it
entailment,
contradiction,
or
neutral?'
include
:
afrixnli_yaml
task
:
afrixnli_ewe_prompt_1
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_fra.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
fra
doc_to_text
:
'
Please
identify
whether
the
premise
entails
or
contradicts
the
hypothesis
in
the
following
premise
and
hypothesis.
The
answer
should
be
exact
entailment,
contradiction,
or
neutral.
Premise:
{premise}
Hypothesis:
{hypothesis}
Is
it
entailment,
contradiction,
or
neutral?'
include
:
afrixnli_yaml
task
:
afrixnli_fra_prompt_1
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_hau.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
hau
doc_to_text
:
'
Please
identify
whether
the
premise
entails
or
contradicts
the
hypothesis
in
the
following
premise
and
hypothesis.
The
answer
should
be
exact
entailment,
contradiction,
or
neutral.
Premise:
{premise}
Hypothesis:
{hypothesis}
Is
it
entailment,
contradiction,
or
neutral?'
include
:
afrixnli_yaml
task
:
afrixnli_hau_prompt_1
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_ibo.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
ibo
doc_to_text
:
'
Please
identify
whether
the
premise
entails
or
contradicts
the
hypothesis
in
the
following
premise
and
hypothesis.
The
answer
should
be
exact
entailment,
contradiction,
or
neutral.
Premise:
{premise}
Hypothesis:
{hypothesis}
Is
it
entailment,
contradiction,
or
neutral?'
include
:
afrixnli_yaml
task
:
afrixnli_ibo_prompt_1
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_kin.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
kin
doc_to_text
:
'
Please
identify
whether
the
premise
entails
or
contradicts
the
hypothesis
in
the
following
premise
and
hypothesis.
The
answer
should
be
exact
entailment,
contradiction,
or
neutral.
Premise:
{premise}
Hypothesis:
{hypothesis}
Is
it
entailment,
contradiction,
or
neutral?'
include
:
afrixnli_yaml
task
:
afrixnli_kin_prompt_1
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_lin.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
lin
doc_to_text
:
'
Please
identify
whether
the
premise
entails
or
contradicts
the
hypothesis
in
the
following
premise
and
hypothesis.
The
answer
should
be
exact
entailment,
contradiction,
or
neutral.
Premise:
{premise}
Hypothesis:
{hypothesis}
Is
it
entailment,
contradiction,
or
neutral?'
include
:
afrixnli_yaml
task
:
afrixnli_lin_prompt_1
lm_eval/tasks/afrixnli/direct/prompt_1/afrixnli_lug.yaml
0 → 100644
View file @
601be343
# Generated by utils.py
dataset_name
:
lug
doc_to_text
:
'
Please
identify
whether
the
premise
entails
or
contradicts
the
hypothesis
in
the
following
premise
and
hypothesis.
The
answer
should
be
exact
entailment,
contradiction,
or
neutral.
Premise:
{premise}
Hypothesis:
{hypothesis}
Is
it
entailment,
contradiction,
or
neutral?'
include
:
afrixnli_yaml
task
:
afrixnli_lug_prompt_1
Prev
1
…
33
34
35
36
37
38
39
40
41
…
50
Next
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