Commit 601be343 authored by Baber's avatar Baber
Browse files

Merge branch 'main' into feature/eval_from_config

parents d0884a96 68c3a811
# Generated by utils.py
dataset_name: sna
doc_to_text: "Given the following premise and hypothesis in chiShona, identify if\
\ the premise entails, contradicts, or is neutral towards the hypothesis. Please\
\ respond with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
\ \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_sna_prompt_3
# Generated by utils.py
dataset_name: sot
doc_to_text: "Given the following premise and hypothesis in Sesotho, identify if the\
\ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
\ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
\ \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_sot_prompt_3
# Generated by utils.py
dataset_name: swa
doc_to_text: "Given the following premise and hypothesis in Swahili, identify if the\
\ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
\ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
\ \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_swa_prompt_3
# Generated by utils.py
dataset_name: twi
doc_to_text: "Given the following premise and hypothesis in Twi, identify if the premise\
\ entails, contradicts, or is neutral towards the hypothesis. Please respond with\
\ exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}} \n\
Hypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_twi_prompt_3
# Generated by utils.py
dataset_name: wol
doc_to_text: "Given the following premise and hypothesis in Wolof, identify if the\
\ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
\ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
\ \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_wol_prompt_3
# Generated by utils.py
dataset_name: xho
doc_to_text: "Given the following premise and hypothesis in isiXhosa, identify if\
\ the premise entails, contradicts, or is neutral towards the hypothesis. Please\
\ respond with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
\ \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_xho_prompt_3
tag: afrixnli_tt_tasks
dataset_path: masakhane/afrixnli-translate-test
dataset_name: null
output_type: multiple_choice
test_split: test
fewshot_split: test
doc_to_target: !function utils.doc_to_target
doc_to_choice:
- "entailment"
- "neutral"
- "contradiction"
should_decontaminate: true
doc_to_decontamination_query: premise
metric_list:
- metric: f1
aggregation: !function utils.weighted_f1_score
average: weighted
higher_is_better: True
ignore_case: true
ignore_punctuation: true
- metric: acc
aggregation: mean
higher_is_better: true
ignore_case: true
ignore_punctuation: true
metadata:
version: 1.0
# Generated by utils.py
dataset_name: yor
doc_to_text: "Given the following premise and hypothesis in Yoruba, identify if the\
\ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
\ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
\ \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_yor_prompt_3
# Generated by utils.py
dataset_name: zul
doc_to_text: "Given the following premise and hypothesis in Zulu, identify if the\
\ premise entails, contradicts, or is neutral towards the hypothesis. Please respond\
\ with exact 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
\ \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_zul_prompt_3
from lm_eval.utils import weighted_f1_score
def doc_to_text(doc):
output = """You are an NLP assistant whose purpose is to solve Natural Language Inference (NLI) problems
Please identify whether the premise entails or contradicts the hypothesis in the following premise
and hypothesis. The answer should be exact entailment, contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?"""
text = output.format(premise=doc["premise"], hypothesis=doc["hypothesis"])
return text
def doc_to_target(doc):
replacements = {0: "entailment", 1: "neutral", 2: "contradiction"}
return replacements[doc["label"]]
# Generated by utils.py
dataset_name: amh
doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
\ the Amharic language.\nAnalyze the premise and hypothesis given in Amharic, and\
\ determine the relationship between them.\n Respond with one of the following options:\
\ 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}} \nHypothesis:\
\ {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_amh_prompt_4
# Generated by utils.py
dataset_name: ewe
doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
\ the Ewe language.\nAnalyze the premise and hypothesis given in Ewe, and determine\
\ the relationship between them.\n Respond with one of the following options: 'entailment',\
\ 'contradiction', or 'neutral'. \n\nPremise: {{premise}} \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_ewe_prompt_4
# Generated by utils.py
dataset_name: fra
doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
\ the French language.\nAnalyze the premise and hypothesis given in French, and\
\ determine the relationship between them.\n Respond with one of the following options:\
\ 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}} \nHypothesis:\
\ {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_fra_prompt_4
# Generated by utils.py
dataset_name: hau
doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
\ the Hausa language.\nAnalyze the premise and hypothesis given in Hausa, and determine\
\ the relationship between them.\n Respond with one of the following options: 'entailment',\
\ 'contradiction', or 'neutral'. \n\nPremise: {{premise}} \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_hau_prompt_4
# Generated by utils.py
dataset_name: ibo
doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
\ the Igbo language.\nAnalyze the premise and hypothesis given in Igbo, and determine\
\ the relationship between them.\n Respond with one of the following options: 'entailment',\
\ 'contradiction', or 'neutral'. \n\nPremise: {{premise}} \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_ibo_prompt_4
# Generated by utils.py
dataset_name: kin
doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
\ the Kinyarwanda language.\nAnalyze the premise and hypothesis given in Kinyarwanda,\
\ and determine the relationship between them.\n Respond with one of the following\
\ options: 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
\ \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_kin_prompt_4
# Generated by utils.py
dataset_name: lin
doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
\ the Lingala language.\nAnalyze the premise and hypothesis given in Lingala, and\
\ determine the relationship between them.\n Respond with one of the following options:\
\ 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}} \nHypothesis:\
\ {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_lin_prompt_4
# Generated by utils.py
dataset_name: lug
doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
\ the Luganda language.\nAnalyze the premise and hypothesis given in Luganda, and\
\ determine the relationship between them.\n Respond with one of the following options:\
\ 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}} \nHypothesis:\
\ {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_lug_prompt_4
# Generated by utils.py
dataset_name: orm
doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
\ the Oromo language.\nAnalyze the premise and hypothesis given in Oromo, and determine\
\ the relationship between them.\n Respond with one of the following options: 'entailment',\
\ 'contradiction', or 'neutral'. \n\nPremise: {{premise}} \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_orm_prompt_4
# Generated by utils.py
dataset_name: sna
doc_to_text: "You are an expert in Natural Language Inference (NLI) specializing in\
\ the chiShona language.\nAnalyze the premise and hypothesis given in chiShona,\
\ and determine the relationship between them.\n Respond with one of the following\
\ options: 'entailment', 'contradiction', or 'neutral'. \n\nPremise: {{premise}}\
\ \nHypothesis: {{hypothesis}}"
include: afrixnli_translate_yaml
task: afrixnli_translate_sna_prompt_4
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment