Skip to content

Commit 87ffa71

Browse files
authoredSep 6, 2024··
[Feature] Longbench dataset update
1 parent 928d0cf commit 87ffa71

File tree

64 files changed

+730
-437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+730
-437
lines changed
 

‎configs/datasets/longbench/longbench2wikimqa/longbench_2wikimqa_gen_6b3efc.py

+13-8
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,37 @@
77
input_columns=['context', 'input'],
88
output_column='answers',
99
train_split='test',
10-
test_split='test'
10+
test_split='test',
1111
)
1212

1313
LongBench_2wikimqa_infer_cfg = dict(
1414
prompt_template=dict(
1515
type=PromptTemplate,
1616
template=dict(
1717
round=[
18-
dict(role='HUMAN', prompt='Answer the question based on the given passages. Only give me the answer and do not output any other words.\n\nThe following are given passages.\n{context}\n\nAnswer the question based on the given passages. Only give me the answer and do not output any other words.\n\nQuestion: {input}\nAnswer:'),
19-
], )),
18+
dict(
19+
role='HUMAN',
20+
prompt='Answer the question based on the given passages. Only give me the answer and do not output any other words.\n\nThe following are given passages.\n{context}\n\nAnswer the question based on the given passages. Only give me the answer and do not output any other words.\n\nQuestion: {input}\nAnswer:',
21+
),
22+
],
23+
),
24+
),
2025
retriever=dict(type=ZeroRetriever),
21-
inferencer=dict(type=GenInferencer, max_out_len=32)
26+
inferencer=dict(type=GenInferencer, max_out_len=32),
2227
)
2328

2429
LongBench_2wikimqa_eval_cfg = dict(
25-
evaluator=dict(type=LongBenchF1Evaluator),
26-
pred_role='BOT'
30+
evaluator=dict(type=LongBenchF1Evaluator), pred_role='BOT'
2731
)
2832

2933
LongBench_2wikimqa_datasets = [
3034
dict(
3135
type=LongBench2wikimqaDataset,
3236
abbr='LongBench_2wikimqa',
33-
path='THUDM/LongBench',
37+
path='opencompass/Longbench',
3438
name='2wikimqa',
3539
reader_cfg=LongBench_2wikimqa_reader_cfg,
3640
infer_cfg=LongBench_2wikimqa_infer_cfg,
37-
eval_cfg=LongBench_2wikimqa_eval_cfg)
41+
eval_cfg=LongBench_2wikimqa_eval_cfg,
42+
)
3843
]

‎configs/datasets/longbench/longbenchdureader/longbench_dureader_gen_c6c7e4.py

+13-8
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,37 @@
77
input_columns=['context', 'input'],
88
output_column='answers',
99
train_split='test',
10-
test_split='test'
10+
test_split='test',
1111
)
1212

1313
LongBench_dureader_infer_cfg = dict(
1414
prompt_template=dict(
1515
type=PromptTemplate,
1616
template=dict(
1717
round=[
18-
dict(role='HUMAN', prompt='请基于给定的文章回答下述问题。\n\n文章:{context}\n\n请基于上述文章回答下面的问题。\n\n问题:{input}\n回答:'),
19-
], )),
18+
dict(
19+
role='HUMAN',
20+
prompt='请基于给定的文章回答下述问题。\n\n文章:{context}\n\n请基于上述文章回答下面的问题。\n\n问题:{input}\n回答:',
21+
),
22+
],
23+
),
24+
),
2025
retriever=dict(type=ZeroRetriever),
21-
inferencer=dict(type=GenInferencer, max_out_len=128)
26+
inferencer=dict(type=GenInferencer, max_out_len=128),
2227
)
2328

2429
LongBench_dureader_eval_cfg = dict(
25-
evaluator=dict(type=LongBenchRougeEvaluator, language='zh'),
26-
pred_role='BOT'
30+
evaluator=dict(type=LongBenchRougeEvaluator, language='zh'), pred_role='BOT'
2731
)
2832

2933
LongBench_dureader_datasets = [
3034
dict(
3135
type=LongBenchdureaderDataset,
3236
abbr='LongBench_dureader',
33-
path='THUDM/LongBench',
37+
path='opencompass/Longbench',
3438
name='dureader',
3539
reader_cfg=LongBench_dureader_reader_cfg,
3640
infer_cfg=LongBench_dureader_infer_cfg,
37-
eval_cfg=LongBench_dureader_eval_cfg)
41+
eval_cfg=LongBench_dureader_eval_cfg,
42+
)
3843
]

0 commit comments

Comments
 (0)
Please sign in to comment.