Spaces:
Runtime error
Runtime error
File size: 1,351 Bytes
b0314f9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
from dataclasses import dataclass
@dataclass
class Task:
code: str
name: str
metric: str
higher_is_better: bool = True
num_fewshot: int = 0
class Lambada(Task):
code = "lambada_vi"
name = "LAMBADA"
metric = "ppl"
higher_is_better = False
num_fewshot = 0
class Arc(Task):
code = "arc_vi"
name = "ARC"
metric = "acc_norm"
higher_is_better = True
num_fewshot = 25
class HellaSwag(Task):
code = "hellaswag_vi"
name = "HellaSwag"
metric = "acc_norm"
higher_is_better = True
num_fewshot = 10
class MMLU(Task):
code = "mmlu_vi"
name = "MMLU"
metric = "acc_norm"
higher_is_better = True
num_fewshot = 5
class TruthfulQA(Task):
code = "truthfulqa_vi"
name = "TruthfulQA"
metric = "mc2"
higher_is_better = True
num_fewshot = 0
class Grade12Exams(Task):
code = "grade_12_exams_vi"
name = "Grade 12 Exams"
metric = "acc_norm"
higher_is_better = True
num_fewshot = 5
class IWSLT2023_en_vi(Task):
code = "translation_vi"
name = "IWSLT 2023 en-vi"
metric = "bleu"
higher_is_better = True
num_fewshot = 0
TASKS = [Lambada, Arc, HellaSwag, MMLU, TruthfulQA, Grade12Exams, IWSLT2023_en_vi]
TASK_CODES = [task.code for task in TASKS]
TASK_TO_METRIC = {task.code: task.metric for task in TASKS} |