chen459664 commited on
Commit
4f918cc
·
verified ·
1 Parent(s): 1f57542

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-harness/lm_eval/tasks/afrixnli/lai prompt/translate/afrixnli_manual_translate_yor.yaml +4 -0
  2. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_fra.yaml +15 -0
  3. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_ibo.yaml +15 -0
  4. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_sot.yaml +15 -0
  5. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_swa.yaml +15 -0
  6. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_twi.yaml +15 -0
  7. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_yaml +27 -0
  8. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/utils.py +19 -0
  9. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_ewe.yaml +4 -0
  10. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_ibo.yaml +4 -0
  11. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_kin.yaml +4 -0
  12. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_lin.yaml +4 -0
  13. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_lug.yaml +4 -0
  14. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_orm.yaml +4 -0
  15. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_sna.yaml +4 -0
  16. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_sot.yaml +4 -0
  17. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_swa.yaml +4 -0
  18. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_twi.yaml +4 -0
  19. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_wol.yaml +4 -0
  20. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_xho.yaml +4 -0
  21. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_yaml +31 -0
  22. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_yor.yaml +4 -0
  23. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_zul.yaml +4 -0
  24. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/utils.py +6 -0
  25. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_amh.yaml +8 -0
  26. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_hau.yaml +8 -0
  27. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_ibo.yaml +8 -0
  28. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_kin.yaml +8 -0
  29. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_lin.yaml +8 -0
  30. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_lug.yaml +8 -0
  31. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_orm.yaml +8 -0
  32. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_sot.yaml +8 -0
  33. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_swa.yaml +8 -0
  34. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_wol.yaml +8 -0
  35. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_4/afrixnli_translate_fra.yaml +9 -0
  36. lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_4/afrixnli_translate_orm.yaml +8 -0
  37. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_2/xx.py +5 -0
  38. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_3/afrisenti_amh.yaml +7 -0
  39. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_3/afrisenti_ibo.yaml +7 -0
  40. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_3/afrisenti_tir.yaml +7 -0
  41. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_kin.yaml +6 -0
  42. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_orm.yaml +6 -0
  43. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_pcm.yaml +6 -0
  44. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_swa.yaml +6 -0
  45. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_tir.yaml +6 -0
  46. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_tso.yaml +6 -0
  47. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_twi.yaml +6 -0
  48. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_yor.yaml +6 -0
  49. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/utils.py +1 -0
  50. lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/xx.py +5 -0
