We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e34a157 commit 7d3c7d7Copy full SHA for 7d3c7d7
silnlp/nmt/hugging_face_config.py
@@ -1212,6 +1212,8 @@ def translate(
1212
model.config.max_length = 512
1213
lang_codes: Dict[str, str] = self._config.data["lang_codes"]
1214
1215
+ # The tokenizer isn't wrapped until after calling _create_inference_model,
1216
+ # because the tokenizer's input/output language codes are set there
1217
if isinstance(tokenizer, (NllbTokenizer, NllbTokenizerFast)):
1218
tokenizer = PunctuationNormalizingTokenizer(tokenizer)
1219
0 commit comments