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
1b14602e
Commit
1b14602e
authored
Dec 08, 2023
by
h-albert-lee
Browse files
implementing kmmlu
parent
e5dfd030
Changes
48
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
0 deletions
+39
-0
lm_eval/tasks/kmmlu/kmmlu_public safety.yaml
lm_eval/tasks/kmmlu/kmmlu_public safety.yaml
+3
-0
lm_eval/tasks/kmmlu/kmmlu_railway and automotive engineering.yaml
...tasks/kmmlu/kmmlu_railway and automotive engineering.yaml
+3
-0
lm_eval/tasks/kmmlu/kmmlu_real estate.yaml
lm_eval/tasks/kmmlu/kmmlu_real estate.yaml
+3
-0
lm_eval/tasks/kmmlu/kmmlu_refrigerating machinery.yaml
lm_eval/tasks/kmmlu/kmmlu_refrigerating machinery.yaml
+3
-0
lm_eval/tasks/kmmlu/kmmlu_social welfare.yaml
lm_eval/tasks/kmmlu/kmmlu_social welfare.yaml
+3
-0
lm_eval/tasks/kmmlu/kmmlu_taxation.yaml
lm_eval/tasks/kmmlu/kmmlu_taxation.yaml
+3
-0
lm_eval/tasks/kmmlu/kmmlu_telecommunications and wireless technology.yaml
...mlu/kmmlu_telecommunications and wireless technology.yaml
+3
-0
lm_eval/tasks/kmmlu/utils.py
lm_eval/tasks/kmmlu/utils.py
+18
-0
No files found.
lm_eval/tasks/kmmlu/kmmlu_public safety.yaml
0 → 100644
View file @
1b14602e
dataset_name
:
Public Safety
include
:
_default_kmmlu_yaml
task
:
kmmlu_public safety
lm_eval/tasks/kmmlu/kmmlu_railway and automotive engineering.yaml
0 → 100644
View file @
1b14602e
dataset_name
:
Railway and Automotive Engineering
include
:
_default_kmmlu_yaml
task
:
kmmlu_railway and automotive engineering
lm_eval/tasks/kmmlu/kmmlu_real estate.yaml
0 → 100644
View file @
1b14602e
dataset_name
:
Real Estate
include
:
_default_kmmlu_yaml
task
:
kmmlu_real estate
lm_eval/tasks/kmmlu/kmmlu_refrigerating machinery.yaml
0 → 100644
View file @
1b14602e
dataset_name
:
Refrigerating Machinery
include
:
_default_kmmlu_yaml
task
:
kmmlu_refrigerating machinery
lm_eval/tasks/kmmlu/kmmlu_social welfare.yaml
0 → 100644
View file @
1b14602e
dataset_name
:
Social Welfare
include
:
_default_kmmlu_yaml
task
:
kmmlu_social welfare
lm_eval/tasks/kmmlu/kmmlu_taxation.yaml
0 → 100644
View file @
1b14602e
dataset_name
:
Taxation
include
:
_default_kmmlu_yaml
task
:
kmmlu_taxation
lm_eval/tasks/kmmlu/kmmlu_telecommunications and wireless technology.yaml
0 → 100644
View file @
1b14602e
dataset_name
:
Telecommunications and Wireless Technology
include
:
_default_kmmlu_yaml
task
:
kmmlu_telecommunications and wireless technology
lm_eval/tasks/kmmlu/utils.py
0 → 100644
View file @
1b14602e
import
datasets
def
process_docs
(
dataset
:
datasets
.
Dataset
)
->
datasets
.
Dataset
:
def
_process_doc
(
doc
):
instruction
=
f
"""다음을 읽고 정답으로 알맞은 것을 고르시요.
### Context:
{
doc
[
"context"
]
}
### Question:
{
doc
[
"question"
]
}
### Options:
(1)
{
doc
[
'option#1'
]
}
\n
(2)
{
doc
[
"option#2"
]
}
\n
(3)
{
doc
[
"option#3"
]
}
\n
(4)
{
doc
[
'option#4'
]
}
}
### Answer: 주어진 문제의 정답은"""
out_doc
=
{
"question"
:
instruction
,
"choices"
:
[
"(1)"
,
"(2)"
,
"(3)"
,
"(4)"
],
"gold"
:
int
(
doc
[
"gold"
])
-
1
,
}
return
out_doc
return
dataset
.
map
(
_process_doc
)
Prev
1
2
3
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