lm-evaluation-harness/lm_eval/tasks/afrixnli/lai prompt/translate/afrixnli_manual_translate_yor.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: yor
3
+ include: afrixnli_manual_translate_yaml
4
+ task: afrixnli_manual_translate_yor
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_fra.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: fra
3
+ doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
4
+ in the following premise and hypothesis. The answer should be exact entailment,
5
+ contradiction, or neutral.
6
+
7
+
8
+ Premise: {premise}
9
+
10
+ Hypothesis: {hypothesis}
11
+
12
+
13
+ Is it entailment, contradiction, or neutral?'
14
+ include: afrixnli_translate_yaml
15
+ task: afrixnli_translate_fra_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_ibo.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: ibo
3
+ doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
4
+ in the following premise and hypothesis. The answer should be exact entailment,
5
+ contradiction, or neutral.
6
+
7
+
8
+ Premise: {premise}
9
+
10
+ Hypothesis: {hypothesis}
11
+
12
+
13
+ Is it entailment, contradiction, or neutral?'
14
+ include: afrixnli_translate_yaml
15
+ task: afrixnli_translate_ibo_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_sot.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: sot
3
+ doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
4
+ in the following premise and hypothesis. The answer should be exact entailment,
5
+ contradiction, or neutral.
6
+
7
+
8
+ Premise: {premise}
9
+
10
+ Hypothesis: {hypothesis}
11
+
12
+
13
+ Is it entailment, contradiction, or neutral?'
14
+ include: afrixnli_translate_yaml
15
+ task: afrixnli_translate_sot_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_swa.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: swa
3
+ doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
4
+ in the following premise and hypothesis. The answer should be exact entailment,
5
+ contradiction, or neutral.
6
+
7
+
8
+ Premise: {premise}
9
+
10
+ Hypothesis: {hypothesis}
11
+
12
+
13
+ Is it entailment, contradiction, or neutral?'
14
+ include: afrixnli_translate_yaml
15
+ task: afrixnli_translate_swa_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_twi.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: twi
3
+ doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
4
+ in the following premise and hypothesis. The answer should be exact entailment,
5
+ contradiction, or neutral.
6
+
7
+
8
+ Premise: {premise}
9
+
10
+ Hypothesis: {hypothesis}
11
+
12
+
13
+ Is it entailment, contradiction, or neutral?'
14
+ include: afrixnli_translate_yaml
15
+ task: afrixnli_translate_twi_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/afrixnli_translate_yaml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tag: afrixnli_tt_tasks
2
+ dataset_path: masakhane/afrixnli-translate-test
3
+ dataset_name: null
4
+ output_type: multiple_choice
5
+ test_split: test
6
+ fewshot_split: test
7
+ doc_to_target: !function utils.doc_to_target
8
+ doc_to_choice:
9
+ - "entailment"
10
+ - "neutral"
11
+ - "contradiction"
12
+ should_decontaminate: true
13
+ doc_to_decontamination_query: premise
14
+ metric_list:
15
+ - metric: f1
16
+ aggregation: !function utils.weighted_f1_score
17
+ average: weighted
18
+ higher_is_better: True
19
+ ignore_case: true
20
+ ignore_punctuation: true
21
+ - metric: acc
22
+ aggregation: mean
23
+ higher_is_better: true
24
+ ignore_case: true
25
+ ignore_punctuation: true
26
+ metadata:
27
+ version: 1.0
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_1/utils.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from lm_eval.utils import weighted_f1_score
2
+
3
+
4
+ def doc_to_text(doc):
5
+ output = """Please identify whether the premise entails or contradicts the hypothesis in the following premise
6
+ and hypothesis. The answer should be exact entailment, contradiction, or neutral.
7
+
8
+ Premise: {premise}
9
+ Hypothesis: {hypothesis}
10
+
11
+ Is it entailment, contradiction, or neutral?"""
12
+
13
+ text = output.format(premise=doc["premise"], hypothesis=doc["hypothesis"])
14
+ return text
15
+
16
+
17
+ def doc_to_target(doc):
18
+ replacements = {0: "entailment", 1: "neutral", 2: "contradiction"}
19
+ return replacements[doc["label"]]
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_ewe.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: ewe
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_ewe_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_ibo.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: ibo
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_ibo_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_kin.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: kin
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_kin_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_lin.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: lin
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_lin_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_lug.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: lug
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_lug_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_orm.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: orm
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_orm_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_sna.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: sna
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_sna_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_sot.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: sot
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_sot_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_swa.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: swa
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_swa_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_twi.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: twi
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_twi_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_wol.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: wol
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_wol_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_xho.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: xho
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_xho_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tag: afrixnli_tt_tasks
2
+ dataset_path: masakhane/afrixnli-translate-test
3
+ dataset_name: null
4
+ output_type: multiple_choice
5
+ test_split: test
6
+ fewshot_split: test
7
+ doc_to_text: "{{premise}}\nQuestion: {{hypothesis}} True, False, or Neither?\nAnswer:"
8
+ # True = entailment
9
+ # False = contradiction
10
+ # Neither = neutral
11
+ doc_to_target: !function utils.doc_to_target
12
+ doc_to_choice:
13
+ - "True"
14
+ - "Neither"
15
+ - "False"
16
+ should_decontaminate: true
17
+ doc_to_decontamination_query: premise
18
+ metric_list:
19
+ - metric: f1
20
+ aggregation: !function utils.weighted_f1_score
21
+ average: weighted
22
+ higher_is_better: True
23
+ ignore_case: true
24
+ ignore_punctuation: true
25
+ - metric: acc
26
+ aggregation: mean
27
+ higher_is_better: true
28
+ ignore_case: true
29
+ ignore_punctuation: true
30
+ metadata:
31
+ version: 1.0
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_yor.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: yor
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_yor_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/afrixnli_translate_zul.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: zul
3
+ include: afrixnli_translate_yaml
4
+ task: afrixnli_translate_zul_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_2/utils.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from lm_eval.utils import weighted_f1_score
2
+
3
+
4
+ def doc_to_target(doc):
5
+ replacements = {0: "True", 1: "Neither", 2: "False"}
6
+ return replacements[doc["label"]]
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_amh.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: amh
3
+ doc_to_text: "Given the following premise and hypothesis in Amharic, identify if the\
4
+ \ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
5
+ \ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
6
+ \ \nHypothesis: {{hypothesis}}"
7
+ include: afrixnli_translate_yaml
8
+ task: afrixnli_translate_amh_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_hau.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: hau
3
+ doc_to_text: "Given the following premise and hypothesis in Hausa, identify if the\
4
+ \ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
5
+ \ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
6
+ \ \nHypothesis: {{hypothesis}}"
7
+ include: afrixnli_translate_yaml
8
+ task: afrixnli_translate_hau_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_ibo.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: ibo
3
+ doc_to_text: "Given the following premise and hypothesis in Igbo, identify if the\
4
+ \ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
5
+ \ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
6
+ \ \nHypothesis: {{hypothesis}}"
7
+ include: afrixnli_translate_yaml
8
+ task: afrixnli_translate_ibo_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_kin.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: kin
3
+ doc_to_text: "Given the following premise and hypothesis in Kinyarwanda, identify\
4
+ \ if the premise entails, contradicts, or is neutral towards the hypothesis. Please\
5
+ \ respond with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
6
+ \ \nHypothesis: {{hypothesis}}"
7
+ include: afrixnli_translate_yaml
8
+ task: afrixnli_translate_kin_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_lin.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: lin
3
+ doc_to_text: "Given the following premise and hypothesis in Lingala, identify if the\
4
+ \ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
5
+ \ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
6
+ \ \nHypothesis: {{hypothesis}}"
7
+ include: afrixnli_translate_yaml
8
+ task: afrixnli_translate_lin_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_lug.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: lug
3
+ doc_to_text: "Given the following premise and hypothesis in Luganda, identify if the\
4
+ \ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
5
+ \ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
6
+ \ \nHypothesis: {{hypothesis}}"
7
+ include: afrixnli_translate_yaml
8
+ task: afrixnli_translate_lug_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_orm.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: orm
3
+ doc_to_text: "Given the following premise and hypothesis in Oromo, identify if the\
4
+ \ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
5
+ \ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
6
+ \ \nHypothesis: {{hypothesis}}"
7
+ include: afrixnli_translate_yaml
8
+ task: afrixnli_translate_orm_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_sot.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: sot
3
+ doc_to_text: "Given the following premise and hypothesis in Sesotho, identify if the\
4
+ \ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
5
+ \ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
6
+ \ \nHypothesis: {{hypothesis}}"
7
+ include: afrixnli_translate_yaml
8
+ task: afrixnli_translate_sot_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_swa.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: swa
3
+ doc_to_text: "Given the following premise and hypothesis in Swahili, identify if the\
4
+ \ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
5
+ \ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
6
+ \ \nHypothesis: {{hypothesis}}"
7
+ include: afrixnli_translate_yaml
8
+ task: afrixnli_translate_swa_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_3/afrixnli_translate_wol.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: wol
3
+ doc_to_text: "Given the following premise and hypothesis in Wolof, identify if the\
4
+ \ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
5
+ \ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
6
+ \ \nHypothesis: {{hypothesis}}"
7
+ include: afrixnli_translate_yaml
8
+ task: afrixnli_translate_wol_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_4/afrixnli_translate_fra.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: fra
3
+ doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
4
+ \ the French language.\nAnalyze the premise and hypothesis given in French, and\
5
+ \ determine the relationship between them.\n Respond with one of the following options:\
6
+ \ 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}} \nHypothesis:\
7
+ \ {{hypothesis}}"
8
+ include: afrixnli_translate_yaml
9
+ task: afrixnli_translate_fra_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrixnli/translate/prompt_4/afrixnli_translate_orm.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: orm
3
+ doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
4
+ \ the Oromo language.\nAnalyze the premise and hypothesis given in Oromo, and determine\
5
+ \ the relationship between them.\n Respond with one of the following options: 'entailment',\
6
+ \ 'contradiction', or 'neutral'. \n\nPremise: {{premise}} \nHypothesis: {{hypothesis}}"
7
+ include: afrixnli_translate_yaml
8
+ task: afrixnli_translate_orm_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_2/xx.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from datasets import load_dataset
2
+
3
+
4
+ data = load_dataset("HausaNLP/AfriSenti-Twitter", "yor", trust_remote_code=True)
5
+ print(data)
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_3/afrisenti_amh.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: amh
3
+ doc_to_text: "You are an assistant able to detect sentiments in tweets. \n\nGiven\
4
+ \ the sentiment labels Neutral, Positive or Negative; what is the sentiment of the\
5
+ \ Amharic statement below? Return only the labels. \n\ntext: {{tweet}} \nlabel:"
6
+ include: afrisenti
7
+ task: afrisenti_amh_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_3/afrisenti_ibo.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: ibo
3
+ doc_to_text: "You are an assistant able to detect sentiments in tweets. \n\nGiven\
4
+ \ the sentiment labels Neutral, Positive or Negative; what is the sentiment of the\
5
+ \ Igbo statement below? Return only the labels. \n\ntext: {{tweet}} \nlabel:"
6
+ include: afrisenti
7
+ task: afrisenti_ibo_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_3/afrisenti_tir.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: tir
3
+ doc_to_text: "You are an assistant able to detect sentiments in tweets. \n\nGiven\
4
+ \ the sentiment labels Neutral, Positive or Negative; what is the sentiment of the\
5
+ \ Tigrinya statement below? Return only the labels. \n\ntext: {{tweet}} \nlabel:"
6
+ include: afrisenti
7
+ task: afrisenti_tir_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_kin.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: kin
3
+ doc_to_text: "Label the following text as Neutral, Positive, or Negative. Provide\
4
+ \ only the label as your response. \n\ntext: {{tweet}} \nlabel: "
5
+ include: afrisenti
6
+ task: afrisenti_kin_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_orm.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: orm
3
+ doc_to_text: "Label the following text as Neutral, Positive, or Negative. Provide\
4
+ \ only the label as your response. \n\ntext: {{tweet}} \nlabel: "
5
+ include: afrisenti
6
+ task: afrisenti_orm_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_pcm.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: pcm
3
+ doc_to_text: "Label the following text as Neutral, Positive, or Negative. Provide\
4
+ \ only the label as your response. \n\ntext: {{tweet}} \nlabel: "
5
+ include: afrisenti
6
+ task: afrisenti_pcm_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_swa.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: swa
3
+ doc_to_text: "Label the following text as Neutral, Positive, or Negative. Provide\
4
+ \ only the label as your response. \n\ntext: {{tweet}} \nlabel: "
5
+ include: afrisenti
6
+ task: afrisenti_swa_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_tir.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: tir
3
+ doc_to_text: "Label the following text as Neutral, Positive, or Negative. Provide\
4
+ \ only the label as your response. \n\ntext: {{tweet}} \nlabel: "
5
+ include: afrisenti
6
+ task: afrisenti_tir_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_tso.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: tso
3
+ doc_to_text: "Label the following text as Neutral, Positive, or Negative. Provide\
4
+ \ only the label as your response. \n\ntext: {{tweet}} \nlabel: "
5
+ include: afrisenti
6
+ task: afrisenti_tso_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_twi.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: twi
3
+ doc_to_text: "Label the following text as Neutral, Positive, or Negative. Provide\
4
+ \ only the label as your response. \n\ntext: {{tweet}} \nlabel: "
5
+ include: afrisenti
6
+ task: afrisenti_twi_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/afrisenti_yor.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: yor
3
+ doc_to_text: "Label the following text as Neutral, Positive, or Negative. Provide\
4
+ \ only the label as your response. \n\ntext: {{tweet}} \nlabel: "
5
+ include: afrisenti
6
+ task: afrisenti_yor_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/utils.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from lm_eval.utils import weighted_f1_score
lm-evaluation-harness/lm_eval/tasks/afrobench/afrisenti/prompt_4/xx.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from datasets import load_dataset
2
+
3
+
4
+ data = load_dataset("masakhane/afrisenti", "orm", trust_remote_code=True)
5
+ print(data)