diff --git a/dl_translate/_translation_model.py b/dl_translate/_translation_model.py index d81e2ed..9e3b3ac 100644 --- a/dl_translate/_translation_model.py +++ b/dl_translate/_translation_model.py @@ -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)