@@ -754,6 +754,27 @@ def __init__(self, tokenizer, dataset_path="ai2_arc", dataset_name="ARC-Challeng
754
754
)
755
755
756
756
757
+ class BasicArithmetic (ArcEasy ):
758
+ """This is a basic arithmetic task follows the same prompt format as ArcEasy.
759
+ Example:
760
+ {"id": "q85_1d1d_max1d_plus",
761
+ "question": "Calculate 2 + 5 =",
762
+ "choices": {"text": ["8", "7", "6", "17"],
763
+ "label": ["A", "B", "C", "D"]},
764
+ "answerKey": "B", "type_tag": "easy"}
765
+
766
+ """
767
+
768
+ metric_type = "acc"
769
+
770
+ def __init__ (self , tokenizer , dataset_path = "allenai/basic_arithmetic" , dataset_name = None ):
771
+ super ().__init__ (
772
+ tokenizer = tokenizer ,
773
+ dataset_path = dataset_path ,
774
+ dataset_name = dataset_name ,
775
+ )
776
+
777
+
757
778
class COPA (ICLMultiChoiceTaskDataset ):
758
779
"""Prompt: "PREMISE.strip()[:-1] because/therefore"
759
780
Req_loglikelihood('The pair of students came under scrutiny by the teacher because', ' the students both received excellent grades.'
@@ -1155,6 +1176,7 @@ def doc_to_domain_conditional(self, doc):
1155
1176
"sciq" : SciQ ,
1156
1177
"arc_easy" : ArcEasy ,
1157
1178
"arc_challenge" : ArcChallenge ,
1179
+ "basic_arithmetic" : BasicArithmetic ,
1158
1180
"copa" : COPA ,
1159
1181
"rte" : RTE ,
1160
1182
"commitment_bank" : CommitmentBank ,
0 commit comments