applied-ai-018 commited on
Commit
3b78da7
·
verified ·
1 Parent(s): 1eb6f0d

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. lm-evaluation/lm_eval/tasks/bbh/README.md +49 -0
  2. lm-evaluation/lm_eval/tasks/bbh/cot_fewshot/logical_deduction_seven_objects.yaml +5 -0
  3. lm-evaluation/lm_eval/tasks/bbh/cot_fewshot/multistep_arithmetic_two.yaml +5 -0
  4. lm-evaluation/lm_eval/tasks/bbh/cot_fewshot/salient_translation_error_detection.yaml +5 -0
  5. lm-evaluation/lm_eval/tasks/bbh/cot_fewshot/temporal_sequences.yaml +5 -0
  6. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/_cot_zeroshot_template_yaml +27 -0
  7. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/boolean_expressions.yaml +18 -0
  8. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/causal_judgement.yaml +18 -0
  9. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/date_understanding.yaml +20 -0
  10. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/disambiguation_qa.yaml +20 -0
  11. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/dyck_languages.yaml +17 -0
  12. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/formal_fallacies.yaml +18 -0
  13. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/geometric_shapes.yaml +20 -0
  14. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/hyperbaton.yaml +20 -0
  15. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/movie_recommendation.yaml +19 -0
  16. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/multistep_arithmetic_two.yaml +18 -0
  17. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/object_counting.yaml +17 -0
  18. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/reasoning_about_colored_objects.yaml +19 -0
  19. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/ruin_names.yaml +19 -0
  20. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/salient_translation_error_detection.yaml +19 -0
  21. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/sports_understanding.yaml +21 -0
  22. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/temporal_sequences.yaml +19 -0
  23. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/tracking_shuffled_objects_five_objects.yaml +19 -0
  24. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/tracking_shuffled_objects_seven_objects.yaml +19 -0
  25. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/tracking_shuffled_objects_three_objects.yaml +19 -0
  26. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/utils.py +224 -0
  27. lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/web_of_lies.yaml +20 -0
  28. lm-evaluation/lm_eval/tasks/bbh/fewshot/_fewshot_template_yaml +22 -0
  29. lm-evaluation/lm_eval/tasks/bbh/fewshot/boolean_expressions.yaml +5 -0
  30. lm-evaluation/lm_eval/tasks/bbh/fewshot/causal_judgement.yaml +5 -0
  31. lm-evaluation/lm_eval/tasks/bbh/fewshot/date_understanding.yaml +5 -0
  32. lm-evaluation/lm_eval/tasks/bbh/fewshot/disambiguation_qa.yaml +5 -0
  33. lm-evaluation/lm_eval/tasks/bbh/fewshot/dyck_languages.yaml +5 -0
  34. lm-evaluation/lm_eval/tasks/bbh/fewshot/formal_fallacies.yaml +5 -0
  35. lm-evaluation/lm_eval/tasks/bbh/fewshot/geometric_shapes.yaml +5 -0
  36. lm-evaluation/lm_eval/tasks/bbh/fewshot/hyperbaton.yaml +5 -0
  37. lm-evaluation/lm_eval/tasks/bbh/fewshot/logical_deduction_five_objects.yaml +5 -0
  38. lm-evaluation/lm_eval/tasks/bbh/fewshot/logical_deduction_seven_objects.yaml +5 -0
  39. lm-evaluation/lm_eval/tasks/bbh/fewshot/logical_deduction_three_objects.yaml +5 -0
  40. lm-evaluation/lm_eval/tasks/bbh/fewshot/movie_recommendation.yaml +5 -0
  41. lm-evaluation/lm_eval/tasks/bbh/fewshot/multistep_arithmetic_two.yaml +5 -0
  42. lm-evaluation/lm_eval/tasks/bbh/fewshot/navigate.yaml +5 -0
  43. lm-evaluation/lm_eval/tasks/bbh/fewshot/object_counting.yaml +5 -0
  44. lm-evaluation/lm_eval/tasks/bbh/fewshot/penguins_in_a_table.yaml +5 -0
  45. lm-evaluation/lm_eval/tasks/bbh/fewshot/reasoning_about_colored_objects.yaml +5 -0
  46. lm-evaluation/lm_eval/tasks/bbh/fewshot/ruin_names.yaml +5 -0
  47. lm-evaluation/lm_eval/tasks/bbh/fewshot/salient_translation_error_detection.yaml +5 -0
  48. lm-evaluation/lm_eval/tasks/bbh/fewshot/snarks.yaml +5 -0
  49. lm-evaluation/lm_eval/tasks/bbh/fewshot/sports_understanding.yaml +5 -0
  50. lm-evaluation/lm_eval/tasks/bbh/fewshot/temporal_sequences.yaml +5 -0
