Skip to content

Commit

Permalink
Fix for nllb (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
Galoist authored Sep 2, 2024
1 parent 27c5e9d commit d9f1fcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dl_translate/_translation_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def translate(
batch_size = len(text)

generation_options.setdefault(
"forced_bos_token_id", self._tokenizer.lang_code_to_id[target]
"forced_bos_token_id", self._tokenizer.convert_tokens_to_ids(target)
)
generation_options.setdefault("max_new_tokens", 512)

Expand Down

0 comments on commit d9f1fcd

Please sign in to comment.