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
4288b53e
Commit
4288b53e
authored
Jan 29, 2025
by
Baber
Browse files
Merge branch 'main' into llama
parents
37eb9c9d
94344a61
Changes
201
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
160 additions
and
4 deletions
+160
-4
lm_eval/tasks/global_mmlu/default/en/utils.py
lm_eval/tasks/global_mmlu/default/en/utils.py
+18
-0
lm_eval/tasks/global_mmlu/default/es/_es_template_yaml
lm_eval/tasks/global_mmlu/default/es/_es_template_yaml
+16
-0
lm_eval/tasks/global_mmlu/default/es/_global_mmlu_es.yaml
lm_eval/tasks/global_mmlu/default/es/_global_mmlu_es.yaml
+13
-0
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_business.yaml
...tasks/global_mmlu/default/es/global_mmlu_es_business.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_humanities.yaml
...sks/global_mmlu/default/es/global_mmlu_es_humanities.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_medical.yaml
.../tasks/global_mmlu/default/es/global_mmlu_es_medical.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_other.yaml
...al/tasks/global_mmlu/default/es/global_mmlu_es_other.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_social_sciences.yaml
...lobal_mmlu/default/es/global_mmlu_es_social_sciences.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_stem.yaml
...val/tasks/global_mmlu/default/es/global_mmlu_es_stem.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/es/utils.py
lm_eval/tasks/global_mmlu/default/es/utils.py
+18
-0
lm_eval/tasks/global_mmlu/default/fr/_fr_template_yaml
lm_eval/tasks/global_mmlu/default/fr/_fr_template_yaml
+16
-0
lm_eval/tasks/global_mmlu/default/fr/_global_mmlu_fr.yaml
lm_eval/tasks/global_mmlu/default/fr/_global_mmlu_fr.yaml
+13
-0
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_business.yaml
...tasks/global_mmlu/default/fr/global_mmlu_fr_business.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_humanities.yaml
...sks/global_mmlu/default/fr/global_mmlu_fr_humanities.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_medical.yaml
.../tasks/global_mmlu/default/fr/global_mmlu_fr_medical.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_other.yaml
...al/tasks/global_mmlu/default/fr/global_mmlu_fr_other.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_social_sciences.yaml
...lobal_mmlu/default/fr/global_mmlu_fr_social_sciences.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_stem.yaml
...val/tasks/global_mmlu/default/fr/global_mmlu_fr_stem.yaml
+4
-0
lm_eval/tasks/global_mmlu/default/fr/utils.py
lm_eval/tasks/global_mmlu/default/fr/utils.py
+18
-0
lm_eval/tasks/global_mmlu/default/global_mmlu_ar.yaml
lm_eval/tasks/global_mmlu/default/global_mmlu_ar.yaml
+0
-4
No files found.
lm_eval/tasks/global_mmlu/default/en/utils.py
0 → 100644
View file @
4288b53e
from
functools
import
partial
CATEGORIES
=
[
"Business"
,
"Humanities"
,
"Medical"
,
"Other"
,
"STEM"
,
"Social Sciences"
]
def
process_docs
(
dataset
,
category
):
return
dataset
.
filter
(
lambda
x
:
x
[
"subject_category"
]
==
category
)
process_functions
=
{
f
"process_
{
category
.
lower
().
replace
(
' '
,
'_'
)
}
"
:
partial
(
process_docs
,
category
=
category
)
for
category
in
CATEGORIES
}
globals
().
update
(
process_functions
)
lm_eval/tasks/global_mmlu/default/es/_es_template_yaml
0 → 100644
View file @
4288b53e
dataset_path: CohereForAI/Global-MMLU-Lite
dataset_name: es
test_split: test
fewshot_split: dev
fewshot_config:
sampler: default
output_type: multiple_choice
doc_to_text: "{{question.strip()}}\nA. {{option_a}}\nB. {{option_b}}\nC. {{option_c}}\nD. {{option_d}}\nAnswer:"
doc_to_choice: ["A", "B", "C", "D"]
doc_to_target: answer
metric_list:
- metric: acc
aggregation: mean
higher_is_better: true
metadata:
version: 0.0
lm_eval/tasks/global_mmlu/default/es/_global_mmlu_es.yaml
0 → 100644
View file @
4288b53e
group
:
global_mmlu_es
task
:
-
global_mmlu_es_business
-
global_mmlu_es_humanities
-
global_mmlu_es_medical
-
global_mmlu_es_other
-
global_mmlu_es_stem
-
global_mmlu_es_social_sciences
aggregate_metric_list
:
-
metric
:
acc
weight_by_size
:
True
metadata
:
version
:
0.0
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_business.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_es_template_yaml
process_docs
:
!function
utils.process_business
task
:
global_mmlu_es_business
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_humanities.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_es_template_yaml
process_docs
:
!function
utils.process_humanities
task
:
global_mmlu_es_humanities
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_medical.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_es_template_yaml
process_docs
:
!function
utils.process_medical
task
:
global_mmlu_es_medical
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_other.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_es_template_yaml
process_docs
:
!function
utils.process_other
task
:
global_mmlu_es_other
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_social_sciences.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_es_template_yaml
process_docs
:
!function
utils.process_social_sciences
task
:
global_mmlu_es_social_sciences
lm_eval/tasks/global_mmlu/default/es/global_mmlu_es_stem.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_es_template_yaml
process_docs
:
!function
utils.process_stem
task
:
global_mmlu_es_stem
lm_eval/tasks/global_mmlu/default/es/utils.py
0 → 100644
View file @
4288b53e
from
functools
import
partial
CATEGORIES
=
[
"Business"
,
"Humanities"
,
"Medical"
,
"Other"
,
"STEM"
,
"Social Sciences"
]
def
process_docs
(
dataset
,
category
):
return
dataset
.
filter
(
lambda
x
:
x
[
"subject_category"
]
==
category
)
process_functions
=
{
f
"process_
{
category
.
lower
().
replace
(
' '
,
'_'
)
}
"
:
partial
(
process_docs
,
category
=
category
)
for
category
in
CATEGORIES
}
globals
().
update
(
process_functions
)
lm_eval/tasks/global_mmlu/default/fr/_fr_template_yaml
0 → 100644
View file @
4288b53e
dataset_path: CohereForAI/Global-MMLU-Lite
dataset_name: fr
test_split: test
fewshot_split: dev
fewshot_config:
sampler: default
output_type: multiple_choice
doc_to_text: "{{question.strip()}}\nA. {{option_a}}\nB. {{option_b}}\nC. {{option_c}}\nD. {{option_d}}\nAnswer:"
doc_to_choice: ["A", "B", "C", "D"]
doc_to_target: answer
metric_list:
- metric: acc
aggregation: mean
higher_is_better: true
metadata:
version: 0.0
lm_eval/tasks/global_mmlu/default/fr/_global_mmlu_fr.yaml
0 → 100644
View file @
4288b53e
group
:
global_mmlu_fr
task
:
-
global_mmlu_fr_business
-
global_mmlu_fr_humanities
-
global_mmlu_fr_medical
-
global_mmlu_fr_other
-
global_mmlu_fr_stem
-
global_mmlu_fr_social_sciences
aggregate_metric_list
:
-
metric
:
acc
weight_by_size
:
True
metadata
:
version
:
0.0
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_business.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_fr_template_yaml
process_docs
:
!function
utils.process_business
task
:
global_mmlu_fr_business
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_humanities.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_fr_template_yaml
process_docs
:
!function
utils.process_humanities
task
:
global_mmlu_fr_humanities
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_medical.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_fr_template_yaml
process_docs
:
!function
utils.process_medical
task
:
global_mmlu_fr_medical
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_other.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_fr_template_yaml
process_docs
:
!function
utils.process_other
task
:
global_mmlu_fr_other
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_social_sciences.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_fr_template_yaml
process_docs
:
!function
utils.process_social_sciences
task
:
global_mmlu_fr_social_sciences
lm_eval/tasks/global_mmlu/default/fr/global_mmlu_fr_stem.yaml
0 → 100644
View file @
4288b53e
# Generated by _generate_configs.py
include
:
_fr_template_yaml
process_docs
:
!function
utils.process_stem
task
:
global_mmlu_fr_stem
lm_eval/tasks/global_mmlu/default/fr/utils.py
0 → 100644
View file @
4288b53e
from
functools
import
partial
CATEGORIES
=
[
"Business"
,
"Humanities"
,
"Medical"
,
"Other"
,
"STEM"
,
"Social Sciences"
]
def
process_docs
(
dataset
,
category
):
return
dataset
.
filter
(
lambda
x
:
x
[
"subject_category"
]
==
category
)
process_functions
=
{
f
"process_
{
category
.
lower
().
replace
(
' '
,
'_'
)
}
"
:
partial
(
process_docs
,
category
=
category
)
for
category
in
CATEGORIES
}
globals
().
update
(
process_functions
)
lm_eval/tasks/global_mmlu/default/global_mmlu_ar.yaml
deleted
100644 → 0
View file @
37eb9c9d
# Generated by _generate_configs.py
dataset_name
:
ar
include
:
_default_yaml
task
:
global_mmlu_ar
Prev
1
2
3
4
5
6
7
…
11
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