lm-evaluation/lm_eval/tasks/bbh/README.md ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BigBenchHard
2
+
3
+ ## Paper
4
+ Title: `Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them`
5
+ Abstract: https://arxiv.org/abs/2210.09261
6
+
7
+ A suite of 23 challenging BIG-Bench tasks which we call BIG-Bench Hard (BBH).
8
+ These are the task for which prior language model evaluations did not outperform
9
+ the average human-rater.
10
+
11
+ Homepage: https://github.com/suzgunmirac/BIG-Bench-Hard
12
+
13
+
14
+ ## Citation
15
+ ```
16
+ @article{suzgun2022challenging,
17
+ title={Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them},
18
+ author={Suzgun, Mirac and Scales, Nathan and Sch{\"a}rli, Nathanael and Gehrmann, Sebastian and Tay, Yi and Chung, Hyung Won and Chowdhery, Aakanksha and Le, Quoc V and Chi, Ed H and Zhou, Denny and and Wei, Jason},
19
+ journal={arXiv preprint arXiv:2210.09261},
20
+ year={2022}
21
+ }
22
+ ```
23
+
24
+ ### Groups and Tasks
25
+
26
+ #### Groups
27
+
28
+ - `bbh_zeroshot`
29
+ - `bbh_fewshot`
30
+ - `bbh_cot_fewshot`
31
+ - `bbh_cot_zeroshot`
32
+
33
+
34
+ #### Tasks
35
+
36
+ - ...
37
+
38
+ ### Checklist
39
+
40
+ - [x] Is in Eval-harness v1.0 ?
41
+ - [ ] Has been checked for regression from v1.0?
42
+ - [ ] Has been checked for equivalence with original paper methodology?
43
+ - [ ] "Main" checked variant clearly denoted?
44
+
45
+ ### Variant Wishlist
46
+
47
+ - [ ] Variant with Calculator (see https://github.com/openai/grade-school-math/blob/master/grade_school_math/calculator.py for example implementation)
48
+ - [ ] Using Verifiers
49
+ - [ ] Majority voting "without CoT"
lm-evaluation/lm_eval/tasks/bbh/cot_fewshot/logical_deduction_seven_objects.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "logical_deduction_seven_objects"
2
+ "description": "A logical deduction task which requires deducing the order of a sequence of objects.\n\n"
3
+ "doc_to_text": "Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished above Amy. Eli finished below Amy.\nOptions:\n(A) Amy finished last\n(B) Eli finished last\n(C) Eve finished last\nA: Let's think step by step.\n(1) Eve finished above Amy: \"(above) ? Eve ? Amy ? (below)\".\n(2) Eli finished below Amy: \"(above) ? Amy ? Eli ? (below)\".\n(3) Combining (1) and (2) we get the following ordering: \"(above) Eve Amy Eli (below)\".\nAccording to this ordering, the person who finished last (the one at the bottom of this list) is Eli.\nEli finished last. So the answer is (B).\n\nQ: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a white book, a green book, and an orange book. The green book is to the right of the white book. The orange book is the rightmost.\nOptions:\n(A) The white book is the leftmost\n(B) The green book is the leftmost\n(C) The orange book is the leftmost\nA: Let's think step by step.\n(1) The green book is to the right of the white book: \"(left) ? white ? green ? (right)\".\n(2) The orange book is the rightmost: \"(left) ? white ? green orange (right)\".\n(3) Combining (1) and (2) we get the following ordering: \"(left) white green orange (right)\".\nAccording to this ordering, the leftmost book is the white book.\nThe white book is the leftmost. So the answer is (A).\n\nQ: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a red book, a gray book, and a white book. The white book is to the left of the gray book. The red book is the second from the left.\nOptions:\n(A) The red book is the leftmost\n(B) The gray book is the leftmost\n(C) The white book is the leftmost\nA: Let's think step by step.\n(1) The white book is to the left of the gray book: \"(left) ? white ? gray ? (right)\".\n(2) The red book is the second from the left: \"(left) ? white red gray ? (right)\".\n(3) Combining (1) and (2) we get the following ordering: \"(left) white red gray (right)\".\nAccording to this ordering, the leftmost book is the white book.\nThe white book is the leftmost. So the answer is (C).\n\nQ: {{input}}\nA: Let's think step by step.\n"
4
+ "include": "_cot_fewshot_template_yaml"
5
+ "task": "bbh_cot_fewshot_logical_deduction_seven_objects"
lm-evaluation/lm_eval/tasks/bbh/cot_fewshot/multistep_arithmetic_two.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "multistep_arithmetic_two"
2
+ "description": "Solve multi-step arithmetic problems.\n\n"
3
+ "doc_to_text": "Q: ((-5 + 9 * -4 - 0) * (4 + -7 + 0 * -5)) =\nA: Let's think step by step.\nLet\u2019s recall that the order of operations in mathematics is as follows: (1) Parentheses, (2) exponents, (3) multiplication and division (from left to right), (4) addition and multiplication (from left to right). So, remember to always compute the expressions inside parentheses or brackets first.\nThis equation can be written as \"A * B\", where A = (-5 + 9 * -4 - 0) and B = (4 + -7 + 0 * -5).\nLet's calculate A = (-5 + 9 * -4 - 0) = (-5 + (9 * -4) - 0) = (-5 + (-36) - 0) = (-5 + -36 - 0) = -5 - 36 = -41.\nLet's calculate B = (4 + -7 + 0 * -5) = (4 + -7 + (0 * -5)) = (4 + -7 + 0) = (4 + -7) = (4 - 7) = -3.\nThen, the final equation is A * B = -41 * -3 = (-61) * (-3) = 123. So the answer is 123.\n\nQ: ((-9 * 7 * 7 * -9) + (4 * -9 - 8 - -4)) =\nA: Let's think step by step.\nLet\u2019s recall that the order of operations in mathematics is as follows: (1) Parentheses, (2) exponents, (3) multiplication and division (from left to right), (4) addition and multiplication (from left to right). So, remember to always compute the expressions inside parentheses or brackets first.\nThis equation can be written as \"A + B\", where A = (-9 * 7 * 7 * -9) and B = (4 * -9 - 8 - -4).\nLet's calculate A = (-9 * 7 * 7 * -9) = ((-9 * 7) * (7 * -9)) = ((-63) * (-63)) = 3969.\nLet's calculate B = (4 * -9 - 8 - (-4)) = ((4 * -9) - 8 - (-4)) = ((-36) - 8 - (-4)) = ((-36 - 8) - (-4)) = (-44 - (-4)) = -40.\nThen, the final equation is A + B = 3969 + -40 = 3969 - 40 = 3929. So the answer is 3929.\n\nQ: ((-3 + 5 * 8 * -4) - (9 - 8 * -7 + -9)) =\nA: Let's think step by step.\nLet\u2019s recall that the order of operations in mathematics is as follows: (1) Parentheses, (2) exponents, (3) multiplication and division (from left to right), (4) addition and multiplication (from left to right). So, remember to always compute the expressions inside parentheses or brackets first.\nThis equation can be written as \"A - B\", where A = (-3 + 5 * 8 * -4) and B = (9 - 8 * -7 + -9).\nLet's calculate A = (-3 + 5 * 8 * -4) = (-3 + (5 * 8) * -4) = (-3 + (40) * -4) = (-3 + (40 * -4)) = (-3 + -160) = -163.\nLet's calculate B = (9 - 8 * -7 + -9) = (9 - (8 * -7) + -9) = (9 - (-56) + -9) = ((9 - (-56)) + -9) = ((65) + -9)= (65 - 9) = 56.\nThen, the final equation is A - B = -163 - 56 = -219. So the answer is -219.\n\nQ: {{input}}\nA: Let's think step by step.\n"
4
+ "include": "_cot_fewshot_template_yaml"
5
+ "task": "bbh_cot_fewshot_multistep_arithmetic_two"
lm-evaluation/lm_eval/tasks/bbh/cot_fewshot/salient_translation_error_detection.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "salient_translation_error_detection"
2
+ "description": "Detect the type of error in an English translation of a German source sentence.\n\n"
3
+ "doc_to_text": "Q: The following translations from German to English contain a particular error. That error will be one of the following types: Named Entities: An entity (names, places, locations, etc.) is changed to a different entity. Numerical Values: Numerical values (ordinals or cardinals), dates, and/or units are changed. Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are changed. Negation or Antonyms: Introduce or remove a negation or change comparatives to their antonyms. Facts: Trivial factual errors not pertaining to the above classes are introduced in the translations. Dropped Content: A significant clause in the translation is removed. Please identify that error. Source: In der Liste der Baudenkmale in Lenzen (Elbe) sind alle Baudenkmale der brandenburgischen Stadt Lenzen (Elbe) und ihrer Ortsteile aufgelistet.\nTranslation: In the list of architectural monuments in Lenzen all architectural monuments of the Brandenburg city of Lenzen and its districts are listed.\nThe translation contains an error pertaining to\nOptions:\n(A) Modifiers or Adjectives\n(B) Numerical Values\n(C) Negation or Antonyms\n(D) Named Entities\n(E) Dropped Content\n(F) Facts\nA: Let's think step by step.\nWe solve this question by first translating the source sentence to English and then by comparing our translation with the provided translation. According to Google Translate, the correct translation of the source sentence from German to English is \"The list of monuments in Lenzen (Elbe) includes all the monuments in the Brandenburg town of Lenzen (Elbe) and its districts.\" On the other hand, the provided translation is \"In the list of architectural monuments in Lenzen all architectural monuments of the Brandenburg city of Lenzen and its districts are listed.\" Note that Lenzen (Elbe) is changed to Lenzen in the original translation; so, there is a named entity error. Because an entity in the original source sentence is changed to a different entity in the translation, the translation contains an error pertaining to Named Entities. So the answer is (D).\n\nQ: The following translations from German to English contain a particular error. That error will be one of the following types: Named Entities: An entity (names, places, locations, etc.) is changed to a different entity. Numerical Values: Numerical values (ordinals or cardinals), dates, and/or units are changed. Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are changed. Negation or Antonyms: Introduce or remove a negation or change comparatives to their antonyms. Facts: Trivial factual errors not pertaining to the above classes are introduced in the translations. Dropped Content: A significant clause in the translation is removed. Please identify that error. Source: Auf dieser Seite sind die Baudenkm\u00e4ler der oberbayerischen Gro\u00dfen Kreisstadt Landsberg am Lech zusammengestellt.\nTranslation: On this page are compiled the architectural monuments of the town of Landsberg am Lech.\nThe translation contains an error pertaining to\nOptions:\n(A) Modifiers or Adjectives\n(B) Numerical Values\n(C) Negation or Antonyms\n(D) Named Entities\n(E) Dropped Content\n(F) Facts\nA: Let's think step by step.\nWe solve this question by first translating the source sentence to English and then by comparing our translation with the provided translation. According to Google Translate, the correct translation of the source sentence from German to English is \"The monuments of the Upper Bavarian district town of Landsberg am Lech are compiled on this page.\" On the other hand, the provided translation is \"On this page are compiled the architectural monuments of the town of Landsberg am Lech.\" Note that an important detail about the location of Landsberg am Lech is omitted in the original translation: The translation should have said \"Upper Bavarian district town of Landsberg am Lech\". Because a significant clause in the translation was removed, the translation contains an error pertaining to Dropped Content. So the answer is (E).\n\nQ: The following translations from German to English contain a particular error. That error will be one of the following types: Named Entities: An entity (names, places, locations, etc.) is changed to a different entity. Numerical Values: Numerical values (ordinals or cardinals), dates, and/or units are changed. Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are changed. Negation or Antonyms: Introduce or remove a negation or change comparatives to their antonyms. Facts: Trivial factual errors not pertaining to the above classes are introduced in the translations. Dropped Content: A significant clause in the translation is removed. Please identify that error. Source: \u0141eba ist eine Kleinstadt und ein Badeort im Powiat L\u0119borski der polnischen Woiwodschaft Pommern.\nTranslation: Eba is not a small town and seaside resort in the Powiat L\u00e9borski county of the Pomeranian Voivodeship of Poland.\nThe translation contains an error pertaining to\nOptions:\n(A) Modifiers or Adjectives\n(B) Numerical Values\n(C) Negation or Antonyms\n(D) Named Entities\n(E) Dropped Content\n(F) Facts\nA: Let's think step by step.\nWe solve this question by first translating the source sentence to English and then by comparing our translation with the provided translation. According to Google Translate, the correct translation of the source sentence from German to English is \"\u0141eba is a small town and seaside resort in the Powiat L\u0119borski of the Polish Pomeranian Voivodeship.\" On the other hand, the provided translation is \"\u0141eba is not a small town and seaside resort in the Powiat L\u00e9borski county of the Pomeranian Voivodeship of Poland.\" Note that the provided sentence says, \"\u0141eba is not a small town ...\" However, the translation should have been \"\u0141eba is a small town ...\" Because a negation is introduced at the beginning of the sentence and has fundamentally changed the meaning of the original source, the translation contains an error pertaining to Negation or Antonyms. So the answer is (C).\n\nQ: {{input}}\nA: Let's think step by step.\n"
4
+ "include": "_cot_fewshot_template_yaml"
5
+ "task": "bbh_cot_fewshot_salient_translation_error_detection"
lm-evaluation/lm_eval/tasks/bbh/cot_fewshot/temporal_sequences.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "temporal_sequences"
2
+ "description": "Task description: Answer questions about which times certain events could have occurred.\n\n"
3
+ "doc_to_text": "Q: Today, Emily went to the museum. Between what times could they have gone?\nWe know that:\nEmily woke up at 1pm.\nElizabeth saw Emily reading at the library from 2pm to 4pm.\nJessica saw Emily watching a movie at the theater from 4pm to 5pm.\nLeslie saw Emily waiting at the airport from 5pm to 6pm.\nWilliam saw Emily buying clothes at the mall from 6pm to 7pm.\nThe museum was closed after 7pm.\nBetween what times could Emily have gone to the museum?\nOptions:\n(A) 1pm to 2pm\n(B) 6pm to 7pm\n(C) 5pm to 6pm\n(D) 2pm to 4pm\nA: Let's think step by step.\nWake-up time: 1pm.\n1pm-2pm: free.\n2pm-4pm: reading at the library.\n4pm-5pm: watching a movie at the theater.\n5pm-6pm: waiting at the airport.\n6pm-7pm: buying clothes at the mall.\nThe museum closure time: 7pm.\nThe only time when Emily could have gone to the museum was 1pm to 2pm. So the answer is (A).\n\nQ: Today, Elizabeth went to the amusement park. Between what times could they have gone?\nWe know that:\nElizabeth woke up at 7am.\nDavid saw Elizabeth fixing their computer at the electronic store from 1pm to 2pm.\nSarah saw Elizabeth playing tennis at the tennis court from 2pm to 3pm.\nSusan saw Elizabeth walking towards the Statue of Liberty from 3pm to 6pm.\nAndrew saw Elizabeth taking photos near the Eiffel Tower from 6pm to 9pm.\nEmily saw Elizabeth getting a coffee at the cafe from 9pm to 10pm.\nThe amusement park was closed after 10pm.\nBetween what times could Elizabeth have gone to the amusement park?\nOptions:\n(A) 7am to 1pm\n(B) 9pm to 10pm\n(C) 1pm to 2pm\n(D) 3pm to 6pm\nA: Let's think step by step.\nWake-up time: 7am.\n7am-1pm: free.\n1pm-2pm: fixing their computer at the electronic store.\n2pm-3pm: playing tennis at the tennis court.\n3pm-6pm: walking towards the Statue of Liberty.\n6pm-9pm: taking photos near the Eiffel Tower.\n9pm-10pm: getting a coffee at the cafe.\nThe amusement park closure time: 10pm.\nThe only time when Elizabeth could have gone to the amusement park was 7am to 1pm. So the answer is (A).\n\nQ: Today, Tiffany went to the beach. Between what times could they have gone?\nWe know that:\nTiffany woke up at 5am.\nBetty saw Tiffany getting a coffee at the cafe from 5am to 6am.\nJessica saw Tiffany working at the office from 6am to 9am.\nJohn saw Tiffany stretching at a yoga studio from 9am to 12pm.\nSean saw Tiffany sitting on a rooftop from 12pm to 2pm.\nSarah saw Tiffany playing tennis at the tennis court from 2pm to 3pm.\nThe beach was closed after 4pm.\nBetween what times could Tiffany have gone to the beach?\nOptions:\n(A) 9am to 12pm\n(B) 12pm to 2pm\n(C) 5am to 6am\n(D) 3pm to 4pm\nA: Let's think step by step.\nWake-up time: 5am.\n5am-6am: getting a coffee at the cafe.\n6am-9am: working at the office.\n9am-12pm: stretching at a yoga studio.\n12pm-2pm: sitting on a rooftop.\n2pm-3pm: playing tennis at the tennis court.\n3pm-4pm: free.\nThe beach closure time: 4pm.\nThe only time when Tiffany could have gone to the beach was 3pm to 4pm. So the answer is (D).\n\nQ: {{input}}\nA: Let's think step by step.\n"
4
+ "include": "_cot_fewshot_template_yaml"
5
+ "task": "bbh_cot_fewshot_temporal_sequences"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/_cot_zeroshot_template_yaml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ group: bbh_cot_zeroshot
2
+ dataset_path: lukaemon/bbh
3
+ output_type: generate_until
4
+ test_split: test
5
+ doc_to_target: "{{target}}"
6
+ metric_list:
7
+ - metric: exact_match
8
+ aggregation: mean
9
+ higher_is_better: true
10
+ ignore_case: true
11
+ # ignore_punctuation: true
12
+ regexes_to_ignore:
13
+ - "\\.$"
14
+ - ","
15
+ - "\\\\"
16
+ - "\n"
17
+ - '"'
18
+ generation_kwargs:
19
+ until:
20
+ - "</s>"
21
+ - "Q:"
22
+ - "<|im_end|>"
23
+ do_sample: false
24
+ temperature: 0.0
25
+ num_fewshot: 0
26
+ metadata:
27
+ version: 2.0
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/boolean_expressions.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "boolean_expressions"
2
+ "description": "Evaluate the result of a random Boolean expression.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_boolean_expressions"
6
+
7
+ filter_list:
8
+ - name: "flexible-extract"
9
+ filter:
10
+ - function: "regex"
11
+ group_select: -1
12
+ regex_pattern: "\\b(True|False)\\b"
13
+ - function: "take_first"
14
+ - name: "strict-match"
15
+ filter:
16
+ - function: "regex"
17
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
18
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/causal_judgement.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "causal_judgement"
2
+ "description": "Answer questions about causal attribution.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_causal_judgement"
6
+
7
+ filter_list:
8
+ - name: "flexible-extract"
9
+ filter:
10
+ - function: "regex"
11
+ group_select: -1
12
+ regex_pattern: "\\b(Yes|No|yes|no)\\b"
13
+ - function: "take_first"
14
+ - name: "strict-match"
15
+ filter:
16
+ - function: "regex"
17
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
18
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/date_understanding.yaml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "date_understanding"
2
+ "description": "Infer the date from context.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_date_understanding"
6
+
7
+ filter_list:
8
+ - name: "flexible-extract"
9
+ filter:
10
+ - function: !function utils.MultiChoiceRegexFilter
11
+ group_select: -1
12
+ ignore_case: true
13
+ ignore_punctuation: true
14
+ regex_pattern: "(\\([A-Z]\\))"
15
+ - function: "take_first"
16
+ - name: "strict-match"
17
+ filter:
18
+ - function: "regex"
19
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
20
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/disambiguation_qa.yaml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "disambiguation_qa"
2
+ "description": "Clarify the meaning of sentences with ambiguous pronouns.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_disambiguation_qa"
6
+
7
+ filter_list:
8
+ - name: "flexible-extract"
9
+ filter:
10
+ - function: !function utils.MultiChoiceRegexFilter
11
+ group_select: -1
12
+ ignore_case: true
13
+ ignore_punctuation: true
14
+ regex_pattern: "(\\([A-Z]\\))"
15
+ - function: "take_first"
16
+ - name: "strict-match"
17
+ filter:
18
+ - function: "regex"
19
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
20
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/dyck_languages.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "dyck_languages"
2
+ "description": "Correctly close a Dyck-n word.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_dyck_languages"
6
+ filter_list:
7
+ - name: "flexible-extract"
8
+ filter:
9
+ - function: "regex"
10
+ group_select: -1
11
+ regex_pattern: "(?<= )([\" \\[\\(<{}>\\)\\]]+)|([\" \\[\\(<{}>\\)\\]]+)"
12
+ - function: "take_first"
13
+ - name: "strict-match"
14
+ filter:
15
+ - function: "regex"
16
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
17
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/formal_fallacies.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "formal_fallacies"
2
+ "description": "Distinguish deductively valid arguments from formal fallacies.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_formal_fallacies"
6
+
7
+ filter_list:
8
+ - name: "flexible-extract"
9
+ filter:
10
+ - function: "regex"
11
+ group_select: -1
12
+ regex_pattern: "\\b(valid|invalid)\\b"
13
+ - function: "take_first"
14
+ - name: "strict-match"
15
+ filter:
16
+ - function: "regex"
17
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
18
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/geometric_shapes.yaml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "geometric_shapes"
2
+ "description": "Name geometric shapes from their SVG paths.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_geometric_shapes"
6
+
7
+ filter_list:
8
+ - name: "flexible-extract"
9
+ filter:
10
+ - function: !function utils.MultiChoiceRegexFilter
11
+ group_select: -1
12
+ ignore_case: true
13
+ ignore_punctuation: true
14
+ regex_pattern: "(\\([A-Z]\\))"
15
+ - function: "take_first"
16
+ - name: "strict-match"
17
+ filter:
18
+ - function: "regex"
19
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
20
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/hyperbaton.yaml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "hyperbaton"
2
+ "description": "Order adjectives correctly in English sentences.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_hyperbaton"
6
+
7
+ filter_list:
8
+ - name: "flexible-extract"
9
+ filter:
10
+ - function: !function utils.MultiChoiceRegexFilter
11
+ group_select: -1
12
+ ignore_case: true
13
+ ignore_punctuation: true
14
+ regex_pattern: "(\\([A-Z]\\))"
15
+ - function: "take_first"
16
+ - name: "strict-match"
17
+ filter:
18
+ - function: "regex"
19
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
20
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/movie_recommendation.yaml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "movie_recommendation"
2
+ "description": "Recommend movies similar to the given list of movies.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_movie_recommendation"
6
+ filter_list:
7
+ - name: "flexible-extract"
8
+ filter:
9
+ - function: !function utils.MultiChoiceRegexFilter
10
+ group_select: -1
11
+ ignore_case: true
12
+ ignore_punctuation: true
13
+ regex_pattern: "(\\([A-Z]\\))"
14
+ - function: "take_first"
15
+ - name: "strict-match"
16
+ filter:
17
+ - function: "regex"
18
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
19
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/multistep_arithmetic_two.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "multistep_arithmetic_two"
2
+ "description": "Solve multi-step arithmetic problems.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_multistep_arithmetic_two"
6
+
7
+ filter_list:
8
+ - name: "flexible-extract"
9
+ filter:
10
+ - function: !function utils.NumberParseRegexFilter
11
+ group_select: -1
12
+ regex_pattern: "([-0-9]+)"
13
+ - function: "take_first"
14
+ - name: "strict-match"
15
+ filter:
16
+ - function: "regex"
17
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
18
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/object_counting.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "object_counting"
2
+ "description": "Questions that involve enumerating objects and asking the model to count them.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_object_counting"
6
+ filter_list:
7
+ - name: "flexible-extract"
8
+ filter:
9
+ - function: !function utils.NumberParseRegexFilter
10
+ group_select: -1
11
+ regex_pattern: "([-0-9]+)"
12
+ - function: "take_first"
13
+ - name: "strict-match"
14
+ filter:
15
+ - function: "regex"
16
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
17
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/reasoning_about_colored_objects.yaml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "reasoning_about_colored_objects"
2
+ "description": "Answer extremely simple questions about the colors of objects on a surface.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_reasoning_about_colored_objects"
6
+ filter_list:
7
+ - name: "flexible-extract"
8
+ filter:
9
+ - function: !function utils.MultiChoiceRegexFilter
10
+ group_select: -1
11
+ ignore_case: true
12
+ ignore_punctuation: true
13
+ regex_pattern: "(\\([A-Z]\\))"
14
+ - function: "take_first"
15
+ - name: "strict-match"
16
+ filter:
17
+ - function: "regex"
18
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
19
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/ruin_names.yaml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "ruin_names"
2
+ "description": "Select the humorous edit that 'ruins' the input movie or musical artist name.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_ruin_names"
6
+ filter_list:
7
+ - name: "flexible-extract"
8
+ filter:
9
+ - function: !function utils.MultiChoiceRegexFilter
10
+ group_select: -1
11
+ ignore_case: true
12
+ ignore_punctuation: true
13
+ regex_pattern: "(\\([A-Z]\\))"
14
+ - function: "take_first"
15
+ - name: "strict-match"
16
+ filter:
17
+ - function: "regex"
18
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
19
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/salient_translation_error_detection.yaml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "salient_translation_error_detection"
2
+ "description": "Detect the type of error in an English translation of a German source sentence.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_salient_translation_error_detection"
6
+ filter_list:
7
+ - name: "flexible-extract"
8
+ filter:
9
+ - function: !function utils.MultiChoiceRegexFilter
10
+ group_select: -1
11
+ ignore_case: true
12
+ ignore_punctuation: true
13
+ regex_pattern: "(\\([A-Z]\\))"
14
+ - function: "take_first"
15
+ - name: "strict-match"
16
+ filter:
17
+ - function: "regex"
18
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
19
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/sports_understanding.yaml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "sports_understanding"
2
+ "description": "Determine whether an artificially constructed sentence relating to sports is plausible or not.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_sports_understanding"
6
+
7
+ filter_list:
8
+ - name: "flexible-extract"
9
+ filter:
10
+ - function: !function utils.MapRegexFilter
11
+ group_select: -1
12
+ ignore_case: true
13
+ regex_pattern_to_value:
14
+ \b(no|not plausible)\b: "no"
15
+ \b(yes|plausible)\b: "yes"
16
+ - function: "take_first"
17
+ - name: "strict-match"
18
+ filter:
19
+ - function: "regex"
20
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
21
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/temporal_sequences.yaml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "temporal_sequences"
2
+ "description": "Task description: Answer questions about which times certain events could have occurred.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_temporal_sequences"
6
+ filter_list:
7
+ - name: "flexible-extract"
8
+ filter:
9
+ - function: !function utils.MultiChoiceRegexFilter
10
+ group_select: -1
11
+ ignore_case: true
12
+ ignore_punctuation: true
13
+ regex_pattern: "(\\([A-Z]\\))"
14
+ - function: "take_first"
15
+ - name: "strict-match"
16
+ filter:
17
+ - function: "regex"
18
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
19
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/tracking_shuffled_objects_five_objects.yaml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "tracking_shuffled_objects_five_objects"
2
+ "description": "A task requiring determining the final positions of a set of objects given their initial positions and a description of a sequence of swaps.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_tracking_shuffled_objects_five_objects"
6
+ filter_list:
7
+ - name: "flexible-extract"
8
+ filter:
9
+ - function: !function utils.MultiChoiceRegexFilter
10
+ group_select: -1
11
+ ignore_case: true
12
+ ignore_punctuation: true
13
+ regex_pattern: "(\\([A-Z]\\))"
14
+ - function: "take_first"
15
+ - name: "strict-match"
16
+ filter:
17
+ - function: "regex"
18
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
19
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/tracking_shuffled_objects_seven_objects.yaml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "tracking_shuffled_objects_seven_objects"
2
+ "description": "A task requiring determining the final positions of a set of objects given their initial positions and a description of a sequence of swaps.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_tracking_shuffled_objects_seven_objects"
6
+ filter_list:
7
+ - name: "flexible-extract"
8
+ filter:
9
+ - function: !function utils.MultiChoiceRegexFilter
10
+ group_select: -1
11
+ ignore_case: true
12
+ ignore_punctuation: true
13
+ regex_pattern: "(\\([A-Z]\\))"
14
+ - function: "take_first"
15
+ - name: "strict-match"
16
+ filter:
17
+ - function: "regex"
18
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
19
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/tracking_shuffled_objects_three_objects.yaml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "tracking_shuffled_objects_three_objects"
2
+ "description": "A task requiring determining the final positions of a set of objects given their initial positions and a description of a sequence of swaps.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_tracking_shuffled_objects_three_objects"
6
+ filter_list:
7
+ - name: "flexible-extract"
8
+ filter:
9
+ - function: !function utils.MultiChoiceRegexFilter
10
+ group_select: -1
11
+ ignore_case: true
12
+ ignore_punctuation: true
13
+ regex_pattern: "(\\([A-Z]\\))"
14
+ - function: "take_first"
15
+ - name: "strict-match"
16
+ filter:
17
+ - function: "regex"
18
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
19
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/utils.py ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import collections
2
+ import re
3
+ import sys
4
+ import unicodedata
5
+
6
+ from lm_eval.filters.extraction import Filter, RegexFilter
7
+
8
+
9
+ class ExtendedRegexFilter(RegexFilter):
10
+ punct_tbl = dict.fromkeys(
11
+ i for i in range(sys.maxunicode) if unicodedata.category(chr(i)).startswith("P")
12
+ )
13
+
14
+ def __init__(
15
+ self,
16
+ regex_pattern: str = r"#### (\-?[0-9\.\,]+)",
17
+ group_select=0,
18
+ fallback: str = "[invalid]",
19
+ ignore_case=False,
20
+ ignore_punctuation=False,
21
+ regexes_to_ignore=None,
22
+ ) -> None:
23
+ super().__init__(regex_pattern, group_select, fallback)
24
+ self.ignore_case = ignore_case
25
+ self.ignore_punctuation = ignore_punctuation
26
+ self.regexes_to_ignore = regexes_to_ignore
27
+
28
+ def filter_ignores(self, st):
29
+ if self.regexes_to_ignore is not None:
30
+ for s in self.regexes_to_ignore:
31
+ st = re.sub(s, "", st)
32
+
33
+ if self.ignore_case:
34
+ st = st.lower()
35
+
36
+ if self.ignore_punctuation:
37
+ # https://stackoverflow.com/a/266162
38
+ st = st.translate(self.punct_tbl)
39
+ return st
40
+
41
+ def find_match(self, regex, resp, convert_dict={}):
42
+ match = regex.findall(resp)
43
+ if match:
44
+ match = match[self.group_select]
45
+ if isinstance(match, tuple):
46
+ match = [m for m in match if m][0]
47
+ match = match.strip()
48
+ if match and match in convert_dict:
49
+ match = convert_dict[match]
50
+ return match
51
+
52
+
53
+ class MapRegexFilter(ExtendedRegexFilter):
54
+ def __init__(
55
+ self,
56
+ regex_pattern_to_value: dict = {},
57
+ group_select=0,
58
+ fallback: str = "[invalid]",
59
+ ignore_case=False,
60
+ ignore_punctuation=False,
61
+ regexes_to_ignore=None,
62
+ ) -> None:
63
+ """
64
+ regex_pattern_to_value: Match the regex pattern and change the result into the value
65
+ group_select: Selects the (group_select)th match from the findall result. We use the whole regex_patterns, concatenated by |
66
+ ignore_case: Lowers the case of response before matching with the given regex
67
+ ignore_punctuation: Remove the punctuation before matching with the given regex
68
+ regexes_to_ignore: Remove these regexes before matching with the given regex
69
+ """
70
+ super().__init__(
71
+ "|".join(list(regex_pattern_to_value.keys())),
72
+ group_select,
73
+ fallback,
74
+ ignore_case,
75
+ ignore_punctuation,
76
+ regexes_to_ignore,
77
+ )
78
+ self.regex_to_value = {
79
+ re.compile(r): v for r, v in regex_pattern_to_value.items()
80
+ }
81
+
82
+ def apply(self, resps, docs):
83
+ filtered_resps = []
84
+
85
+ for r in resps:
86
+ filtered = []
87
+ for resp in r:
88
+ whole_match_considering_group_select = self.find_match(
89
+ self.regex, self.filter_ignores(resp)
90
+ )
91
+ if whole_match_considering_group_select:
92
+ for regex, mapped_value in self.regex_to_value.items():
93
+ match = self.find_match(
94
+ regex,
95
+ self.filter_ignores(whole_match_considering_group_select),
96
+ )
97
+ if match:
98
+ match = mapped_value
99
+ break
100
+ if not whole_match_considering_group_select or not match:
101
+ match = self.fallback
102
+
103
+ filtered.append(match)
104
+ filtered_resps.append(filtered)
105
+
106
+ return filtered_resps
107
+
108
+
109
+ class NumberParseRegexFilter(ExtendedRegexFilter):
110
+ def apply(self, resps, docs):
111
+ # here, we assume we have a list, in which each element is
112
+ # a list of model responses for some particular input/target pair.
113
+ # so we process each of these (same input/target response sets)
114
+ # independently (and keep them a list.)
115
+ filtered_resps = []
116
+ import regex
117
+ from word2number import w2n
118
+
119
+ # https://www.reddit.com/r/regex/comments/11a38uk/parsing_numbers_written_out_as_english_words
120
+ english_number_regex = regex.compile(
121
+ "((?:(?:zero|one|two|three|four|five|(?:twen|thir|for|fif|six|seven|nine)(?|teen|ty)|eight(?:|een|y)|ten|eleven|twelve|fourteen|hundred|thousand|(?:m|b|tr)illion)(?:zero|one|two|three|four|five|(?:twen|thir|for|fif|six|seven|nine)(?:|teen|ty)|eight(?|een|y)|ten|eleven|twelve|fourteen|hundred|thousand|(?:m|b|tr)illion|[^\S\r\n]|,|and|&)+)?(?:zero|one|two|three|four|five|(?:twen|thir|for|fif|six|seven|nine)(?|teen|ty)|eight(?|een|y)|ten|eleven|twelve|fourteen|hundred|thousand|(?:m|b|tr)illion))"
122
+ )
123
+
124
+ for r in resps:
125
+ filtered = []
126
+ for resp in r:
127
+ match = self.find_match(self.regex, resp)
128
+ if not match:
129
+ match = self.find_match(english_number_regex, resp.lower())
130
+ if match:
131
+ match = str(w2n.word_to_num(match))
132
+ if not match:
133
+ match = self.fallback
134
+ filtered.append(match)
135
+ filtered_resps.append(filtered)
136
+
137
+ return filtered_resps
138
+
139
+
140
+ class WordSortFilter(Filter):
141
+ """ """
142
+
143
+ def apply(self, resps, docs):
144
+ filtered_resps = []
145
+
146
+ for r, doc in zip(resps, docs):
147
+ words = doc["input"].split("List:")[1].strip().split()
148
+ regex = re.compile("|".join([f"\\b{w}\\b" for w in words]))
149
+ filtered = []
150
+ for resp in r:
151
+ match = regex.findall(resp)
152
+ match.reverse()
153
+ ordered_words = reversed(
154
+ collections.OrderedDict(zip(match, [None] * len(match)))
155
+ )
156
+ filtered.append(" ".join(ordered_words))
157
+ filtered_resps.append(filtered)
158
+
159
+ return filtered_resps
160
+
161
+
162
+ class MultiChoiceRegexFilter(ExtendedRegexFilter):
163
+ def __init__(self, *args, **kwargs):
164
+ """
165
+ regex_pattern: The basic regex pattern to use. If fails to match, we will use the customized match procedure
166
+ - step 1 : We parse the choices between ([A-Z])s then try to find these choices in the response.
167
+ - step 2 : We parse the choice with regex :[\s]*([A-?]), where ? varies by number of choices.
168
+ group_select: Selects the (group_select)th match from the findall result.
169
+ ignore_case: Ignores the case during step 1 matching
170
+ ignore_punctuation: Remove the punctuation during step 1 matching
171
+ regexes_to_ignore: Remove these regexes during step 1 matching
172
+ """
173
+ super().__init__(*args, **kwargs)
174
+
175
+ def apply(self, resps, docs):
176
+ # here, we assume we have a list, in which each element is
177
+ # a list of model responses for some particular input/target pair.
178
+ # so we process each of these (same input/target response sets)
179
+ # independently (and keep them a list.)
180
+
181
+ filtered_resps = []
182
+
183
+ for r, doc in zip(resps, docs):
184
+ fallback_regexes = []
185
+ choice_to_alpha = {}
186
+ next_alpha = "A"
187
+
188
+ without_paren_fallback_regexes = []
189
+ without_paren_to_target = {}
190
+
191
+ multiple_choices_regex = re.compile(r"\([A-Z]\)([^\n^(]*)")
192
+ match = multiple_choices_regex.findall(doc["input"])
193
+ for m in match:
194
+ m = self.filter_ignores(m.strip())
195
+ fallback_regexes.append(f"{re.escape(m)}")
196
+ choice_to_alpha[m] = f"({next_alpha})"
197
+
198
+ without_paren_fallback_regexes.append(next_alpha)
199
+ without_paren_to_target[next_alpha] = f"({next_alpha})"
200
+
201
+ next_alpha = chr(ord(next_alpha) + 1)
202
+ fallback_regex = re.compile("|".join(fallback_regexes))
203
+ without_paren_fallback_regex = "|".join(without_paren_fallback_regexes)
204
+ without_paren_fallback_regex = re.compile(
205
+ f":[\s]*({without_paren_fallback_regex})"
206
+ )
207
+
208
+ filtered = []
209
+ for resp in r:
210
+ match = self.find_match(self.regex, resp)
211
+ if not match:
212
+ match = self.find_match(
213
+ fallback_regex, self.filter_ignores(resp), choice_to_alpha
214
+ )
215
+ if not match:
216
+ match = self.find_match(
217
+ without_paren_fallback_regex, resp, without_paren_to_target
218
+ )
219
+ if not match:
220
+ match = self.fallback
221
+ filtered.append(match)
222
+ filtered_resps.append(filtered)
223
+
224
+ return filtered_resps
lm-evaluation/lm_eval/tasks/bbh/cot_zeroshot/web_of_lies.yaml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "dataset_name": "web_of_lies"
2
+ "description": "Evaluate a random boolean function expressed as a word problem.\n\n"
3
+ "doc_to_text": "Q: {{input}}\nA: Let's think step by step."
4
+ "include": "_cot_zeroshot_template_yaml"
5
+ "task": "bbh_cot_zeroshot_web_of_lies"
6
+ filter_list:
7
+ - name: "flexible-extract"
8
+ filter:
9
+ - function: !function utils.MapRegexFilter
10
+ group_select: -1
11
+ ignore_case: true
12
+ regex_pattern_to_value:
13
+ \b(no|does not tell the truth|is not telling the truth)\b: "no"
14
+ \b(yes|tells the truth|is telling the truth)\b: "yes"
15
+ - function: "take_first"
16
+ - name: "strict-match"
17
+ filter:
18
+ - function: "regex"
19
+ regex_pattern: "((?<=The answer is )(.*)(?=.)|(?<=the answer is )(.*)(?=.)|(?<=The answer: )(.*)(?=.)|(?<=The final answer: )(.*)(?=.))"
20
+ - function: "take_first"
lm-evaluation/lm_eval/tasks/bbh/fewshot/_fewshot_template_yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ group: bbh_fewshot
2
+ dataset_path: lukaemon/bbh
3
+ output_type: generate_until
4
+ test_split: test
5
+ doc_to_target: "{{target}}"
6
+ metric_list:
7
+ - metric: exact_match
8
+ aggregation: mean
9
+ higher_is_better: true
10
+ # ignore_case: true
11
+ # ignore_punctuation: true
12
+ generation_kwargs:
13
+ until:
14
+ - "</s>"
15
+ - "Q"
16
+ - "\n\n"
17
+ do_sample: false
18
+ temperature: 0.0
19
+ num_fewshot: 0
20
+ metadata:
21
+ version: 1.0
22
+ num_fewshot: 3 # will be printed in results table
lm-evaluation/lm_eval/tasks/bbh/fewshot/boolean_expressions.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "boolean_expressions"
2
+ "description": "Evaluate the result of a random Boolean expression.\n\n"
3
+ "doc_to_text": "Q: not ( ( not not True ) ) is\nA: False\n\nQ: True and False and not True and True is\nA: False\n\nQ: not not ( not ( False ) ) is\nA: True\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_boolean_expressions"
lm-evaluation/lm_eval/tasks/bbh/fewshot/causal_judgement.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "causal_judgement"
2
+ "description": "Answer questions about causal attribution.\n\n"
3
+ "doc_to_text": "Q: How would a typical person answer each of the following questions about causation?\nFrank T., had an ongoing dispute with his neighbor over a stretch of land and one day decided to shoot his neighbor in the body. Frank T. had no experience with guns, his hand slipped on the barrel of the gun, and the shot went wild. Nonetheless, the bullet bounced off a large boulder several feet away and hit the neighbor's body, causing significant injury. Did Frank T. intentionally shoot his neighbor in the body?\nOptions:\n- Yes\n- No\nA: No\n\nQ: How would a typical person answer each of the following questions about causation?\nSuzy and Billy are working on a project that is very important for our nation's security. The boss tells them both: \"Be sure that you are here at exactly 9 am. It is absolutely essential that you arrive at that time.\" Both Billy and Suzy arrive at 9 am. As it happens, there was a motion detector installed in the room where they arrived. The motion detector was set up to be triggered if at least one person appeared in the room at the same time. So the motion detector went off. Did Billy cause the motion detector to go off?\nOptions:\n- Yes\n- No\nA: Yes\n\nQ: How would a typical person answer each of the following questions about causation?\nGeorge and his sister Lena reunite at their parents' house for Thanksgiving. Whereas George just got into medical school, Lena is unhappy in her marriage and recently lost her job. Over the course of the day, George and Lena get into a number of heated arguments. Later in the afternoon they play a game of darts. They split the first two games, and the third game is close until the end. Who will win comes down to George's last shot. If he hits a high point region, he wins; if he hits a low point region, Lena wins. George thinks of the difficult time Lena is having, and he really wants to let her win. He aims the dart at the low point region. He sets up his shot and the dart lands in the low point region. After his shot, Lena wins the game and is very happy. Did George hit the low point region intentionally?\nOptions:\n- Yes\n- No\nA: Yes\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_causal_judgement"
lm-evaluation/lm_eval/tasks/bbh/fewshot/date_understanding.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "date_understanding"
2
+ "description": "Infer the date from context.\n\n"
3
+ "doc_to_text": "Q: Today is Christmas Eve of 1937. What is the date 10 days ago in MM/DD/YYYY?\nOptions:\n(A) 12/14/2026\n(B) 12/14/1950\n(C) 12/14/2007\n(D) 12/14/1937\n(E) 07/14/1938\n(F) 12/14/1988\nA: (D)\n\nQ: Tomorrow is 11/12/2019. What is the date one year ago from today in MM/DD/YYYY?\nOptions:\n(A) 09/04/2018\n(B) 11/11/2018\n(C) 08/25/2018\n(D) 11/02/2018\n(E) 11/04/2018\nA: (B)\n\nQ: Jane and John married on Jan 2, 1958. It is their 5-year anniversary today. What is the date tomorrow in MM/DD/YYYY?\nOptions:\n(A) 01/11/1961\n(B) 01/03/1963\n(C) 01/18/1961\n(D) 10/14/1960\n(E) 01/03/1982\n(F) 12/03/1960\nA: (B)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_date_understanding"
lm-evaluation/lm_eval/tasks/bbh/fewshot/disambiguation_qa.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "disambiguation_qa"
2
+ "description": "Clarify the meaning of sentences with ambiguous pronouns.\n\n"
3
+ "doc_to_text": "Q: In the following sentences, explain the antecedent of the pronoun (which thing the pronoun refers to), or state that it is ambiguous.\nSentence: The chief told the counselor that they took the day off.\nOptions:\n(A) The chief took the day off\n(B) The counselor took the day off\n(C) Ambiguous\nA: (A)\n\nQ: In the following sentences, explain the antecedent of the pronoun (which thing the pronoun refers to), or state that it is ambiguous.\nSentence: The manager sent a message to the secretary, but he didn't reply yet.\nOptions:\n(A) The secretary didn't reply yet\n(B) The manager didn't reply yet\n(C) Ambiguous\nA: (A)\n\nQ: In the following sentences, explain the antecedent of the pronoun (which thing the pronoun refers to), or state that it is ambiguous.\nSentence: Bailey will plan to meet the director at his office\nOptions:\n(A) It will be Bailey's office\n(B) It will be the director's office\n(C) Ambiguous\nA: (C)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_disambiguation_qa"
lm-evaluation/lm_eval/tasks/bbh/fewshot/dyck_languages.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "dyck_languages"
2
+ "description": "Correctly close a Dyck-n word.\n\n"
3
+ "doc_to_text": "Q: Complete the rest of the sequence, making sure that the parentheses are closed properly. Input: [ { [\nA: ] } ]\n\nQ: Complete the rest of the sequence, making sure that the parentheses are closed properly. Input: < > ( ( [ [ ( { } ) [ < > ] ]\nA: ] ) )\n\nQ: Complete the rest of the sequence, making sure that the parentheses are closed properly. Input: < [ < [ { < [ ] < { } > > } ] > { { ( ) } { < [ < > ] > }\nA: } ] >\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_dyck_languages"
lm-evaluation/lm_eval/tasks/bbh/fewshot/formal_fallacies.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "formal_fallacies"
2
+ "description": "Distinguish deductively valid arguments from formal fallacies.\n\n"
3
+ "doc_to_text": "Q: \"It is not always easy to see who is related to whom -- and in which ways. The following argument pertains to this question: To begin with, Lesley is a close friend of Fernando. Moreover, being a close friend of Fernando or a schoolmate of Lowell is sufficient for being a great-grandfather of Leroy. It follows that Lesley is a great-grandfather of Leroy.\"\nIs the argument, given the explicitly stated premises, deductively valid or invalid?\nOptions:\n- valid\n- invalid\nA: valid\n\nQ: \"It is not always easy to see who is related to whom -- and in which ways. The following argument pertains to this question: Whoever is not a great-grandfather of Clyde is a stepbrother of Brian. Being an ancestor of Dana is sufficient for not being a great-grandfather of Clyde. We may conclude: Everyone who is an ancestor of Dana is a stepbrother of Brian, too.\"\nIs the argument, given the explicitly stated premises, deductively valid or invalid?\nOptions:\n- valid\n- invalid\nA: valid\n\nQ: \"It is not always easy to grasp who is consuming which products. The following argument pertains to this question: Every infrequent user of Paul Mitchell shampoo is either a rare consumer of Nioxin shampoo or a loyal buyer of Caress soap, or both. No regular consumer of Lush soap is a rare consumer of Nioxin shampoo and, in the same time, a loyal buyer of Caress soap. It follows that whoever is an infrequent user of Paul Mitchell shampoo is not a regular consumer of Lush soap.\"\nIs the argument, given the explicitly stated premises, deductively valid or invalid?\nOptions:\n- valid\n- invalid\nA: invalid\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_formal_fallacies"
lm-evaluation/lm_eval/tasks/bbh/fewshot/geometric_shapes.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "geometric_shapes"
2
+ "description": "Name geometric shapes from their SVG paths.\n\n"
3
+ "doc_to_text": "Q: This SVG path element <path d=\"M 31.00,73.00 L 32.00,59.00 L 44.00,50.00 L 49.00,41.00 L 64.00,37.00 L 71.00,55.00 L 64.00,76.00 L 52.00,61.00 L 31.00,73.00\"/> draws a\nOptions:\n(A) circle\n(B) heptagon\n(C) hexagon\n(D) kite\n(E) line\n(F) octagon\n(G) pentagon\n(H) rectangle\n(I) sector\n(J) triangle\nA: (F)\n\nQ: This SVG path element <path d=\"M 14.19,26.04 L 51.43,39.21 L 58.44,36.69 L 56.63,30.17 L 48.53,26.66 L 14.19,26.04\"/> draws a\nOptions:\n(A) circle\n(B) heptagon\n(C) hexagon\n(D) kite\n(E) line\n(F) octagon\n(G) pentagon\n(H) rectangle\n(I) sector\n(J) triangle\nA: (G)\n\nQ: This SVG path element <path d=\"M 41.00,43.00 L 37.00,34.00 L 41.00,33.00 L 45.00,34.00 L 41.00,43.00\"/> draws a\nOptions:\n(A) circle\n(B) heptagon\n(C) hexagon\n(D) kite\n(E) line\n(F) octagon\n(G) pentagon\n(H) rectangle\n(I) sector\n(J) triangle\nA: (D)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_geometric_shapes"
lm-evaluation/lm_eval/tasks/bbh/fewshot/hyperbaton.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "hyperbaton"
2
+ "description": "Order adjectives correctly in English sentences.\n\n"
3
+ "doc_to_text": "Q: Which sentence has the correct adjective order:\nOptions:\n(A) rubber terrible ship\n(B) terrible rubber ship\nA: (B)\n\nQ: Which sentence has the correct adjective order:\nOptions:\n(A) repulsive small Brazilian exercise ship\n(B) Brazilian repulsive exercise small ship\nA: (A)\n\nQ: Which sentence has the correct adjective order:\nOptions:\n(A) blue gold wonderful square shoe\n(B) wonderful square blue gold shoe\nA: (B)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_hyperbaton"
lm-evaluation/lm_eval/tasks/bbh/fewshot/logical_deduction_five_objects.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "logical_deduction_five_objects"
2
+ "description": "A logical deduction task which requires deducing the order of a sequence of objects.\n\n"
3
+ "doc_to_text": "Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished above Amy. Eli finished below Amy.\nOptions:\n(A) Amy finished last\n(B) Eli finished last\n(C) Eve finished last\nA: (B)\n\nQ: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a white book, a green book, and an orange book. The green book is to the right of the white book. The orange book is the rightmost.\nOptions:\n(A) The white book is the leftmost\n(B) The green book is the leftmost\n(C) The orange book is the leftmost\nA: (A)\n\nQ: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a red book, a gray book, and a white book. The white book is to the left of the gray book. The red book is the second from the left.\nOptions:\n(A) The red book is the leftmost\n(B) The gray book is the leftmost\n(C) The white book is the leftmost\nA: (C)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_logical_deduction_five_objects"
lm-evaluation/lm_eval/tasks/bbh/fewshot/logical_deduction_seven_objects.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "logical_deduction_seven_objects"
2
+ "description": "A logical deduction task which requires deducing the order of a sequence of objects.\n\n"
3
+ "doc_to_text": "Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished above Amy. Eli finished below Amy.\nOptions:\n(A) Amy finished last\n(B) Eli finished last\n(C) Eve finished last\nA: (B)\n\nQ: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a white book, a green book, and an orange book. The green book is to the right of the white book. The orange book is the rightmost.\nOptions:\n(A) The white book is the leftmost\n(B) The green book is the leftmost\n(C) The orange book is the leftmost\nA: (A)\n\nQ: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a red book, a gray book, and a white book. The white book is to the left of the gray book. The red book is the second from the left.\nOptions:\n(A) The red book is the leftmost\n(B) The gray book is the leftmost\n(C) The white book is the leftmost\nA: (C)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_logical_deduction_seven_objects"
lm-evaluation/lm_eval/tasks/bbh/fewshot/logical_deduction_three_objects.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "logical_deduction_three_objects"
2
+ "description": "A logical deduction task which requires deducing the order of a sequence of objects.\n\n"
3
+ "doc_to_text": "Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished above Amy. Eli finished below Amy.\nOptions:\n(A) Amy finished last\n(B) Eli finished last\n(C) Eve finished last\nA: (B)\n\nQ: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a white book, a green book, and an orange book. The green book is to the right of the white book. The orange book is the rightmost.\nOptions:\n(A) The white book is the leftmost\n(B) The green book is the leftmost\n(C) The orange book is the leftmost\nA: (A)\n\nQ: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a red book, a gray book, and a white book. The white book is to the left of the gray book. The red book is the second from the left.\nOptions:\n(A) The red book is the leftmost\n(B) The gray book is the leftmost\n(C) The white book is the leftmost\nA: (C)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_logical_deduction_three_objects"
lm-evaluation/lm_eval/tasks/bbh/fewshot/movie_recommendation.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "movie_recommendation"
2
+ "description": "Recommend movies similar to the given list of movies.\n\n"
3
+ "doc_to_text": "Q: Find a movie similar to Star Wars Episode IV - A New Hope, Indiana Jones and the Last Crusade, Star Wars Episode V - The Empire Strikes Back, The Big Lebowski:\nOptions:\n(A) Tetsuo\n(B) the Ironman\n(C) The Princess Bride\n(D) The Barkley Marathons The Race That Eats Its Young\n(E) Bug\nA: (C)\n\nQ: Find a movie similar to Twister, The Silence of the Lambs, Independence Day, Braveheart:\nOptions:\n(A) They Shoot Horses\n(B) Don't They\n(C) Forrest Gump\n(D) The Salton Sea\n(E) Extreme Days\nA: (C)\n\nQ: Find a movie similar to Minority Report, Total Recall, Inside Out, Forrest Gump:\nOptions:\n(A) Phenomena\n(B) Lilting\n(C) Catwoman\n(D) Edge of Tomorrow\nA: (D)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_movie_recommendation"
lm-evaluation/lm_eval/tasks/bbh/fewshot/multistep_arithmetic_two.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "multistep_arithmetic_two"
2
+ "description": "Solve multi-step arithmetic problems.\n\n"
3
+ "doc_to_text": "Q: ((-5 + 9 * -4 - 0) * (4 + -7 + 0 * -5)) =\nA: 123\n\nQ: ((-9 * 7 * 7 * -9) + (4 * -9 - 8 - -4)) =\nA: 3929\n\nQ: ((-3 + 5 * 8 * -4) - (9 - 8 * -7 + -9)) =\nA: -219\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_multistep_arithmetic_two"
lm-evaluation/lm_eval/tasks/bbh/fewshot/navigate.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "navigate"
2
+ "description": "Given a series of navigation instructions, determine whether one would end up back at the starting point.\n\n"
3
+ "doc_to_text": "Q: If you follow these instructions, do you return to the starting point? Turn left. Turn around. Turn left. Take 7 steps. Take 2 steps. Take 4 steps. Take 8 steps.\nOptions:\n- Yes\n- No\nA: No\n\nQ: If you follow these instructions, do you return to the starting point? Turn around. Take 1 step. Take 6 steps. Turn around. Take 6 steps. Take 9 steps. Take 1 step.\nOptions:\n- Yes\n- No\nA: No\n\nQ: If you follow these instructions, do you return to the starting point? Always face forward. Take 2 steps right. Take 9 steps left. Take 7 steps right.\nOptions:\n- Yes\n- No\nA: Yes\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_navigate"
lm-evaluation/lm_eval/tasks/bbh/fewshot/object_counting.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "object_counting"
2
+ "description": "Questions that involve enumerating objects and asking the model to count them.\n\n"
3
+ "doc_to_text": "Q: I have a blackberry, a clarinet, a nectarine, a plum, a strawberry, a banana, a flute, an orange, and a violin. How many fruits do I have?\nA: 6\n\nQ: I have an orange, a raspberry, two peaches, a blackberry, an apple, a grape, a nectarine, and three plums. How many fruits do I have?\nA: 11\n\nQ: I have a lettuce head, a head of broccoli, an onion, a stalk of celery, two carrots, a garlic, and a yam. How many vegetables do I have?\nA: 8\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_object_counting"
lm-evaluation/lm_eval/tasks/bbh/fewshot/penguins_in_a_table.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "penguins_in_a_table"
2
+ "description": "Answer questions about a table of penguins and their attributes.\n\n"
3
+ "doc_to_text": "Q: Here is a table where the first line is a header and each subsequent line is a penguin: name, age, height (cm), weight (kg) Louis, 7, 50, 11 Bernard, 5, 80, 13 Vincent, 9, 60, 11 Gwen, 8, 70, 15 For example: the age of Louis is 7, the weight of Gwen is 15 kg, the height of Bernard is 80 cm. We now add a penguin to the table:\nJames, 12, 90, 12\nHow many penguins are less than 8 years old?\nOptions:\n(A) 1\n(B) 2\n(C) 3\n(D) 4\n(E) 5\nA: (B)\n\nQ: Here is a table where the first line is a header and each subsequent line is a penguin: name, age, height (cm), weight (kg) Louis, 7, 50, 11 Bernard, 5, 80, 13 Vincent, 9, 60, 11 Gwen, 8, 70, 15 For example: the age of Louis is 7, the weight of Gwen is 15 kg, the height of Bernard is 80 cm. Which is the youngest penguin?\nOptions:\n(A) Louis\n(B) Bernard\n(C) Vincent\n(D) Gwen\n(E) James\nA: (B)\n\nQ: Here is a table where the first line is a header and each subsequent line is a penguin: name, age, height (cm), weight (kg) Louis, 7, 50, 11 Bernard, 5, 80, 13 Vincent, 9, 60, 11 Gwen, 8, 70, 15 For example: the age of Louis is 7, the weight of Gwen is 15 kg, the height of Bernard is 80 cm. What is the name of the second penguin sorted by alphabetic order?\nOptions:\n(A) Louis\n(B) Bernard\n(C) Vincent\n(D) Gwen\n(E) James\nA: (D)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_penguins_in_a_table"
lm-evaluation/lm_eval/tasks/bbh/fewshot/reasoning_about_colored_objects.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "reasoning_about_colored_objects"
2
+ "description": "Answer extremely simple questions about the colors of objects on a surface.\n\n"
3
+ "doc_to_text": "Q: On the nightstand, there is a red pencil, a purple mug, a burgundy keychain, a fuchsia teddy bear, a black plate, and a blue stress ball. What color is the stress ball?\nOptions:\n(A) red\n(B) orange\n(C) yellow\n(D) green\n(E) blue\n(F) brown\n(G) magenta\n(H) fuchsia\n(I) mauve\n(J) teal\n(K) turquoise\n(L) burgundy\n(M) silver\n(N) gold\n(O) black\n(P) grey\n(Q) purple\n(R) pink\nA: (E)\n\nQ: On the table, you see a bunch of objects arranged in a row: a purple paperclip, a pink stress ball, a brown keychain, a green scrunchiephone charger, a mauve fidget spinner, and a burgundy pen. What is the color of the object directly to the right of the stress ball?\nOptions:\n(A) red\n(B) orange\n(C) yellow\n(D) green\n(E) blue\n(F) brown\n(G) magenta\n(H) fuchsia\n(I) mauve\n(J) teal\n(K) turquoise\n(L) burgundy\n(M) silver\n(N) gold\n(O) black\n(P) grey\n(Q) purple\n(R) pink\nA: (F)\n\nQ: On the nightstand, you see the following items arranged in a row: a teal plate, a burgundy keychain, a yellow scrunchiephone charger, an orange mug, a pink notebook, and a grey cup. How many non-orange items do you see to the left of the teal item?\nOptions:\n(A) zero\n(B) one\n(C) two\n(D) three\n(E) four\n(F) five\n(G) six\nA: (A)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_reasoning_about_colored_objects"
lm-evaluation/lm_eval/tasks/bbh/fewshot/ruin_names.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "ruin_names"
2
+ "description": "Select the humorous edit that 'ruins' the input movie or musical artist name.\n\n"
3
+ "doc_to_text": "Q: Which of the following is a humorous edit of this artist or movie name: 'whitesnake'?\nOptions:\n(A) whitesnape\n(B) whitesnapke\n(C) whitesnuake\n(D) mwhitesnake\nA: (A)\n\nQ: Which of the following is a humorous edit of this artist or movie name: 'one of our dinosaurs is missing'?\nOptions:\n(A) ofne of our dinosaurs is missing\n(B) one af our dinosaurs is missing\n(C) one of our dinosaurs is pissing\n(D) one of our dinosaur is missing\nA: (C)\n\nQ: Which of the following is a humorous edit of this artist or movie name: 'counting crows'?\nOptions:\n(A) countingy crows\n(B) counting cows\n(C) courting crows\n(D) coutnting crows\nA: (B)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_ruin_names"
lm-evaluation/lm_eval/tasks/bbh/fewshot/salient_translation_error_detection.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "salient_translation_error_detection"
2
+ "description": "Detect the type of error in an English translation of a German source sentence.\n\n"
3
+ "doc_to_text": "Q: The following translations from German to English contain a particular error. That error will be one of the following types: Named Entities: An entity (names, places, locations, etc.) is changed to a different entity. Numerical Values: Numerical values (ordinals or cardinals), dates, and/or units are changed. Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are changed. Negation or Antonyms: Introduce or remove a negation or change comparatives to their antonyms. Facts: Trivial factual errors not pertaining to the above classes are introduced in the translations. Dropped Content: A significant clause in the translation is removed. Please identify that error. Source: In der Liste der Baudenkmale in Lenzen (Elbe) sind alle Baudenkmale der brandenburgischen Stadt Lenzen (Elbe) und ihrer Ortsteile aufgelistet.\nTranslation: In the list of architectural monuments in Lenzen all architectural monuments of the Brandenburg city of Lenzen and its districts are listed.\nThe translation contains an error pertaining to\nOptions:\n(A) Modifiers or Adjectives\n(B) Numerical Values\n(C) Negation or Antonyms\n(D) Named Entities\n(E) Dropped Content\n(F) Facts\nA: (D)\n\nQ: The following translations from German to English contain a particular error. That error will be one of the following types: Named Entities: An entity (names, places, locations, etc.) is changed to a different entity. Numerical Values: Numerical values (ordinals or cardinals), dates, and/or units are changed. Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are changed. Negation or Antonyms: Introduce or remove a negation or change comparatives to their antonyms. Facts: Trivial factual errors not pertaining to the above classes are introduced in the translations. Dropped Content: A significant clause in the translation is removed. Please identify that error. Source: Auf dieser Seite sind die Baudenkmäler der oberbayerischen Großen Kreisstadt Landsberg am Lech zusammengestellt.\nTranslation: On this page are compiled the architectural monuments of the town of Landsberg am Lech.\nThe translation contains an error pertaining to\nOptions:\n(A) Modifiers or Adjectives\n(B) Numerical Values\n(C) Negation or Antonyms\n(D) Named Entities\n(E) Dropped Content\n(F) Facts\nA: (E)\n\nQ: The following translations from German to English contain a particular error. That error will be one of the following types: Named Entities: An entity (names, places, locations, etc.) is changed to a different entity. Numerical Values: Numerical values (ordinals or cardinals), dates, and/or units are changed. Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are changed. Negation or Antonyms: Introduce or remove a negation or change comparatives to their antonyms. Facts: Trivial factual errors not pertaining to the above classes are introduced in the translations. Dropped Content: A significant clause in the translation is removed. Please identify that error. Source: Łeba ist eine Kleinstadt und ein Badeort im Powiat Lęborski der polnischen Woiwodschaft Pommern.\nTranslation: Eba is not a small town and seaside resort in the Powiat Léborski county of the Pomeranian Voivodeship of Poland.\nThe translation contains an error pertaining to\nOptions:\n(A) Modifiers or Adjectives\n(B) Numerical Values\n(C) Negation or Antonyms\n(D) Named Entities\n(E) Dropped Content\n(F) Facts\nA: (C)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_salient_translation_error_detection"
lm-evaluation/lm_eval/tasks/bbh/fewshot/snarks.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "snarks"
2
+ "description": "Determine which of two sentences is sarcastic.\n\nAccording to Cambridge University Dictionary, sarcasm is \"the use of remarks that clearly mean the opposite of what they say, made in order to hurt someone's feelings or to criticize something in a humorous way.\" Sarcastic sentences often contain satirical or ironic utterances, hyperboles, ambivalent or witty remarks.\n\n"
3
+ "doc_to_text": "Q: Which statement is sarcastic?\nOptions:\n(A) Yes, because having interests and actively researching them is a huge waste\n(B) Yes, because having interests and actively researching them is a huge deal\nA: (A)\n\nQ: Which statement is sarcastic?\nOptions:\n(A) No one is going to disagree with you on this. Avoiding ad hominem attacks really help your case\n(B) No one is going to disagree with you on this. Ad hominem attacks really help your case\nA: (B)\n\nQ: Which statement is sarcastic?\nOptions:\n(A) Consistency in the league's punishments? What do you think this is supposed to be, politics?\n(B) Consistency in the league's punishments? What do you think this is supposed to be, moral?\nA: (A)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_snarks"
lm-evaluation/lm_eval/tasks/bbh/fewshot/sports_understanding.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "sports_understanding"
2
+ "description": "Determine whether an artificially constructed sentence relating to sports is plausible or not.\n\n"
3
+ "doc_to_text": "Q: Is the following sentence plausible? \"Bam Adebayo scored a reverse layup in the Western Conference Finals.\"\nA: yes\n\nQ: Is the following sentence plausible? \"Santi Cazorla scored a touchdown.\"\nA: no\n\nQ: Is the following sentence plausible? \"DeMar DeRozan was called for the goal tend.\"\nA: yes\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_sports_understanding"
lm-evaluation/lm_eval/tasks/bbh/fewshot/temporal_sequences.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "dataset_name": "temporal_sequences"
2
+ "description": "Task description: Answer questions about which times certain events could have occurred.\n\n"
3
+ "doc_to_text": "Q: Today, Emily went to the museum. Between what times could they have gone?\nWe know that:\nEmily woke up at 1pm.\nElizabeth saw Emily reading at the library from 2pm to 4pm.\nJessica saw Emily watching a movie at the theater from 4pm to 5pm.\nLeslie saw Emily waiting at the airport from 5pm to 6pm.\nWilliam saw Emily buying clothes at the mall from 6pm to 7pm.\nThe museum was closed after 7pm.\nBetween what times could Emily have gone to the museum?\nOptions:\n(A) 1pm to 2pm\n(B) 6pm to 7pm\n(C) 5pm to 6pm\n(D) 2pm to 4pm\nA: (A)\n\nQ: Today, Elizabeth went to the amusement park. Between what times could they have gone?\nWe know that:\nElizabeth woke up at 7am.\nDavid saw Elizabeth fixing their computer at the electronic store from 1pm to 2pm.\nSarah saw Elizabeth playing tennis at the tennis court from 2pm to 3pm.\nSusan saw Elizabeth walking towards the Statue of Liberty from 3pm to 6pm.\nAndrew saw Elizabeth taking photos near the Eiffel Tower from 6pm to 9pm.\nEmily saw Elizabeth getting a coffee at the cafe from 9pm to 10pm.\nThe amusement park was closed after 10pm.\nBetween what times could Elizabeth have gone to the amusement park?\nOptions:\n(A) 7am to 1pm\n(B) 9pm to 10pm\n(C) 1pm to 2pm\n(D) 3pm to 6pm\nA: (A)\n\nQ: Today, Tiffany went to the beach. Between what times could they have gone?\nWe know that:\nTiffany woke up at 5am.\nBetty saw Tiffany getting a coffee at the cafe from 5am to 6am.\nJessica saw Tiffany working at the office from 6am to 9am.\nJohn saw Tiffany stretching at a yoga studio from 9am to 12pm.\nSean saw Tiffany sitting on a rooftop from 12pm to 2pm.\nSarah saw Tiffany playing tennis at the tennis court from 2pm to 3pm.\nThe beach was closed after 4pm.\nBetween what times could Tiffany have gone to the beach?\nOptions:\n(A) 9am to 12pm\n(B) 12pm to 2pm\n(C) 5am to 6am\n(D) 3pm to 4pm\nA: (D)\n\nQ: {{input}}\nA:"
4
+ "include": "_fewshot_template_yaml"
5
+ "task": "bbh_fewshot_temporal_sequences"