File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
flexeval/preset_configs/EvalSetup/en_multiple_choice Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ The PIQA dataset introduces the task of physical commonsense reasoning and a corresponding benchmark dataset
3
+
4
+ References:
5
+
6
+ * [Hugging Face Dataset](https://huggingface.co/datasets/ybisk/piqa)
7
+ * [PIQA: Reasoning about Physical Commonsense in Natural Language](https://ojs.aaai.org/index.php/AAAI/article/view/6239)
8
+ */
9
+
10
+ local dataset_base_args = {
11
+ path: 'ybisk/piqa' ,
12
+ choices_templates: ['{{ sol1 }}' , '{{ sol2 }}' ],
13
+ answer_index_template: '{{ label }}' ,
14
+ whitespace_before_choices: true ,
15
+ dataset_kwargs: { trust_remote_code: true },
16
+ };
17
+
18
+ {
19
+ class_path: 'MultipleChoice' ,
20
+ init_args: {
21
+ eval_dataset: {
22
+ class_path: 'HFMultipleChoiceDataset' ,
23
+ init_args: dataset_base_args { split: 'validation' },
24
+ },
25
+ few_shot_generator: {
26
+ class_path: 'RandomFewShotGenerator' ,
27
+ init_args: {
28
+ dataset: {
29
+ class_path: 'HFMultipleChoiceDataset' ,
30
+ init_args: dataset_base_args { split: 'train' },
31
+ },
32
+ num_shots: 4 ,
33
+ },
34
+ },
35
+ prompt_template: {
36
+ class_path: 'Jinja2PromptTemplate' ,
37
+ init_args: {
38
+ template: |||
39
+ {% for item in few_shot_data %}
40
+ {{ item.goal }}{{ item.choices[item.answer_index] }}
41
+ {% endfor %}
42
+ ||| + '{{ goal }}' ,
43
+ },
44
+ },
45
+ },
46
+ }
You can’t perform that action at this time.
0 commit comments