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
jerrrrry
opencompass
Commits
be3dfa50
Commit
be3dfa50
authored
Aug 06, 2025
by
jerrrrry
Browse files
Initial commit
parents
Pipeline
#2876
failed with stages
in 0 seconds
Changes
807
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
660 additions
and
0 deletions
+660
-0
opencompass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_gen.py
...ass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_gen.py
+4
-0
opencompass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_gen_68aac7.py
...figs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_gen_68aac7.py
+43
-0
opencompass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl.py
...ass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl.py
+4
-0
opencompass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl_50f8f6.py
...figs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl_50f8f6.py
+34
-0
opencompass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl_66caf3.py
...figs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl_66caf3.py
+53
-0
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_cot_gen_1d56df.py
...atasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_cot_gen_1d56df.py
+55
-0
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_few_shot_gen_ba58ea.py
...ts/SuperGLUE_BoolQ/SuperGLUE_BoolQ_few_shot_gen_ba58ea.py
+47
-0
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_few_shot_ppl.py
.../datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_few_shot_ppl.py
+47
-0
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_gen.py
...s/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_gen.py
+4
-0
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_gen_883d50.py
...gs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_gen_883d50.py
+41
-0
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl.py
...s/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl.py
+4
-0
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_16b1d9.py
...gs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_16b1d9.py
+43
-0
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_314797.py
...gs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_314797.py
+43
-0
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_314b96.py
...gs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_314b96.py
+45
-0
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_4da4db.py
...gs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_4da4db.py
+45
-0
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_9619db.py
...gs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_9619db.py
+34
-0
opencompass/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_gen.py
...compass/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_gen.py
+4
-0
opencompass/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_gen_854c6c.py
.../configs/datasets/SuperGLUE_CB/SuperGLUE_CB_gen_854c6c.py
+44
-0
opencompass/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl.py
...compass/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl.py
+4
-0
opencompass/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl_0143fe.py
.../configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl_0143fe.py
+62
-0
No files found.
Too many changes to show.
To preserve performance only
807 of 807+
files are displayed.
Plain diff
Email patch
opencompass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_gen.py
0 → 100644
View file @
be3dfa50
from
mmengine.config
import
read_base
with
read_base
():
from
.SuperGLUE_AX_g_gen_68aac7
import
AX_g_datasets
# noqa: F401, F403
opencompass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_gen_68aac7.py
0 → 100644
View file @
be3dfa50
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
AXDatasetV2
from
opencompass.utils.text_postprocessors
import
first_option_postprocess
AX_g_reader_cfg
=
dict
(
input_columns
=
[
'hypothesis'
,
'premise'
],
output_column
=
'label'
,
)
AX_g_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{premise}
\n
{hypothesis}
\n
Is the sentence below entailed by the sentence above?
\n
A. Yes
\n
B. No
\n
Answer:'
),
]),
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
GenInferencer
),
)
AX_g_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
),
pred_role
=
'BOT'
,
pred_postprocessor
=
dict
(
type
=
first_option_postprocess
,
options
=
'AB'
),
)
AX_g_datasets
=
[
dict
(
abbr
=
'AX_g'
,
type
=
AXDatasetV2
,
path
=
'./data/SuperGLUE/AX-g/AX-g.jsonl'
,
reader_cfg
=
AX_g_reader_cfg
,
infer_cfg
=
AX_g_infer_cfg
,
eval_cfg
=
AX_g_eval_cfg
,
)
]
opencompass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl.py
0 → 100644
View file @
be3dfa50
from
mmengine.config
import
read_base
with
read_base
():
from
.SuperGLUE_AX_g_ppl_66caf3
import
AX_g_datasets
# noqa: F401, F403
opencompass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl_50f8f6.py
0 → 100644
View file @
be3dfa50
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
from
opencompass.openicl.icl_inferencer
import
PPLInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
HFDataset
AX_g_reader_cfg
=
dict
(
input_columns
=
[
'hypothesis'
,
'premise'
],
output_column
=
'label'
,
test_split
=
'train'
)
AX_g_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
{
'entailment'
:
'{premise}?entailment, {hypothesis}'
,
'not_entailment'
:
'{premise}?not_entailment, {hypothesis}'
}),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
PPLInferencer
))
AX_g_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
))
AX_g_datasets
=
[
dict
(
type
=
HFDataset
,
abbr
=
'AX_g'
,
path
=
'json'
,
data_files
=
'./data/SuperGLUE/AX-g/AX-g.jsonl'
,
split
=
'train'
,
reader_cfg
=
AX_g_reader_cfg
,
infer_cfg
=
AX_g_infer_cfg
,
eval_cfg
=
AX_g_eval_cfg
)
]
opencompass/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl_66caf3.py
0 → 100644
View file @
be3dfa50
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
from
opencompass.openicl.icl_inferencer
import
PPLInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
HFDataset
AX_g_reader_cfg
=
dict
(
input_columns
=
[
'hypothesis'
,
'premise'
],
output_column
=
'label'
,
test_split
=
'train'
)
AX_g_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
{
'entailment'
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{premise}
\n
{hypothesis}
\n
Is the sentence below entailed by the sentence above?'
),
dict
(
role
=
'BOT'
,
prompt
=
'Yes'
),
]),
'not_entailment'
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{premise}
\n
{hypothesis}
\n
Is the sentence below entailed by the sentence above?'
),
dict
(
role
=
'BOT'
,
prompt
=
'No'
),
])
},
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
PPLInferencer
),
)
AX_g_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
))
AX_g_datasets
=
[
dict
(
type
=
HFDataset
,
abbr
=
'AX_g'
,
path
=
'json'
,
data_files
=
'./data/SuperGLUE/AX-g/AX-g.jsonl'
,
split
=
'train'
,
reader_cfg
=
AX_g_reader_cfg
,
infer_cfg
=
AX_g_infer_cfg
,
eval_cfg
=
AX_g_eval_cfg
,
)
]
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_cot_gen_1d56df.py
0 → 100644
View file @
be3dfa50
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
BoolQDatasetV2
from
opencompass.utils.text_postprocessors
import
(
first_option_postprocess
,
)
QUERY_TEMPLATE
=
"""
Answer the following question. The last line of your response should be of the following format: 'ANSWER: $LETTER' (without quotes) where LETTER is one of AB. Think step by step before answering.
Passage: {passage}
Question: {question}
A. Yes
B. NO
"""
.
strip
()
BoolQ_reader_cfg
=
dict
(
input_columns
=
[
'question'
,
'passage'
],
output_column
=
'label'
,
)
BoolQ_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
QUERY_TEMPLATE
),
]
),
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
GenInferencer
),
)
BoolQ_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
),
pred_role
=
'BOT'
,
pred_postprocessor
=
dict
(
type
=
first_option_postprocess
,
options
=
'AB'
),
)
BoolQ_datasets
=
[
dict
(
abbr
=
'BoolQ'
,
type
=
BoolQDatasetV2
,
path
=
'opencompass/boolq'
,
reader_cfg
=
BoolQ_reader_cfg
,
infer_cfg
=
BoolQ_infer_cfg
,
eval_cfg
=
BoolQ_eval_cfg
,
)
]
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_few_shot_gen_ba58ea.py
0 → 100644
View file @
be3dfa50
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
,
FixKRetriever
from
opencompass.openicl.icl_inferencer
import
GenInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
BoolQDatasetV2
from
opencompass.utils.text_postprocessors
import
first_capital_postprocess
BoolQ_reader_cfg
=
dict
(
input_columns
=
[
'question'
,
'passage'
],
output_column
=
'label'
,
)
BoolQ_infer_cfg
=
dict
(
ice_template
=
dict
(
type
=
PromptTemplate
,
template
=
dict
(
begin
=
'</E>'
,
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{passage}
\n
Question: {question}
\n
A. Yes
\n
B. No
\n
Answer:'
,
),
dict
(
role
=
'BOT'
,
prompt
=
'{label}'
),
],
),
ice_token
=
'</E>'
,
),
retriever
=
dict
(
type
=
FixKRetriever
,
fix_id_list
=
[
0
,
2
,
4
,
6
,
8
]),
inferencer
=
dict
(
type
=
GenInferencer
,
max_out_len
=
50
),
)
BoolQ_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
),
pred_role
=
'BOT'
,
pred_postprocessor
=
dict
(
type
=
first_capital_postprocess
),
)
BoolQ_datasets
=
[
dict
(
abbr
=
'BoolQ'
,
type
=
BoolQDatasetV2
,
path
=
'opencompass/boolq'
,
reader_cfg
=
BoolQ_reader_cfg
,
infer_cfg
=
BoolQ_infer_cfg
,
eval_cfg
=
BoolQ_eval_cfg
,
)
]
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_few_shot_ppl.py
0 → 100644
View file @
be3dfa50
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
,
FixKRetriever
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
BoolQDatasetV2
from
opencompass.openicl.icl_inferencer
import
PPLInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
BoolQ_reader_cfg
=
dict
(
input_columns
=
[
'question'
,
'passage'
],
output_column
=
'label'
,
)
BoolQ_infer_cfg
=
dict
(
ice_template
=
dict
(
type
=
PromptTemplate
,
template
=
{
'B'
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{passage}
\n
Question: {question}?'
),
dict
(
role
=
'BOT'
,
prompt
=
'No'
),
]
),
'A'
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{passage}
\n
Question: {question}?'
),
dict
(
role
=
'BOT'
,
prompt
=
'Yes'
),
]
),
},
ice_token
=
'</E>'
,
),
retriever
=
dict
(
type
=
FixKRetriever
,
fix_id_list
=
[
0
,
2
,
4
,
6
,
8
]),
inferencer
=
dict
(
type
=
PPLInferencer
,
max_out_len
=
50
),
)
BoolQ_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
))
BoolQ_datasets
=
[
dict
(
abbr
=
'BoolQ'
,
type
=
BoolQDatasetV2
,
path
=
'opencompass/boolq'
,
reader_cfg
=
BoolQ_reader_cfg
,
infer_cfg
=
BoolQ_infer_cfg
,
eval_cfg
=
BoolQ_eval_cfg
,
)
]
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_gen.py
0 → 100644
View file @
be3dfa50
from
mmengine.config
import
read_base
with
read_base
():
from
.SuperGLUE_BoolQ_gen_883d50
import
BoolQ_datasets
# noqa: F401, F403
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_gen_883d50.py
0 → 100644
View file @
be3dfa50
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
BoolQDatasetV2
from
opencompass.utils.text_postprocessors
import
first_capital_postprocess
BoolQ_reader_cfg
=
dict
(
input_columns
=
[
'question'
,
'passage'
],
output_column
=
'label'
,
)
BoolQ_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{passage}
\n
Question: {question}
\n
A. Yes
\n
B. No
\n
Answer:'
),
]),
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
GenInferencer
),
)
BoolQ_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
),
pred_role
=
'BOT'
,
pred_postprocessor
=
dict
(
type
=
first_capital_postprocess
),
)
BoolQ_datasets
=
[
dict
(
abbr
=
'BoolQ'
,
type
=
BoolQDatasetV2
,
path
=
'opencompass/boolq'
,
reader_cfg
=
BoolQ_reader_cfg
,
infer_cfg
=
BoolQ_infer_cfg
,
eval_cfg
=
BoolQ_eval_cfg
,
)
]
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl.py
0 → 100644
View file @
be3dfa50
from
mmengine.config
import
read_base
with
read_base
():
from
.SuperGLUE_BoolQ_ppl_314b96
import
BoolQ_datasets
# noqa: F401, F403
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_16b1d9.py
0 → 100644
View file @
be3dfa50
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
from
opencompass.openicl.icl_inferencer
import
PPLInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
BoolQDatasetV2
BoolQ_reader_cfg
=
dict
(
input_columns
=
[
'question'
,
'passage'
],
output_column
=
'label'
,
)
BoolQ_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
{
'A'
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{passage}
\n
Question: {question}?'
),
dict
(
role
=
'BOT'
,
prompt
=
'Yes'
),
]),
'B'
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{passage}
\n
Question: {question}?'
),
dict
(
role
=
'BOT'
,
prompt
=
'No'
),
]),
},
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
PPLInferencer
),
)
BoolQ_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
))
BoolQ_datasets
=
[
dict
(
abbr
=
'BoolQ'
,
type
=
BoolQDatasetV2
,
path
=
'opencompass/boolq'
,
reader_cfg
=
BoolQ_reader_cfg
,
infer_cfg
=
BoolQ_infer_cfg
,
eval_cfg
=
BoolQ_eval_cfg
,
)
]
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_314797.py
0 → 100644
View file @
be3dfa50
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
from
opencompass.openicl.icl_inferencer
import
PPLInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
BoolQDatasetV3
BoolQ_reader_cfg
=
dict
(
input_columns
=
[
'question'
,
'passage'
],
output_column
=
'label'
,
test_split
=
'train'
)
BoolQ_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
{
'false'
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'Passage: {passage}
\n
Question: {question}?'
),
dict
(
role
=
'BOT'
,
prompt
=
'Answer: No'
),
]),
'true'
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'Passage: {passage}
\n
Question: {question}?'
),
dict
(
role
=
'BOT'
,
prompt
=
'Answer: Yes'
),
]),
},
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
PPLInferencer
),
)
BoolQ_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
))
BoolQ_datasets
=
[
dict
(
abbr
=
'BoolQ'
,
type
=
BoolQDatasetV3
,
path
=
'opencompass/boolq'
,
reader_cfg
=
BoolQ_reader_cfg
,
infer_cfg
=
BoolQ_infer_cfg
,
eval_cfg
=
BoolQ_eval_cfg
,
)
]
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_314b96.py
0 → 100644
View file @
be3dfa50
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
from
opencompass.openicl.icl_inferencer
import
PPLInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
BoolQDataset
BoolQ_reader_cfg
=
dict
(
input_columns
=
[
'question'
,
'passage'
],
output_column
=
'answer'
,
test_split
=
'train'
)
BoolQ_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
{
0
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{passage}
\n
Question: {question}?'
),
dict
(
role
=
'BOT'
,
prompt
=
'No'
),
]),
1
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{passage}
\n
Question: {question}?'
),
dict
(
role
=
'BOT'
,
prompt
=
'Yes'
),
]),
},
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
PPLInferencer
),
)
BoolQ_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
))
BoolQ_datasets
=
[
dict
(
type
=
BoolQDataset
,
abbr
=
'BoolQ'
,
path
=
'json'
,
data_files
=
'opencompass/boolq'
,
split
=
'train'
,
reader_cfg
=
BoolQ_reader_cfg
,
infer_cfg
=
BoolQ_infer_cfg
,
eval_cfg
=
BoolQ_eval_cfg
,
)
]
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_4da4db.py
0 → 100644
View file @
be3dfa50
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
from
opencompass.openicl.icl_inferencer
import
PPLInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
BoolQDataset
BoolQ_reader_cfg
=
dict
(
input_columns
=
[
'question'
,
'passage'
],
output_column
=
'answer'
,
test_split
=
'train'
)
BoolQ_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
{
0
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{passage}
\n
Question: {question}'
),
dict
(
role
=
'BOT'
,
prompt
=
'No.'
),
]),
1
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{passage}
\n
Question: {question}'
),
dict
(
role
=
'BOT'
,
prompt
=
'Yes.'
),
]),
},
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
PPLInferencer
),
)
BoolQ_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
))
BoolQ_datasets
=
[
dict
(
type
=
BoolQDataset
,
abbr
=
'BoolQ'
,
path
=
'json'
,
data_files
=
'opencompass/boolq'
,
split
=
'train'
,
reader_cfg
=
BoolQ_reader_cfg
,
infer_cfg
=
BoolQ_infer_cfg
,
eval_cfg
=
BoolQ_eval_cfg
,
)
]
opencompass/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_9619db.py
0 → 100644
View file @
be3dfa50
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
from
opencompass.openicl.icl_inferencer
import
PPLInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
BoolQDataset
BoolQ_reader_cfg
=
dict
(
input_columns
=
[
'question'
,
'passage'
],
output_column
=
'answer'
,
test_split
=
'train'
)
BoolQ_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
{
0
:
'Passage:{passage}。
\n
Question:{question}。
\n
Answer: No.'
,
1
:
'Passage:{passage}。
\n
Question:{question}。
\n
Answer: Yes.'
,
}),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
PPLInferencer
))
BoolQ_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
))
BoolQ_datasets
=
[
dict
(
type
=
BoolQDataset
,
abbr
=
'BoolQ'
,
path
=
'json'
,
data_files
=
'opencompass/boolq'
,
split
=
'train'
,
reader_cfg
=
BoolQ_reader_cfg
,
infer_cfg
=
BoolQ_infer_cfg
,
eval_cfg
=
BoolQ_eval_cfg
)
]
opencompass/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_gen.py
0 → 100644
View file @
be3dfa50
from
mmengine.config
import
read_base
with
read_base
():
from
.SuperGLUE_CB_gen_854c6c
import
CB_datasets
# noqa: F401, F403
opencompass/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_gen_854c6c.py
0 → 100644
View file @
be3dfa50
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
CBDatasetV2
from
opencompass.utils.text_postprocessors
import
first_option_postprocess
CB_reader_cfg
=
dict
(
input_columns
=
[
'premise'
,
'hypothesis'
],
output_column
=
'label'
,
)
CB_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{premise}
\n
{hypothesis}
\n
What is the relation between the two sentences?
\n
A. Contradiction
\n
B. Entailment
\n
C. Neutral
\n
Answer:'
),
],
),
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
GenInferencer
),
)
CB_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
),
pred_role
=
'BOT'
,
pred_postprocessor
=
dict
(
type
=
first_option_postprocess
,
options
=
'ABC'
),
)
CB_datasets
=
[
dict
(
abbr
=
'CB'
,
type
=
CBDatasetV2
,
path
=
'./data/SuperGLUE/CB/val.jsonl'
,
reader_cfg
=
CB_reader_cfg
,
infer_cfg
=
CB_infer_cfg
,
eval_cfg
=
CB_eval_cfg
,
)
]
opencompass/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl.py
0 → 100644
View file @
be3dfa50
from
mmengine.config
import
read_base
with
read_base
():
from
.SuperGLUE_CB_ppl_0143fe
import
CB_datasets
# noqa: F401, F403
opencompass/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl_0143fe.py
0 → 100644
View file @
be3dfa50
from
opencompass.openicl.icl_prompt_template
import
PromptTemplate
from
opencompass.openicl.icl_retriever
import
ZeroRetriever
from
opencompass.openicl.icl_inferencer
import
PPLInferencer
from
opencompass.openicl.icl_evaluator
import
AccEvaluator
from
opencompass.datasets
import
HFDataset
CB_reader_cfg
=
dict
(
input_columns
=
[
'premise'
,
'hypothesis'
],
output_column
=
'label'
,
)
CB_infer_cfg
=
dict
(
prompt_template
=
dict
(
type
=
PromptTemplate
,
template
=
{
'contradiction'
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{premise}
\n
{hypothesis}
\n
What is the relation between the two sentences?'
),
dict
(
role
=
'BOT'
,
prompt
=
'Contradiction'
),
]),
'entailment'
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{premise}
\n
{hypothesis}
\n
What is the relation between the two sentences?'
),
dict
(
role
=
'BOT'
,
prompt
=
'Entailment'
),
]),
'neutral'
:
dict
(
round
=
[
dict
(
role
=
'HUMAN'
,
prompt
=
'{premise}
\n
{hypothesis}
\n
What is the relation between the two sentences?'
),
dict
(
role
=
'BOT'
,
prompt
=
'Neutral'
),
]),
},
),
retriever
=
dict
(
type
=
ZeroRetriever
),
inferencer
=
dict
(
type
=
PPLInferencer
),
)
CB_eval_cfg
=
dict
(
evaluator
=
dict
(
type
=
AccEvaluator
),
)
CB_datasets
=
[
dict
(
type
=
HFDataset
,
abbr
=
'CB'
,
path
=
'json'
,
split
=
'train'
,
data_files
=
'./data/SuperGLUE/CB/val.jsonl'
,
reader_cfg
=
CB_reader_cfg
,
infer_cfg
=
CB_infer_cfg
,
eval_cfg
=
CB_eval_cfg
,
)
]
Prev
1
…
20
21
22
23
24
25
26
27
28
…
41
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