koichi12 commited on
Commit
b27c938
·
verified ·
1 Parent(s): 7d59045

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. scripts/yans/lm-evaluation-harness/lm_eval/tasks/arc/README.md +58 -0
  2. scripts/yans/lm-evaluation-harness/lm_eval/tasks/arc/arc_challenge.yaml +3 -0
  3. scripts/yans/lm-evaluation-harness/lm_eval/tasks/arc/arc_easy.yaml +23 -0
  4. scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/README.md +76 -0
  5. scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/bec.yaml +16 -0
  6. scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/bhtc.yaml +16 -0
  7. scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/coref.yaml +16 -0
  8. scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/qnli.yaml +16 -0
  9. scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/utils.py +78 -0
  10. scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/vaxx.yaml +16 -0
  11. scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/wic.yaml +17 -0
  12. scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/_csatqa.yaml +17 -0
  13. scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/_default_csatqa_yaml +16 -0
  14. scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/_generate_configs.py +51 -0
  15. scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_gr.yaml +3 -0
  16. scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_li.yaml +3 -0
  17. scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_rch.yaml +3 -0
  18. scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_rcs.yaml +3 -0
  19. scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_rcss.yaml +3 -0
  20. scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_wr.yaml +3 -0
  21. scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/utils.py +20 -0
  22. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/_fewshot_template_yaml +16 -0
  23. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/causal_judgement.yaml +62 -0
  24. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/date_understanding.yaml +55 -0
  25. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/disambiguation_qa.yaml +48 -0
  26. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/logical_deduction_five_objects.yaml +50 -0
  27. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/logical_deduction_seven_objects.yaml +50 -0
  28. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/logical_deduction_three_objects.yaml +50 -0
  29. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/movie_recommendation.yaml +52 -0
  30. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/navigate.yaml +38 -0
  31. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/object_counting.yaml +18 -0
  32. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/penguins_in_a_table.yaml +66 -0
  33. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/ruin_names.yaml +48 -0
  34. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/salient_translation_error_detection.yaml +101 -0
  35. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/snarks.yaml +42 -0
  36. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/sports_understanding.yaml +17 -0
  37. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/temporal_sequences.yaml +99 -0
  38. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/tracking_shuffled_objects_seven_objects.yaml +57 -0
  39. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/tracking_shuffled_objects_three_objects.yaml +57 -0
  40. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/web_of_lies.yaml +20 -0
  41. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/_leaderboard_gpqa.yaml +5 -0
  42. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/_template_yaml +19 -0
  43. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/gpqa_diamond_zeroshot.yaml +4 -0
  44. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/gpqa_extended_zeroshot.yaml +4 -0
  45. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/gpqa_main_zeroshot.yaml +4 -0
  46. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/utils.py +38 -0
  47. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/math/_leaderboard_math.yaml +9 -0
  48. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/math/_template_yaml +26 -0
  49. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/math/math_algebra.yaml +3 -0
  50. scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/math/math_counting_and_prob.yaml +3 -0
