"archive-del/install.ps1" did not exist on "345684d58d99e945112c9c7d9b6fa45960734565"
Commit 173b2bc3 authored by Baber's avatar Baber
Browse files

Merge branch 'main' into humaneval

# Conflicts:
#	lm_eval/api/task.py
parents 74344829 bb098f13
dataset_name: zul
include: afrimmlu_common_yaml
task: afrimmlu_direct_zul
from lm_eval.utils import weighted_f1_score
def doc_to_choice(doc):
choices = eval(doc["choices"])
return choices
def doc_to_text(doc):
output = """You are a highly knowledgeable and intelligent artificial intelligence
model answers multiple-choice questions about {subject}
Question: {question}
Choices:
A: {choice1}
B: {choice2}
C: {choice3}
D: {choice4}
Answer: """
choices = eval(doc["choices"])
text = output.format(
subject=doc["subject"],
question=doc["question"],
choice1=choices[0],
choice2=choices[1],
choice3=choices[2],
choice4=choices[3],
)
return text
lm_eval --model hf \
--model_args pretrained=masakhane/African-ultrachat-alpaca \
--tasks afrimmlu_direct_amh,afrimmlu_direct_eng,afrimmlu_direct_ewe,afrimmlu_direct_fra,afrimmlu_direct_hau,afrimmlu_direct_ibo,afrimmlu_direct_kin,afrimmlu_direct_lin,afrimmlu_direct_lug,afrimmlu_direct_orm,afrimmlu_direct_sna,afrimmlu_direct_sot,afrimmlu_direct_twi,afrimmlu_direct_wol,afrimmlu_direct_xho,afrimmlu_direct_yor,afrimmlu_direct_zul \
--device cuda:0 \
--batch_size 1 \
--num_fewshot 0 \
--verbosity DEBUG \
--wandb_args project=afrimmlu
group:
- afrimmlu_translate
task: null
dataset_path: masakhane/afrimmlu-translate-test
dataset_name: null
output_type: multiple_choice
test_split: test
doc_to_text: !function utils.doc_to_text
doc_to_target: "{{['A', 'B', 'C', 'D'].index(answer)}}"
doc_to_choice: !function utils.doc_to_choice
should_decontaminate: true
doc_to_decontamination_query: "Question: {{question}}\nAnswer:"
metric_list:
- metric: f1
aggregation: !function utils.weighted_f1_score
# aggregation: mean
average: weighted
hf_evaluate: true
higher_is_better: True
ignore_case: true
ignore_punctuation: true
regexes_to_ignore:
- ","
- "\\$"
- metric: acc
aggregation: mean
higher_is_better: true
ignore_case: true
ignore_punctuation: true
regexes_to_ignore:
- ","
- "\\$"
metadata:
version: 1.0
dataset_name: amh
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_amh
dataset_name: eng
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_eng
dataset_name: ewe
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_ewe
dataset_name: fra
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_fra
dataset_name: hau
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_hau
dataset_name: ibo
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_ibo
dataset_name: kin
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_kin
dataset_name: lin
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_lin
dataset_name: lug
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_lug
dataset_name: orm
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_orm
dataset_name: sna
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_sna
dataset_name: sot
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_sot
dataset_name: swa
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_swa
dataset_name: twi
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_twi
dataset_name: wol
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_wol
dataset_name: xho
include: afrimmlu_common_translate_yaml
task: afrimmlu_translate_xho
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