Skip to content

Commit

Permalink
a small fix for the NLLB source_language variable
Browse files Browse the repository at this point in the history
  • Loading branch information
aminfarajian committed Jul 17, 2024
1 parent d951257 commit b5dac12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tower_eval/models/seq2seq/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _batch_generate(self, input_lines: List[str]) -> List[str]:
"""
# NLLB requires that source language be passed to the tokenizer and the target language be passed to the model
if self.model_family == "nllb":
self.tokenizer.src_lang = self.source_language
self.tokenizer.src_lang = NLLB_LANGUAGE_CODES[self.source_language]
inputs = self.tokenizer(input_lines, return_tensors="pt", padding=True).to(
"cuda"
)
Expand Down

0 comments on commit b5dac12

Please sign in to comment.