scripts/yans/lm-evaluation-harness/lm_eval/tasks/arc/README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ARC
2
+
3
+ ### Paper
4
+
5
+ Title: Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge
6
+
7
+ Abstract: https://arxiv.org/abs/1803.05457
8
+
9
+ The ARC dataset consists of 7,787 science exam questions drawn from a variety
10
+ of sources, including science questions provided under license by a research
11
+ partner affiliated with AI2. These are text-only, English language exam questions
12
+ that span several grade levels as indicated in the files. Each question has a
13
+ multiple choice structure (typically 4 answer options). The questions are sorted
14
+ into a Challenge Set of 2,590 “hard” questions (those that both a retrieval and
15
+ a co-occurrence method fail to answer correctly) and an Easy Set of 5,197 questions.
16
+
17
+ Homepage: https://allenai.org/data/arc
18
+
19
+
20
+ ### Citation
21
+
22
+ ```
23
+ @article{Clark2018ThinkYH,
24
+ title={Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge},
25
+ author={Peter Clark and Isaac Cowhey and Oren Etzioni and Tushar Khot and Ashish Sabharwal and Carissa Schoenick and Oyvind Tafjord},
26
+ journal={ArXiv},
27
+ year={2018},
28
+ volume={abs/1803.05457}
29
+ }
30
+ ```
31
+
32
+ ### Groups, Tags, and Tasks
33
+
34
+ #### Groups
35
+
36
+ None.
37
+
38
+ #### Tags
39
+
40
+ * `ai2_arc`: Evaluates `arc_easy` and `arc_challenge`
41
+
42
+ #### Tasks
43
+
44
+ * `arc_easy`
45
+ * `arc_challenge`
46
+
47
+ ### Checklist
48
+
49
+ For adding novel benchmarks/datasets to the library:
50
+ * [ ] Is the task an existing benchmark in the literature?
51
+ * [ ] Have you referenced the original paper that introduced the task?
52
+ * [ ] If yes, does the original paper provide a reference implementation? If so, have you checked against the reference implementation and documented how to run such a test?
53
+
54
+
55
+ If other tasks on this dataset are already supported:
56
+ * [ ] Is the "Main" variant of this task clearly denoted?
57
+ * [ ] Have you provided a short sentence in a README on what each new variant adds / evaluates?
58
+ * [ ] Have you noted which, if any, published evaluation setups are matched by this variant?
scripts/yans/lm-evaluation-harness/lm_eval/tasks/arc/arc_challenge.yaml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ include: arc_easy.yaml
2
+ task: arc_challenge
3
+ dataset_name: ARC-Challenge
scripts/yans/lm-evaluation-harness/lm_eval/tasks/arc/arc_easy.yaml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tag:
2
+ - ai2_arc
3
+ task: arc_easy
4
+ dataset_path: allenai/ai2_arc
5
+ dataset_name: ARC-Easy
6
+ output_type: multiple_choice
7
+ training_split: train
8
+ validation_split: validation
9
+ test_split: test
10
+ doc_to_text: "Question: {{question}}\nAnswer:"
11
+ doc_to_target: "{{choices.label.index(answerKey)}}"
12
+ doc_to_choice: "{{choices.text}}"
13
+ should_decontaminate: true
14
+ doc_to_decontamination_query: "Question: {{question}}\nAnswer:"
15
+ metric_list:
16
+ - metric: acc
17
+ aggregation: mean
18
+ higher_is_better: true
19
+ - metric: acc_norm
20
+ aggregation: mean
21
+ higher_is_better: true
22
+ metadata:
23
+ version: 1.0
scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BasqueGLUE
2
+
3
+ ### Paper
4
+
5
+ Title: `BasqueGLUE: A Natural Language Understanding Benchmark for Basque`
6
+
7
+ Abstract: `https://aclanthology.org/2022.lrec-1.172/`
8
+
9
+ Natural Language Understanding (NLU) technology has improved significantly over the last few years and multitask benchmarks such as GLUE are key to evaluate this improvement in a robust and general way. These benchmarks take into account a wide and diverse set of NLU tasks that require some form of language understanding, beyond the detection of superficial, textual clues. However, they are costly to develop and language-dependent, and therefore they are only available for a small number of languages. In this paper, we present BasqueGLUE, the first NLU benchmark for Basque, a less-resourced language, which has been elaborated from previously existing datasets and following similar criteria to those used for the construction of GLUE and SuperGLUE. We also report the evaluation of two state-of-the-art language models for Basque on BasqueGLUE, thus providing a strong baseline to compare upon. BasqueGLUE is freely available under an open license.
10
+
11
+ Homepage: `https://github.com/orai-nlp/BasqueGLUE`
12
+
13
+ Title: `Latxa: An Open Language Model and Evaluation Suite for Basque`
14
+
15
+ Abstract: `https://arxiv.org/abs/2403.20266`
16
+
17
+ The use of BasqueGLUE for evaluating the performance of decoder models in Basque is presented in this paper.
18
+
19
+ Homepage: `https://github.com/hitz-zentroa/latxa`
20
+
21
+ ### Citation
22
+
23
+ ```
24
+ @InProceedings{urbizu2022basqueglue,
25
+ author = {Urbizu, Gorka and San Vicente, Iñaki and Saralegi, Xabier and Agerri, Rodrigo and Soroa, Aitor},
26
+ title = {BasqueGLUE: A Natural Language Understanding Benchmark for Basque},
27
+ booktitle = {Proceedings of the Language Resources and Evaluation Conference},
28
+ month = {June},
29
+ year = {2022},
30
+ address = {Marseille, France},
31
+ publisher = {European Language Resources Association},
32
+ pages = {1603--1612},
33
+ url = {https://aclanthology.org/2022.lrec-1.172}
34
+ }
35
+
36
+ @misc{etxaniz2024latxa,
37
+ title={Latxa: An Open Language Model and Evaluation Suite for Basque},
38
+ author={Julen Etxaniz and Oscar Sainz and Naiara Perez and Itziar Aldabe and German Rigau and Eneko Agirre and Aitor Ormazabal and Mikel Artetxe and Aitor Soroa},
39
+ year={2024},
40
+ eprint={2403.20266},
41
+ archivePrefix={arXiv},
42
+ primaryClass={cs.CL}
43
+ }
44
+ ```
45
+
46
+ ### Groups, Tags, and Tasks
47
+
48
+ #### Groups
49
+
50
+ None.
51
+
52
+ #### Tags
53
+
54
+ * `basque-glue`: First version of the implementation. Calls all subtasks, but does not average.
55
+
56
+ #### Tasks
57
+
58
+ * `bhtc_v2`: Topic classification of news extracts with 12 categories.
59
+ * `bec2016eu`: Sentiment analysis on tweets about the campaign for the 2016 Basque elections.
60
+ * `vaxx_stance`: Stance detection on tweets around the anti-vaccine movement.
61
+ * `qnlieu`: Q&A NLI as in [glue/qnli](../glue/qnli).
62
+ * `wiceu`: Word-in-Context as in [super_glue/wic](../super_glue/wic).
63
+ * `epec_koref_bin`: Correference detection as in [super_glue/wsc](../super_glue/wsc).
64
+
65
+ ### Checklist
66
+
67
+ For adding novel benchmarks/datasets to the library:
68
+ * [ ] Is the task an existing benchmark in the literature?
69
+ * [ ] Have you referenced the original paper that introduced the task?
70
+ * [ ] If yes, does the original paper provide a reference implementation? If so, have you checked against the reference implementation and documented how to run such a test?
71
+
72
+
73
+ If other tasks on this dataset are already supported:
74
+ * [ ] Is the "Main" variant of this task clearly denoted?
75
+ * [ ] Have you provided a short sentence in a README on what each new variant adds / evaluates?
76
+ * [ ] Have you noted which, if any, published evaluation setups are matched by this variant?
scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/bec.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tag: basque-glue
2
+ task: bec2016eu
3
+ dataset_path: orai-nlp/basqueGLUE
4
+ dataset_name: bec
5
+ output_type: multiple_choice
6
+ validation_split: validation
7
+ test_split: test
8
+ doc_to_text: "Testua: {{text}}\nGaldera: Nolako jarrera agertzen du aurreko testuak?\nErantzuna:"
9
+ doc_to_target: label
10
+ doc_to_choice: ['negatiboa', 'neutrala', 'positiboa']
11
+ metric_list:
12
+ - metric: f1
13
+ aggregation: !function utils.micro_f1_score
14
+ higher_is_better: true
15
+ metadata:
16
+ version: 1.0
scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/bhtc.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tag: basque-glue
2
+ task: bhtc_v2
3
+ dataset_path: orai-nlp/basqueGLUE
4
+ dataset_name: bhtc
5
+ output_type: multiple_choice
6
+ validation_split: validation
7
+ test_split: test
8
+ doc_to_text: "Testua: {{text}}\nGaldera: Zein da aurreko testuaren gaia?\nErantzuna:"
9
+ doc_to_target: label
10
+ doc_to_choice: ['Ekonomia', 'Euskal Herria', 'Euskara', 'Gizartea', 'Historia', 'Ingurumena', 'Iritzia', 'Komunikazioa', 'Kultura', 'Nazioartea', 'Politika', 'Zientzia']
11
+ metric_list:
12
+ - metric: f1
13
+ aggregation: !function utils.micro_f1_score
14
+ higher_is_better: true
15
+ metadata:
16
+ version: 1.0
scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/coref.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tag: basque-glue
2
+ task: epec_koref_bin
3
+ dataset_path: orai-nlp/basqueGLUE
4
+ dataset_name: coref
5
+ output_type: multiple_choice
6
+ validation_split: validation
7
+ test_split: test
8
+ doc_to_text: !function utils.coref_doc_to_text
9
+ doc_to_target: label
10
+ doc_to_choice: ['ez', 'bai']
11
+ metric_list:
12
+ - metric: acc
13
+ aggregation: mean
14
+ higher_is_better: true
15
+ metadata:
16
+ version: 1.0
scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/qnli.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tag: basque-glue
2
+ task: qnlieu
3
+ dataset_path: orai-nlp/basqueGLUE
4
+ dataset_name: qnli
5
+ output_type: multiple_choice
6
+ validation_split: validation
7
+ test_split: test
8
+ doc_to_text: "{{question}}\n{{sentence}}\nGaldera: aurreko galderari erantzuten al dio emandako testuak?\nErantzuna:"
9
+ doc_to_target: label
10
+ doc_to_choice: ['bai', 'ez']
11
+ metric_list:
12
+ - metric: acc
13
+ aggregation: mean
14
+ higher_is_better: true
15
+ metadata:
16
+ version: 1.0
scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/utils.py ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import html
2
+ import re
3
+
4
+ from datasets import load_metric
5
+
6
+
7
+ def general_detokenize(string):
8
+ string = re.sub(r"\s+([.,;:!?)])", r"\1", string)
9
+ string = re.sub(r"(\s+|^)\(\s+([^)]+)\s+\)", r"\1(\2)", string)
10
+ string = re.sub(r"(\s+|^)\[\s+([^)]+)\s+\]", r"\1[\2]", string)
11
+ string = re.sub(r'(\s+|^)"\s+([^"]+)\s+"', r'\1"\2"', string)
12
+ string = re.sub(r"(\s+|^)'\s+([^']+)\s+'", r"\1'\2'", string)
13
+ return string
14
+
15
+
16
+ def process_doc(string):
17
+ string = html.unescape(string)
18
+ string = general_detokenize(string)
19
+ return string
20
+
21
+
22
+ def process_wic_docs(dataset):
23
+ def _helper(doc):
24
+ # there's some issues with the encoding on this one
25
+ doc["sentence1"] = (
26
+ process_doc(doc["sentence1"]).encode("latin-1").decode("utf-8")
27
+ )
28
+ doc["sentence2"] = (
29
+ process_doc(doc["sentence2"]).encode("latin-1").decode("utf-8")
30
+ )
31
+ return doc
32
+
33
+ return dataset.map(_helper)
34
+
35
+
36
+ def coref_doc_to_text(x):
37
+ def _span_in_context(span_index, span_text):
38
+ span_start = span_index
39
+ span_end = span_start + len(span_text.split(" ")) - 1
40
+ tokens[span_start] = f"*{tokens[span_start]}"
41
+ tokens[span_end] = f"{tokens[span_end]}*"
42
+
43
+ tokens = x["text"].split(" ")
44
+ _span_in_context(x["span1_index"], x["span1_text"])
45
+ _span_in_context(
46
+ x["span2_index"] - 1, x["span2_text"]
47
+ ) # span1_index is 0-based but span2_index is 1-based ??
48
+ context = process_doc(" ".join(tokens))
49
+ span_1 = process_doc(x["span1_text"])
50
+ span_2 = process_doc(x["span2_text"])
51
+ text = (
52
+ f"Testua: {context}\n"
53
+ + f'Galdera: Aurreko testuan, "*{span_1}*" eta "*{span_2}*" gauza bera dira?\n'
54
+ + "Erantzuna:"
55
+ )
56
+ return text
57
+
58
+
59
+ # Measure F1 as in the benchmark repo: https://github.com/orai-nlp/BasqueGLUE/blob/main/eval_basqueglue.py
60
+
61
+
62
+ def micro_f1_score(items):
63
+ f1_metric = load_metric("f1")
64
+ golds, preds = list(zip(*items))
65
+ f1_score = f1_metric.compute(references=golds, predictions=preds, average="micro")[
66
+ "f1"
67
+ ]
68
+ return f1_score
69
+
70
+
71
+ def vaxx_f1_score(items):
72
+ f1_metric = load_metric("f1")
73
+ golds, preds = list(zip(*items))
74
+ f1_class = f1_metric.compute(
75
+ references=golds, predictions=preds, labels=[0, 2], average=None
76
+ )["f1"]
77
+ f1_score = sum(f1_class) / len(f1_class)
78
+ return f1_score
scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/vaxx.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tag: basque-glue
2
+ task: vaxx_stance
3
+ dataset_path: orai-nlp/basqueGLUE
4
+ dataset_name: vaxx
5
+ output_type: multiple_choice
6
+ validation_split: validation
7
+ test_split: test
8
+ doc_to_text: "Testua: {{text}}\nGaldera: Nolako jarrera agertzen du aurreko testuak txertoei buruz?\nErantzuna:"
9
+ doc_to_target: label
10
+ doc_to_choice: ['aurka', 'neutrala', 'alde']
11
+ metric_list:
12
+ - metric: f1
13
+ aggregation: !function utils.vaxx_f1_score
14
+ higher_is_better: true
15
+ metadata:
16
+ version: 1.0
scripts/yans/lm-evaluation-harness/lm_eval/tasks/basqueglue/wic.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tag: basque-glue
2
+ task: wiceu
3
+ dataset_path: orai-nlp/basqueGLUE
4
+ dataset_name: wic
5
+ output_type: multiple_choice
6
+ validation_split: validation
7
+ test_split: test
8
+ process_docs: !function utils.process_wic_docs
9
+ doc_to_text: "1. esaldia: {{sentence1}}\n2. esaldia: {{sentence2}}\nGaldera: Aurreko bi esaldietan, \"{{word}}\" hitzak esanahi berdina du?\nErantzuna:"
10
+ doc_to_target: label
11
+ doc_to_choice: ['ez', 'bai']
12
+ metric_list:
13
+ - metric: acc
14
+ aggregation: mean
15
+ higher_is_better: true
16
+ metadata:
17
+ version: 1.0
scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/_csatqa.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ group: csatqa
2
+ task:
3
+ - csatqa_gr
4
+ - csatqa_li
5
+ - csatqa_rch
6
+ - csatqa_rcs
7
+ - csatqa_rcss
8
+ - csatqa_wr
9
+ aggregate_metric_list:
10
+ - metric: acc
11
+ aggregation: mean
12
+ weight_by_size: true
13
+ - metric: acc_norm
14
+ aggregation: mean
15
+ weight_by_size: true
16
+ metadata:
17
+ version: 0.0
scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/_default_csatqa_yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_path: EleutherAI/csatqa
2
+ test_split: test
3
+ output_type: multiple_choice
4
+ process_docs: !function utils.process_docs
5
+ doc_to_text: "{{question}}"
6
+ doc_to_choice: "{{choices}}"
7
+ doc_to_target: "{{gold}}"
8
+ metric_list:
9
+ - metric: acc
10
+ aggregation: mean
11
+ higher_is_better: true
12
+ - metric: acc_norm
13
+ aggregation: mean
14
+ higher_is_better: true
15
+ metadata:
16
+ version: 0.0
scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/_generate_configs.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Take in a YAML, and output all other splits with this YAML
3
+ """
4
+
5
+ import argparse
6
+ import os
7
+
8
+ import yaml
9
+ from tqdm import tqdm
10
+
11
+ from lm_eval.logger import eval_logger
12
+
13
+
14
+ SUBSETS = ["WR", "GR", "RCS", "RCSS", "RCH", "LI"]
15
+
16
+
17
+ def parse_args():
18
+ parser = argparse.ArgumentParser()
19
+ parser.add_argument("--base_yaml_path", required=True)
20
+ parser.add_argument("--save_prefix_path", default="csatqa")
21
+ parser.add_argument("--task_prefix", default="")
22
+ return parser.parse_args()
23
+
24
+
25
+ if __name__ == "__main__":
26
+ args = parse_args()
27
+
28
+ # get filename of base_yaml so we can `"include": ` it in our other YAMLs.
29
+ base_yaml_name = os.path.split(args.base_yaml_path)[-1]
30
+ with open(args.base_yaml_path, encoding="utf-8") as f:
31
+ base_yaml = yaml.full_load(f)
32
+
33
+ for name in tqdm(SUBSETS):
34
+ yaml_dict = {
35
+ "include": base_yaml_name,
36
+ "task": f"csatqa_{args.task_prefix}_{name}"
37
+ if args.task_prefix != ""
38
+ else f"csatqa_{name.lower()}",
39
+ "dataset_name": name,
40
+ }
41
+
42
+ file_save_path = args.save_prefix_path + f"_{name.lower()}.yaml"
43
+ eval_logger.info(f"Saving yaml for subset {name} to {file_save_path}")
44
+ with open(file_save_path, "w", encoding="utf-8") as yaml_file:
45
+ yaml.dump(
46
+ yaml_dict,
47
+ yaml_file,
48
+ width=float("inf"),
49
+ allow_unicode=True,
50
+ default_style='"',
51
+ )
scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_gr.yaml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ "dataset_name": "GR"
2
+ "include": "_default_csatqa_yaml"
3
+ "task": "csatqa_gr"
scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_li.yaml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ "dataset_name": "LI"
2
+ "include": "_default_csatqa_yaml"
3
+ "task": "csatqa_li"
scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_rch.yaml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ "dataset_name": "RCH"
2
+ "include": "_default_csatqa_yaml"
3
+ "task": "csatqa_rch"
scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_rcs.yaml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ "dataset_name": "RCS"
2
+ "include": "_default_csatqa_yaml"
3
+ "task": "csatqa_rcs"
scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_rcss.yaml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ "dataset_name": "RCSS"
2
+ "include": "_default_csatqa_yaml"
3
+ "task": "csatqa_rcss"
scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/csatqa_wr.yaml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ "dataset_name": "WR"
2
+ "include": "_default_csatqa_yaml"
3
+ "task": "csatqa_wr"
scripts/yans/lm-evaluation-harness/lm_eval/tasks/csatqa/utils.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+
3
+
4
+ def process_docs(dataset: datasets.Dataset) -> datasets.Dataset:
5
+ def _process_doc(doc):
6
+ instruction = f"""다음을 읽고 정답으로 알맞은 것을 고르시요.
7
+ ### Context: {doc["context"]}
8
+ ### Question: {doc["question"]}
9
+ ### Options:
10
+ (1) {doc['option#1']}\n(2) {doc["option#2"]}\n(3) {doc["option#3"]}\n(4) {doc['option#4']}\n(5) {doc['option#5']}
11
+ ### Answer: 주어진 문제의 정답은"""
12
+
13
+ out_doc = {
14
+ "question": instruction,
15
+ "choices": ["(1)", "(2)", "(3)", "(4)", "(5)"],
16
+ "gold": int(doc["gold"]) - 1,
17
+ }
18
+ return out_doc
19
+
20
+ return dataset.map(_process_doc)
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/_fewshot_template_yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_path: SaylorTwift/bbh
2
+ output_type: multiple_choice
3
+ test_split: test
4
+ doc_to_text: 'Q: {{input}}
5
+
6
+ A:'
7
+ doc_to_target: "{{target}}"
8
+ metric_list:
9
+ - metric: acc_norm
10
+ aggregation: mean
11
+ higher_is_better: true
12
+ num_fewshot: 3
13
+ fewshot_config:
14
+ sampler: first_n
15
+ metadata:
16
+ version: 1.0
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/causal_judgement.yaml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: causal_judgement
2
+ description: 'Answer questions about causal attribution.'
3
+ doc_to_choice: ["Yes", "No"]
4
+ fewshot_config:
5
+ sampler: first_n
6
+ samples:
7
+ - input: 'How would a typical person answer each of the following questions about
8
+ causation?
9
+
10
+ Frank T., had an ongoing dispute with his neighbor over a stretch of land and
11
+ one day decided to shoot his neighbor in the body. Frank T. had no experience
12
+ with guns, his hand slipped on the barrel of the gun, and the shot went wild.
13
+ Nonetheless, the bullet bounced off a large boulder several feet away and hit
14
+ the neighbor''s body, causing significant injury. Did Frank T. intentionally
15
+ shoot his neighbor in the body?
16
+
17
+ Options:
18
+
19
+ - Yes
20
+
21
+ - No'
22
+ target: 'No'
23
+ - input: 'How would a typical person answer each of the following questions about
24
+ causation?
25
+
26
+ Suzy and Billy are working on a project that is very important for our nation''s
27
+ security. The boss tells them both: "Be sure that you are here at exactly 9
28
+ am. It is absolutely essential that you arrive at that time." Both Billy and
29
+ Suzy arrive at 9 am. As it happens, there was a motion detector installed in
30
+ the room where they arrived. The motion detector was set up to be triggered
31
+ if at least one person appeared in the room at the same time. So the motion
32
+ detector went off. Did Billy cause the motion detector to go off?
33
+
34
+ Options:
35
+
36
+ - Yes
37
+
38
+ - No'
39
+ target: 'Yes'
40
+ - input: 'How would a typical person answer each of the following questions about
41
+ causation?
42
+
43
+ George and his sister Lena reunite at their parents'' house for Thanksgiving.
44
+ Whereas George just got into medical school, Lena is unhappy in her marriage
45
+ and recently lost her job. Over the course of the day, George and Lena get into
46
+ a number of heated arguments. Later in the afternoon they play a game of darts.
47
+ They split the first two games, and the third game is close until the end. Who
48
+ will win comes down to George''s last shot. If he hits a high point region,
49
+ he wins; if he hits a low point region, Lena wins. George thinks of the difficult
50
+ time Lena is having, and he really wants to let her win. He aims the dart at
51
+ the low point region. He sets up his shot and the dart lands in the low point
52
+ region. After his shot, Lena wins the game and is very happy. Did George hit
53
+ the low point region intentionally?
54
+
55
+ Options:
56
+
57
+ - Yes
58
+
59
+ - No'
60
+ target: 'Yes'
61
+ include: _fewshot_template_yaml
62
+ task: leaderboard_bbh_causal_judgement
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/date_understanding.yaml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: date_understanding
2
+ description: 'Infer the date from context.'
3
+ doc_to_choice: ["(A)", "(B)", "(C)", "(D)", "(E)", "(F)"]
4
+ fewshot_config:
5
+ sampler: first_n
6
+ samples:
7
+ - input: 'Today is Christmas Eve of 1937. What is the date 10 days ago in MM/DD/YYYY?
8
+
9
+ Options:
10
+
11
+ (A) 12/14/2026
12
+
13
+ (B) 12/14/1950
14
+
15
+ (C) 12/14/2007
16
+
17
+ (D) 12/14/1937
18
+
19
+ (E) 07/14/1938
20
+
21
+ (F) 12/14/1988'
22
+ target: (D)
23
+ - input: 'Tomorrow is 11/12/2019. What is the date one year ago from today in MM/DD/YYYY?
24
+
25
+ Options:
26
+
27
+ (A) 09/04/2018
28
+
29
+ (B) 11/11/2018
30
+
31
+ (C) 08/25/2018
32
+
33
+ (D) 11/02/2018
34
+
35
+ (E) 11/04/2018'
36
+ target: (B)
37
+ - input: 'Jane and John married on Jan 2, 1958. It is their 5-year anniversary today.
38
+ What is the date tomorrow in MM/DD/YYYY?
39
+
40
+ Options:
41
+
42
+ (A) 01/11/1961
43
+
44
+ (B) 01/03/1963
45
+
46
+ (C) 01/18/1961
47
+
48
+ (D) 10/14/1960
49
+
50
+ (E) 01/03/1982
51
+
52
+ (F) 12/03/1960'
53
+ target: (B)
54
+ include: _fewshot_template_yaml
55
+ task: leaderboard_bbh_date_understanding
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/disambiguation_qa.yaml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: disambiguation_qa
2
+ description: 'Clarify the meaning of sentences with ambiguous pronouns.'
3
+ doc_to_choice: ["(A)", "(B)", "(C)"]
4
+ fewshot_config:
5
+ sampler: first_n
6
+ samples:
7
+ - input: 'In the following sentences, explain the antecedent of the pronoun (which
8
+ thing the pronoun refers to), or state that it is ambiguous.
9
+
10
+ Sentence: The chief told the counselor that they took the day off.
11
+
12
+ Options:
13
+
14
+ (A) The chief took the day off
15
+
16
+ (B) The counselor took the day off
17
+
18
+ (C) Ambiguous'
19
+ target: (A)
20
+ - input: 'In the following sentences, explain the antecedent of the pronoun (which
21
+ thing the pronoun refers to), or state that it is ambiguous.
22
+
23
+ Sentence: The manager sent a message to the secretary, but he didn''t reply
24
+ yet.
25
+
26
+ Options:
27
+
28
+ (A) The secretary didn''t reply yet
29
+
30
+ (B) The manager didn''t reply yet
31
+
32
+ (C) Ambiguous'
33
+ target: (A)
34
+ - input: 'In the following sentences, explain the antecedent of the pronoun (which
35
+ thing the pronoun refers to), or state that it is ambiguous.
36
+
37
+ Sentence: Bailey will plan to meet the director at his office
38
+
39
+ Options:
40
+
41
+ (A) It will be Bailey''s office
42
+
43
+ (B) It will be the director''s office
44
+
45
+ (C) Ambiguous'
46
+ target: (C)
47
+ include: _fewshot_template_yaml
48
+ task: leaderboard_bbh_disambiguation_qa
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/logical_deduction_five_objects.yaml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: logical_deduction_five_objects
2
+ description: 'A logical deduction task which requires deducing the order of a sequence
3
+ of objects.'
4
+ doc_to_choice: ["(A)","(B)","(C)","(D)","(E)"]
5
+ fewshot_config:
6
+ sampler: first_n
7
+ samples:
8
+ - input: 'The following paragraphs each describe a set of three objects arranged
9
+ in a fixed order. The statements are logically consistent within each paragraph.
10
+ In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished
11
+ above Amy. Eli finished below Amy.
12
+
13
+ Options:
14
+
15
+ (A) Amy finished last
16
+
17
+ (B) Eli finished last
18
+
19
+ (C) Eve finished last'
20
+ target: (B)
21
+ - input: 'The following paragraphs each describe a set of three objects arranged
22
+ in a fixed order. The statements are logically consistent within each paragraph.
23
+ On a shelf, there are three books: a white book, a green book, and an orange
24
+ book. The green book is to the right of the white book. The orange book is the
25
+ rightmost.
26
+
27
+ Options:
28
+
29
+ (A) The white book is the leftmost
30
+
31
+ (B) The green book is the leftmost
32
+
33
+ (C) The orange book is the leftmost'
34
+ target: (A)
35
+ - input: 'The following paragraphs each describe a set of three objects arranged
36
+ in a fixed order. The statements are logically consistent within each paragraph.
37
+ On a shelf, there are three books: a red book, a gray book, and a white book.
38
+ The white book is to the left of the gray book. The red book is the second from
39
+ the left.
40
+
41
+ Options:
42
+
43
+ (A) The red book is the leftmost
44
+
45
+ (B) The gray book is the leftmost
46
+
47
+ (C) The white book is the leftmost'
48
+ target: (C)
49
+ include: _fewshot_template_yaml
50
+ task: leaderboard_bbh_logical_deduction_five_objects
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/logical_deduction_seven_objects.yaml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: logical_deduction_seven_objects
2
+ description: 'A logical deduction task which requires deducing the order of a sequence
3
+ of objects.'
4
+ doc_to_choice: ["(A)","(B)","(C)","(D)","(E)","(F)","(G)"]
5
+ fewshot_config:
6
+ sampler: first_n
7
+ samples:
8
+ - input: 'The following paragraphs each describe a set of three objects arranged
9
+ in a fixed order. The statements are logically consistent within each paragraph.
10
+ In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished
11
+ above Amy. Eli finished below Amy.
12
+
13
+ Options:
14
+
15
+ (A) Amy finished last
16
+
17
+ (B) Eli finished last
18
+
19
+ (C) Eve finished last'
20
+ target: (B)
21
+ - input: 'The following paragraphs each describe a set of three objects arranged
22
+ in a fixed order. The statements are logically consistent within each paragraph.
23
+ On a shelf, there are three books: a white book, a green book, and an orange
24
+ book. The green book is to the right of the white book. The orange book is the
25
+ rightmost.
26
+
27
+ Options:
28
+
29
+ (A) The white book is the leftmost
30
+
31
+ (B) The green book is the leftmost
32
+
33
+ (C) The orange book is the leftmost'
34
+ target: (A)
35
+ - input: 'The following paragraphs each describe a set of three objects arranged
36
+ in a fixed order. The statements are logically consistent within each paragraph.
37
+ On a shelf, there are three books: a red book, a gray book, and a white book.
38
+ The white book is to the left of the gray book. The red book is the second from
39
+ the left.
40
+
41
+ Options:
42
+
43
+ (A) The red book is the leftmost
44
+
45
+ (B) The gray book is the leftmost
46
+
47
+ (C) The white book is the leftmost'
48
+ target: (C)
49
+ include: _fewshot_template_yaml
50
+ task: leaderboard_bbh_logical_deduction_seven_objects
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/logical_deduction_three_objects.yaml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: logical_deduction_three_objects
2
+ description: 'A logical deduction task which requires deducing the order of a sequence
3
+ of objects.'
4
+ doc_to_choice: ["(A)","(B)","(C)"]
5
+ fewshot_config:
6
+ sampler: first_n
7
+ samples:
8
+ - input: 'The following paragraphs each describe a set of three objects arranged
9
+ in a fixed order. The statements are logically consistent within each paragraph.
10
+ In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished
11
+ above Amy. Eli finished below Amy.
12
+
13
+ Options:
14
+
15
+ (A) Amy finished last
16
+
17
+ (B) Eli finished last
18
+
19
+ (C) Eve finished last'
20
+ target: (B)
21
+ - input: 'The following paragraphs each describe a set of three objects arranged
22
+ in a fixed order. The statements are logically consistent within each paragraph.
23
+ On a shelf, there are three books: a white book, a green book, and an orange
24
+ book. The green book is to the right of the white book. The orange book is the
25
+ rightmost.
26
+
27
+ Options:
28
+
29
+ (A) The white book is the leftmost
30
+
31
+ (B) The green book is the leftmost
32
+
33
+ (C) The orange book is the leftmost'
34
+ target: (A)
35
+ - input: 'The following paragraphs each describe a set of three objects arranged
36
+ in a fixed order. The statements are logically consistent within each paragraph.
37
+ On a shelf, there are three books: a red book, a gray book, and a white book.
38
+ The white book is to the left of the gray book. The red book is the second from
39
+ the left.
40
+
41
+ Options:
42
+
43
+ (A) The red book is the leftmost
44
+
45
+ (B) The gray book is the leftmost
46
+
47
+ (C) The white book is the leftmost'
48
+ target: (C)
49
+ include: _fewshot_template_yaml
50
+ task: leaderboard_bbh_logical_deduction_three_objects
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/movie_recommendation.yaml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: movie_recommendation
2
+ description: 'Recommend movies similar to the given list of movies.'
3
+ doc_to_choice: ["(A)","(B)","(C)","(D)","(E)","(F)"]
4
+ fewshot_config:
5
+ sampler: first_n
6
+ samples:
7
+ - input: 'Find a movie similar to Star Wars Episode IV - A New Hope, Indiana Jones
8
+ and the Last Crusade, Star Wars Episode V - The Empire Strikes Back, The Big
9
+ Lebowski:
10
+
11
+ Options:
12
+
13
+ (A) Tetsuo
14
+
15
+ (B) the Ironman
16
+
17
+ (C) The Princess Bride
18
+
19
+ (D) The Barkley Marathons The Race That Eats Its Young
20
+
21
+ (E) Bug'
22
+ target: (C)
23
+ - input: 'Find a movie similar to Twister, The Silence of the Lambs, Independence
24
+ Day, Braveheart:
25
+
26
+ Options:
27
+
28
+ (A) They Shoot Horses
29
+
30
+ (B) Don''t They
31
+
32
+ (C) Forrest Gump
33
+
34
+ (D) The Salton Sea
35
+
36
+ (E) Extreme Days'
37
+ target: (C)
38
+ - input: 'Find a movie similar to Minority Report, Total Recall, Inside Out, Forrest
39
+ Gump:
40
+
41
+ Options:
42
+
43
+ (A) Phenomena
44
+
45
+ (B) Lilting
46
+
47
+ (C) Catwoman
48
+
49
+ (D) Edge of Tomorrow'
50
+ target: (D)
51
+ include: _fewshot_template_yaml
52
+ task: leaderboard_bbh_movie_recommendation
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/navigate.yaml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: navigate
2
+ description: 'Given a series of navigation instructions, determine whether one would
3
+ end up back at the starting point.'
4
+ doc_to_choice: ["Yes","No"]
5
+ fewshot_config:
6
+ sampler: first_n
7
+ samples:
8
+ - input: 'If you follow these instructions, do you return to the starting point?
9
+ Turn left. Turn around. Turn left. Take 7 steps. Take 2 steps. Take 4 steps.
10
+ Take 8 steps.
11
+
12
+ Options:
13
+
14
+ - Yes
15
+
16
+ - No'
17
+ target: 'No'
18
+ - input: 'If you follow these instructions, do you return to the starting point?
19
+ Turn around. Take 1 step. Take 6 steps. Turn around. Take 6 steps. Take 9 steps.
20
+ Take 1 step.
21
+
22
+ Options:
23
+
24
+ - Yes
25
+
26
+ - No'
27
+ target: 'No'
28
+ - input: 'If you follow these instructions, do you return to the starting point?
29
+ Always face forward. Take 2 steps right. Take 9 steps left. Take 7 steps right.
30
+
31
+ Options:
32
+
33
+ - Yes
34
+
35
+ - No'
36
+ target: 'Yes'
37
+ include: _fewshot_template_yaml
38
+ task: leaderboard_bbh_navigate
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/object_counting.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: object_counting
2
+ description: 'Questions that involve enumerating objects and asking the model to count
3
+ them.'
4
+ doc_to_choice: ["0","1","2","3","4","5","6","7","8","9","10", "11", "12", "13", "14", "15", "16", "17", "18"]
5
+ fewshot_config:
6
+ sampler: first_n
7
+ samples:
8
+ - input: I have a blackberry, a clarinet, a nectarine, a plum, a strawberry, a banana,
9
+ a flute, an orange, and a violin. How many fruits do I have?
10
+ target: '6'
11
+ - input: I have an orange, a raspberry, two peaches, a blackberry, an apple, a grape,
12
+ a nectarine, and three plums. How many fruits do I have?
13
+ target: '11'
14
+ - input: I have a lettuce head, a head of broccoli, an onion, a stalk of celery,
15
+ two carrots, a garlic, and a yam. How many vegetables do I have?
16
+ target: '8'
17
+ include: _fewshot_template_yaml
18
+ task: leaderboard_bbh_object_counting
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/penguins_in_a_table.yaml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: penguins_in_a_table
2
+ description: 'Answer questions about a table of penguins and their attributes.'
3
+ doc_to_choice: ["(A)","(B)","(C)","(D)","(E)"]
4
+ fewshot_config:
5
+ sampler: first_n
6
+ samples:
7
+ - input: 'Here is a table where the first line is a header and each subsequent line
8
+ is a penguin: name, age, height (cm), weight (kg) Louis, 7, 50, 11 Bernard,
9
+ 5, 80, 13 Vincent, 9, 60, 11 Gwen, 8, 70, 15 For example: the age of Louis
10
+ is 7, the weight of Gwen is 15 kg, the height of Bernard is 80 cm. We now add
11
+ a penguin to the table:
12
+
13
+ James, 12, 90, 12
14
+
15
+ How many penguins are less than 8 years old?
16
+
17
+ Options:
18
+
19
+ (A) 1
20
+
21
+ (B) 2
22
+
23
+ (C) 3
24
+
25
+ (D) 4
26
+
27
+ (E) 5'
28
+ target: (B)
29
+ - input: 'Here is a table where the first line is a header and each subsequent line
30
+ is a penguin: name, age, height (cm), weight (kg) Louis, 7, 50, 11 Bernard,
31
+ 5, 80, 13 Vincent, 9, 60, 11 Gwen, 8, 70, 15 For example: the age of Louis
32
+ is 7, the weight of Gwen is 15 kg, the height of Bernard is 80 cm. Which is
33
+ the youngest penguin?
34
+
35
+ Options:
36
+
37
+ (A) Louis
38
+
39
+ (B) Bernard
40
+
41
+ (C) Vincent
42
+
43
+ (D) Gwen
44
+
45
+ (E) James'
46
+ target: (B)
47
+ - input: 'Here is a table where the first line is a header and each subsequent line
48
+ is a penguin: name, age, height (cm), weight (kg) Louis, 7, 50, 11 Bernard,
49
+ 5, 80, 13 Vincent, 9, 60, 11 Gwen, 8, 70, 15 For example: the age of Louis
50
+ is 7, the weight of Gwen is 15 kg, the height of Bernard is 80 cm. What is
51
+ the name of the second penguin sorted by alphabetic order?
52
+
53
+ Options:
54
+
55
+ (A) Louis
56
+
57
+ (B) Bernard
58
+
59
+ (C) Vincent
60
+
61
+ (D) Gwen
62
+
63
+ (E) James'
64
+ target: (D)
65
+ include: _fewshot_template_yaml
66
+ task: leaderboard_bbh_penguins_in_a_table
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/ruin_names.yaml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: ruin_names
2
+ description: 'Select the humorous edit that ''ruins'' the input movie or musical artist
3
+ name.'
4
+ doc_to_choice: ["(A)","(B)","(C)","(D)","(E)","(F)"]
5
+ fewshot_config:
6
+ sampler: first_n
7
+ samples:
8
+ - input: 'Which of the following is a humorous edit of this artist or movie name:
9
+ ''whitesnake''?
10
+
11
+ Options:
12
+
13
+ (A) whitesnape
14
+
15
+ (B) whitesnapke
16
+
17
+ (C) whitesnuake
18
+
19
+ (D) mwhitesnake'
20
+ target: (A)
21
+ - input: 'Which of the following is a humorous edit of this artist or movie name:
22
+ ''one of our dinosaurs is missing''?
23
+
24
+ Options:
25
+
26
+ (A) ofne of our dinosaurs is missing
27
+
28
+ (B) one af our dinosaurs is missing
29
+
30
+ (C) one of our dinosaurs is pissing
31
+
32
+ (D) one of our dinosaur is missing'
33
+ target: (C)
34
+ - input: 'Which of the following is a humorous edit of this artist or movie name:
35
+ ''counting crows''?
36
+
37
+ Options:
38
+
39
+ (A) countingy crows
40
+
41
+ (B) counting cows
42
+
43
+ (C) courting crows
44
+
45
+ (D) coutnting crows'
46
+ target: (B)
47
+ include: _fewshot_template_yaml
48
+ task: leaderboard_bbh_ruin_names
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/salient_translation_error_detection.yaml ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: salient_translation_error_detection
2
+ description: 'Detect the type of error in an English translation of a German source
3
+ sentence.'
4
+ doc_to_choice: ["(A)","(B)","(C)","(D)","(E)","(F)"]
5
+ fewshot_config:
6
+ sampler: first_n
7
+ samples:
8
+ - input: "The following translations from German to English contain a particular
9
+ error. That error will be one of the following types: Named Entities: An entity
10
+ (names, places, locations, etc.) is changed to a different entity. Numerical
11
+ Values: Numerical values (ordinals or cardinals), dates, and/or units are changed.
12
+ Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are
13
+ changed. Negation or Antonyms: Introduce or remove a negation or change comparatives
14
+ to their antonyms. Facts: Trivial factual errors not pertaining to the above
15
+ classes are introduced in the translations. Dropped Content: A significant clause
16
+ in the translation is removed. Please identify that error. Source: In der Liste
17
+ der Baudenkmale in Lenzen (Elbe) sind alle Baudenkmale der brandenburgischen
18
+ Stadt Lenzen (Elbe) und ihrer Ortsteile aufgelistet.
19
+
20
+ Translation: In the list of architectural monuments in Lenzen all architectural
21
+ monuments of the Brandenburg city of Lenzen and its districts are listed.
22
+
23
+ The translation contains an error pertaining to
24
+
25
+ Options:
26
+
27
+ (A) Modifiers or Adjectives
28
+
29
+ (B) Numerical Values
30
+
31
+ (C) Negation or Antonyms
32
+
33
+ (D) Named Entities
34
+
35
+ (E) Dropped Content
36
+
37
+ (F) Facts"
38
+ target: (D)
39
+ - input: "The following translations from German to English contain a particular
40
+ error. That error will be one of the following types: Named Entities: An entity
41
+ (names, places, locations, etc.) is changed to a different entity. Numerical
42
+ Values: Numerical values (ordinals or cardinals), dates, and/or units are changed.
43
+ Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are
44
+ changed. Negation or Antonyms: Introduce or remove a negation or change comparatives
45
+ to their antonyms. Facts: Trivial factual errors not pertaining to the above
46
+ classes are introduced in the translations. Dropped Content: A significant clause
47
+ in the translation is removed. Please identify that error. Source: Auf dieser
48
+ Seite sind die Baudenkm\xE4ler der oberbayerischen Gro\xDFen Kreisstadt Landsberg
49
+ am Lech zusammengestellt.
50
+
51
+ Translation: On this page are compiled the architectural monuments of the town of
52
+ Landsberg am Lech.
53
+
54
+ The translation contains an error pertaining to
55
+
56
+ Options:
57
+
58
+ (A) Modifiers or Adjectives
59
+
60
+ (B) Numerical Values
61
+
62
+ (C) Negation or Antonyms
63
+
64
+ (D) Named Entities
65
+
66
+ (E) Dropped Content
67
+
68
+ (F) Facts"
69
+ target: (E)
70
+ - input: "The following translations from German to English contain a particular
71
+ error. That error will be one of the following types: Named Entities: An entity
72
+ (names, places, locations, etc.) is changed to a different entity. Numerical
73
+ Values: Numerical values (ordinals or cardinals), dates, and/or units are changed.
74
+ Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are
75
+ changed. Negation or Antonyms: Introduce or remove a negation or change comparatives
76
+ to their antonyms. Facts: Trivial factual errors not pertaining to the above
77
+ classes are introduced in the translations. Dropped Content: A significant clause
78
+ in the translation is removed. Please identify that error. Source: \u0141eba ist
79
+ eine Kleinstadt und ein Badeort im Powiat L\u0119borski der polnischen Woiwodschaft
80
+ Pommern.
81
+
82
+ Translation: Eba is not a small town and seaside resort in the Powiat L\xE9borski
83
+ county of the Pomeranian Voivodeship of Poland.\nThe translation contains an error
84
+ pertaining to
85
+
86
+ Options:
87
+
88
+ (A) Modifiers or Adjectives
89
+
90
+ (B) Numerical Values
91
+
92
+ (C) Negation or Antonyms
93
+
94
+ (D) Named Entities
95
+
96
+ (E) Dropped Content
97
+
98
+ (F) Facts"
99
+ target: (C)
100
+ include: _fewshot_template_yaml
101
+ task: leaderboard_bbh_salient_translation_error_detection
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/snarks.yaml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: snarks
2
+ description: 'Determine which of two sentences is sarcastic.
3
+
4
+
5
+ According to Cambridge University Dictionary, sarcasm is "the use of remarks that
6
+ clearly mean the opposite of what they say, made in order to hurt someone''s feelings
7
+ or to criticize something in a humorous way." Sarcastic sentences often contain
8
+ satirical or ironic utterances, hyperboles, ambivalent or witty remarks.'
9
+ doc_to_choice: ["(A)","(B)"]
10
+ fewshot_config:
11
+ sampler: first_n
12
+ samples:
13
+ - input: 'Which statement is sarcastic?
14
+
15
+ Options:
16
+
17
+ (A) Yes, because having interests and actively researching them is a huge waste
18
+
19
+ (B) Yes, because having interests and actively researching them is a huge deal'
20
+ target: (A)
21
+ - input: 'Which statement is sarcastic?
22
+
23
+ Options:
24
+
25
+ (A) No one is going to disagree with you on this. Avoiding ad hominem attacks
26
+ really help your case
27
+
28
+ (B) No one is going to disagree with you on this. Ad hominem attacks really
29
+ help your case'
30
+ target: (B)
31
+ - input: 'Which statement is sarcastic?
32
+
33
+ Options:
34
+
35
+ (A) Consistency in the league''s punishments? What do you think this is supposed
36
+ to be, politics?
37
+
38
+ (B) Consistency in the league''s punishments? What do you think this is supposed
39
+ to be, moral?'
40
+ target: (A)
41
+ include: _fewshot_template_yaml
42
+ task: leaderboard_bbh_snarks
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/sports_understanding.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: sports_understanding
2
+ description: 'Determine whether an artificially constructed sentence relating to sports
3
+ is plausible or not.'
4
+ doc_to_choice: ["yes","no"]
5
+ fewshot_config:
6
+ sampler: first_n
7
+ samples:
8
+ - input: Is the following sentence plausible? "Bam Adebayo scored a reverse layup
9
+ in the Western Conference Finals."
10
+ target: 'yes'
11
+ - input: Is the following sentence plausible? "Santi Cazorla scored a touchdown."
12
+ target: 'no'
13
+ - input: Is the following sentence plausible? "DeMar DeRozan was called for the
14
+ goal tend."
15
+ target: 'yes'
16
+ include: _fewshot_template_yaml
17
+ task: leaderboard_bbh_sports_understanding
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/temporal_sequences.yaml ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: temporal_sequences
2
+ description: 'Task description: Answer questions about which times certain events
3
+ could have occurred.'
4
+ doc_to_choice: ["(A)","(B)","(C)","(D)"]
5
+ fewshot_config:
6
+ sampler: first_n
7
+ samples:
8
+ - input: 'Today, Emily went to the museum. Between what times could they have gone?
9
+
10
+ We know that:
11
+
12
+ Emily woke up at 1pm.
13
+
14
+ Elizabeth saw Emily reading at the library from 2pm to 4pm.
15
+
16
+ Jessica saw Emily watching a movie at the theater from 4pm to 5pm.
17
+
18
+ Leslie saw Emily waiting at the airport from 5pm to 6pm.
19
+
20
+ William saw Emily buying clothes at the mall from 6pm to 7pm.
21
+
22
+ The museum was closed after 7pm.
23
+
24
+ Between what times could Emily have gone to the museum?
25
+
26
+ Options:
27
+
28
+ (A) 1pm to 2pm
29
+
30
+ (B) 6pm to 7pm
31
+
32
+ (C) 5pm to 6pm
33
+
34
+ (D) 2pm to 4pm'
35
+ target: (A)
36
+ - input: 'Today, Elizabeth went to the amusement park. Between what times could
37
+ they have gone?
38
+
39
+ We know that:
40
+
41
+ Elizabeth woke up at 7am.
42
+
43
+ David saw Elizabeth fixing their computer at the electronic store from 1pm to
44
+ 2pm.
45
+
46
+ Sarah saw Elizabeth playing tennis at the tennis court from 2pm to 3pm.
47
+
48
+ Susan saw Elizabeth walking towards the Statue of Liberty from 3pm to 6pm.
49
+
50
+ Andrew saw Elizabeth taking photos near the Eiffel Tower from 6pm to 9pm.
51
+
52
+ Emily saw Elizabeth getting a coffee at the cafe from 9pm to 10pm.
53
+
54
+ The amusement park was closed after 10pm.
55
+
56
+ Between what times could Elizabeth have gone to the amusement park?
57
+
58
+ Options:
59
+
60
+ (A) 7am to 1pm
61
+
62
+ (B) 9pm to 10pm
63
+
64
+ (C) 1pm to 2pm
65
+
66
+ (D) 3pm to 6pm'
67
+ target: (A)
68
+ - input: 'Today, Tiffany went to the beach. Between what times could they have gone?
69
+
70
+ We know that:
71
+
72
+ Tiffany woke up at 5am.
73
+
74
+ Betty saw Tiffany getting a coffee at the cafe from 5am to 6am.
75
+
76
+ Jessica saw Tiffany working at the office from 6am to 9am.
77
+
78
+ John saw Tiffany stretching at a yoga studio from 9am to 12pm.
79
+
80
+ Sean saw Tiffany sitting on a rooftop from 12pm to 2pm.
81
+
82
+ Sarah saw Tiffany playing tennis at the tennis court from 2pm to 3pm.
83
+
84
+ The beach was closed after 4pm.
85
+
86
+ Between what times could Tiffany have gone to the beach?
87
+
88
+ Options:
89
+
90
+ (A) 9am to 12pm
91
+
92
+ (B) 12pm to 2pm
93
+
94
+ (C) 5am to 6am
95
+
96
+ (D) 3pm to 4pm'
97
+ target: (D)
98
+ include: _fewshot_template_yaml
99
+ task: leaderboard_bbh_temporal_sequences
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/tracking_shuffled_objects_seven_objects.yaml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: tracking_shuffled_objects_seven_objects
2
+ description: 'A task requiring determining the final positions of a set of objects
3
+ given their initial positions and a description of a sequence of swaps.'
4
+ doc_to_choice: ["(A)","(B)","(C)","(D)","(E)","(F)","(G)"]
5
+ fewshot_config:
6
+ sampler: first_n
7
+ samples:
8
+ - input: 'Alice, Bob, and Claire are playing a game. At the start of the game, they
9
+ are each holding a ball: Alice has a yellow ball, Bob has a blue ball, and Claire
10
+ has a pink ball.
11
+
12
+ As the game progresses, pairs of players trade balls. First, Claire and Alice
13
+ swap balls. Then, Alice and Bob swap balls. Finally, Claire and Bob swap balls.
14
+ At the end of the game, Bob has the
15
+
16
+ Options:
17
+
18
+ (A) yellow ball
19
+
20
+ (B) blue ball
21
+
22
+ (C) pink ball'
23
+ target: (A)
24
+ - input: 'Alice, Bob, and Claire are playing a game. At the start of the game, they
25
+ are each holding a ball: Alice has a white ball, Bob has a purple ball, and
26
+ Claire has a pink ball.
27
+
28
+ As the game progresses, pairs of players trade balls. First, Bob and Alice swap
29
+ balls. Then, Bob and Claire swap balls. Finally, Bob and Alice swap balls. At
30
+ the end of the game, Alice has the
31
+
32
+ Options:
33
+
34
+ (A) white ball
35
+
36
+ (B) purple ball
37
+
38
+ (C) pink ball'
39
+ target: (C)
40
+ - input: 'Alice, Bob, and Claire are dancers at a square dance. At the start of
41
+ a song, they each have a partner: Alice is dancing with Lola, Bob is dancing
42
+ with Rodrigo, and Claire is dancing with Patrick.
43
+
44
+ Throughout the song, the dancers often trade partners. First, Alice and Bob
45
+ switch partners. Then, Claire and Bob switch partners. Finally, Bob and Alice
46
+ switch partners. At the end of the dance, Alice is dancing with
47
+
48
+ Options:
49
+
50
+ (A) Lola
51
+
52
+ (B) Rodrigo
53
+
54
+ (C) Patrick'
55
+ target: (C)
56
+ include: _fewshot_template_yaml
57
+ task: leaderboard_bbh_tracking_shuffled_objects_seven_objects
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/tracking_shuffled_objects_three_objects.yaml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_name: tracking_shuffled_objects_three_objects
2
+ description: 'A task requiring determining the final positions of a set of objects
3
+ given their initial positions and a description of a sequence of swaps.'
4
+ doc_to_choice: ["(A)","(B)","(C)"]
5
+ fewshot_config:
6
+ sampler: first_n
7
+ samples:
8
+ - input: 'Alice, Bob, and Claire are playing a game. At the start of the game, they
9
+ are each holding a ball: Alice has a yellow ball, Bob has a blue ball, and Claire
10
+ has a pink ball.
11
+
12
+ As the game progresses, pairs of players trade balls. First, Claire and Alice
13
+ swap balls. Then, Alice and Bob swap balls. Finally, Claire and Bob swap balls.
14
+ At the end of the game, Bob has the
15
+
16
+ Options:
17
+
18
+ (A) yellow ball
19
+
20
+ (B) blue ball
21
+
22
+ (C) pink ball'
23
+ target: (A)
24
+ - input: 'Alice, Bob, and Claire are playing a game. At the start of the game, they
25
+ are each holding a ball: Alice has a white ball, Bob has a purple ball, and
26
+ Claire has a pink ball.
27
+
28
+ As the game progresses, pairs of players trade balls. First, Bob and Alice swap
29
+ balls. Then, Bob and Claire swap balls. Finally, Bob and Alice swap balls. At
30
+ the end of the game, Alice has the
31
+
32
+ Options:
33
+
34
+ (A) white ball
35
+
36
+ (B) purple ball
37
+
38
+ (C) pink ball'
39
+ target: (C)
40
+ - input: 'Alice, Bob, and Claire are dancers at a square dance. At the start of
41
+ a song, they each have a partner: Alice is dancing with Lola, Bob is dancing
42
+ with Rodrigo, and Claire is dancing with Patrick.
43
+
44
+ Throughout the song, the dancers often trade partners. First, Alice and Bob
45
+ switch partners. Then, Claire and Bob switch partners. Finally, Bob and Alice
46
+ switch partners. At the end of the dance, Alice is dancing with
47
+
48
+ Options:
49
+
50
+ (A) Lola
51
+
52
+ (B) Rodrigo
53
+
54
+ (C) Patrick'
55
+ target: (C)
56
+ include: _fewshot_template_yaml
57
+ task: leaderboard_bbh_tracking_shuffled_objects_three_objects
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/bbh_mc/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.'
3
+ doc_to_choice: ["Yes","No"]
4
+ fewshot_config:
5
+ sampler: first_n
6
+ samples:
7
+ - input: 'Question: Fidel tells the truth. Jerry says Fidel tells the truth. Vina
8
+ says Jerry tells the truth. Millicent says Vina lies. Raymond says Millicent
9
+ lies. Does Raymond tell the truth?'
10
+ target: 'Yes'
11
+ - input: 'Question: Kristian lies. Millie says Kristian lies. Maybelle says Millie
12
+ tells the truth. Fidel says Maybelle lies. Leda says Fidel lies. Does Leda tell
13
+ the truth?'
14
+ target: 'Yes'
15
+ - input: 'Question: Kristian tells the truth. Michaela says Kristian lies. Raymond
16
+ says Michaela tells the truth. Osvaldo says Raymond tells the truth. Jamey says
17
+ Osvaldo tells the truth. Does Jamey tell the truth?'
18
+ target: 'No'
19
+ include: _fewshot_template_yaml
20
+ task: leaderboard_bbh_web_of_lies
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/_leaderboard_gpqa.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ group: leaderboard_gpqa
2
+ task:
3
+ - leaderboard_gpqa_diamond
4
+ - leaderboard_gpqa_extended
5
+ - leaderboard_gpqa_main
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/_template_yaml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_path: Idavidrein/gpqa
2
+ output_type: multiple_choice
3
+ process_docs: !function utils.process_docs
4
+ training_split: train
5
+ # Because huggingface dataset only has train split
6
+ validation_split: train
7
+ test_split: null
8
+ doc_to_text: "What is the correct answer to this question:{{Question}}\nChoices:\n(A) {{choice1}}\n(B) {{choice2}}\n(C) {{choice3}}\n(D) {{choice4}}\nAnswer: "
9
+ doc_to_target: answer
10
+ doc_to_choice: ["(A)", "(B)", "(C)", "(D)"]
11
+ num_fewshot: 0
12
+ metric_list:
13
+ - metric: acc_norm
14
+ aggregation: mean
15
+ higher_is_better: true
16
+ metadata:
17
+ version: 1.0
18
+ fewshot_config:
19
+ sampler: first_n
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/gpqa_diamond_zeroshot.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by _generate_configs.py
2
+ dataset_name: gpqa_diamond
3
+ include: _template_yaml
4
+ task: leaderboard_gpqa_diamond
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/gpqa_extended_zeroshot.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by _generate_configs.py
2
+ dataset_name: gpqa_extended
3
+ include: _template_yaml
4
+ task: leaderboard_gpqa_extended
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/gpqa_main_zeroshot.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by _generate_configs.py
2
+ dataset_name: gpqa_main
3
+ include: _template_yaml
4
+ task: leaderboard_gpqa_main
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/gpqa/utils.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import random
2
+ import re
3
+
4
+ import datasets
5
+
6
+
7
+ def preprocess(text):
8
+ if text is None:
9
+ return " "
10
+ text = text.strip()
11
+ text = text.replace(" [title]", ". ")
12
+ text = re.sub("\\[.*?\\]", "", text)
13
+ text = text.replace(" ", " ")
14
+ return text
15
+
16
+
17
+ def process_docs(dataset: datasets.Dataset) -> datasets.Dataset:
18
+ def _process_doc(doc):
19
+ choices = [
20
+ preprocess(doc["Incorrect Answer 1"]),
21
+ preprocess(doc["Incorrect Answer 2"]),
22
+ preprocess(doc["Incorrect Answer 3"]),
23
+ preprocess(doc["Correct Answer"]),
24
+ ]
25
+
26
+ random.shuffle(choices)
27
+ correct_answer_index = choices.index(preprocess(doc["Correct Answer"]))
28
+
29
+ out_doc = {
30
+ "choice1": choices[0],
31
+ "choice2": choices[1],
32
+ "choice3": choices[2],
33
+ "choice4": choices[3],
34
+ "answer": f"({chr(65 + correct_answer_index)})",
35
+ }
36
+ return out_doc
37
+
38
+ return dataset.map(_process_doc)
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/math/_leaderboard_math.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ group: leaderboard_math_hard
2
+ task:
3
+ - leaderboard_math_algebra_hard
4
+ - leaderboard_math_counting_and_prob_hard
5
+ - leaderboard_math_geometry_hard
6
+ - leaderboard_math_intermediate_algebra_hard
7
+ - leaderboard_math_num_theory_hard
8
+ - leaderboard_math_prealgebra_hard
9
+ - leaderboard_math_precalculus_hard
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/math/_template_yaml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset_path: lighteval/MATH-Hard
2
+ process_docs: !function utils.process_docs
3
+ output_type: generate_until
4
+ training_split: train
5
+ test_split: test
6
+ doc_to_text: !function utils.doc_to_text
7
+ process_results: !function utils.process_results
8
+ doc_to_target: "{{answer if few_shot is undefined else solution}}"
9
+ generation_kwargs:
10
+ until:
11
+ - "Problem:"
12
+ do_sample: false
13
+ temperature: 0
14
+ max_gen_toks: 1024
15
+ metric_list:
16
+ - metric: exact_match
17
+ aggregation: mean
18
+ higher_is_better: true
19
+ num_fewshot: 4
20
+ metadata:
21
+ version: 1.0
22
+ dataset_kwargs:
23
+ trust_remote_code: true
24
+ fewshot_config:
25
+ sampler: first_n
26
+ samples: !function utils.list_fewshot_samples
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/math/math_algebra.yaml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ include: _template_yaml
2
+ dataset_name: algebra
3
+ task: leaderboard_math_algebra_hard
scripts/yans/lm-evaluation-harness/lm_eval/tasks/leaderboard/math/math_counting_and_prob.yaml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ include: _template_yaml
2
+ dataset_name: counting_and_probability
3
+ task: leaderboard_math_counting_and_prob_hard