Skip to content

Commit 79ad836

Browse files
Translation literals (#356)
Thanks to all the authors of these translations, Leire A, Daphné Cette, Erik K and his friend, Philipp S, Gloria, Emily Hofer, Garreth L, Luigi Serra, Toshihiro, Ivar F, Magdalena, Guilherme, Vinko S, Hynek, Agustín, Anton, Abubakar Abid, for giving us a hand with them! --------- Co-authored-by: Clémentine Fourrier <[email protected]>
1 parent bee221d commit 79ad836

File tree

4 files changed

+689
-138
lines changed

4 files changed

+689
-138
lines changed

src/lighteval/tasks/multilingual/tasks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,8 @@
463463
Language.TURKISH,
464464
Language.VIETNAMESE,
465465
Language.CHINESE,
466-
# Optionally: Haitian, Quechu
466+
Language.HAITIAN,
467+
Language.QUECHUA,
467468
]
468469
for formulation in [MCFFormulation(), CFFormulation(), HybridFormulation()]
469470
]

src/lighteval/tasks/templates/nli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ def prompt_fn(line: dict, task_name: str):
244244
choices_str = f"{translation_literals.comma}{translation_literals.word_space}".join(rearanged_labales[:-1])
245245
hypothesis = f"{hypothesis.rstrip(PUNCT)}{translation_literals.sentence_space}{choices_str}{translation_literals.word_space}{translation_literals.or_word}{translation_literals.word_space}{rearanged_labales[-1]}{translation_literals.question_mark}"
246246

247+
# (hynky1999): Ideally we would not compute logprobs of the Yes/No/Also in CF fomulation. However as of right now lighteval doesn't allow to
248+
# use multi-context.
247249
row = {
248250
"instruction": input_data.get("instruction", ""),
249251
"premise": premise,

0 commit comments

Comments
 (0)