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
OpenDAS
opencompass
Commits
01254666
Unverified
Commit
01254666
authored
Sep 26, 2023
by
Kevin Wang
Committed by
GitHub
Sep 26, 2023
Browse files
[SIG] add WikiText-2&103 (#397)
* fix conflict * add eval_cfg
parent
9b21613d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
0 deletions
+86
-0
configs/datasets/wikitext/wikitext_103_raw_ppl.py
configs/datasets/wikitext/wikitext_103_raw_ppl.py
+4
-0
configs/datasets/wikitext/wikitext_103_raw_ppl_752e2a.py
configs/datasets/wikitext/wikitext_103_raw_ppl_752e2a.py
+39
-0
configs/datasets/wikitext/wikitext_2_raw_ppl.py
configs/datasets/wikitext/wikitext_2_raw_ppl.py
+4
-0
configs/datasets/wikitext/wikitext_2_raw_ppl_752e2a.py
configs/datasets/wikitext/wikitext_2_raw_ppl_752e2a.py
+39
-0
No files found.
configs/datasets/wikitext/wikitext_103_raw_ppl.py
0 → 100644
View file @
01254666
from
mmengine.config
import
read_base
with
read_base
():
from
.wikitext_103_raw_ppl_752e2a
import
wikitext_103_raw_datasets
# noqa: F401, F403
configs/datasets/wikitext/wikitext_103_raw_ppl_752e2a.py
0 → 100644
View file @
01254666
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
from
opencompass.openicl.icl_inferencer
import
GenInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
HFDataset
wikitext_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
{
0
:
'{text}'
}
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
GenInferencer
),
# need a new ppl inferencer
)
wikitext_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
),
)
wikitext_103_raw_datasets
=
[]
for
_split
in
[
"validation"
,
"test"
]:
wikitext_reader_cfg
=
dict
(
input_columns
=
[
"text"
],
output_column
=
None
,
train_split
=
"train"
,
test_split
=
_split
,
)
wikitext_103_raw_datasets
.
append
(
dict
(
abbr
=
f
"wikitext-103-raw-
{
_split
}
"
,
type
=
HFDataset
,
path
=
"wikitext"
,
name
=
"wikitext-103-raw-v1"
,
reader_cfg
=
wikitext_reader_cfg
,
infer_cfg
=
wikitext_infer_cfg
,
eval_cfg
=
wikitext_eval_cfg
,
)
)
configs/datasets/wikitext/wikitext_2_raw_ppl.py
0 → 100644
View file @
01254666
from
mmengine.config
import
read_base
with
read_base
():
from
.wikitext_2_raw_ppl_752e2a
import
wikitext_2_raw_datasets
# noqa: F401, F403
configs/datasets/wikitext/wikitext_2_raw_ppl_752e2a.py
0 → 100644
View file @
01254666
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
from
opencompass.openicl.icl_inferencer
import
GenInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
HFDataset
wikitext_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
{
0
:
'{text}'
}
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
GenInferencer
),
# need a new ppl inferencer
)
wikitext_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
),
)
wikitext_2_raw_datasets
=
[]
for
_split
in
[
"validation"
,
"test"
]:
wikitext_reader_cfg
=
dict
(
input_columns
=
[
"text"
],
output_column
=
None
,
train_split
=
"train"
,
test_split
=
_split
,
)
wikitext_2_raw_datasets
.
append
(
dict
(
abbr
=
f
"wikitext-2-raw-
{
_split
}
"
,
type
=
HFDataset
,
path
=
"wikitext"
,
name
=
"wikitext-2-raw-v1"
,
reader_cfg
=
wikitext_reader_cfg
,
infer_cfg
=
wikitext_infer_cfg
,
eval_cfg
=
wikitext_eval_cfg
,
)
)
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