Update checkpoint for transformers>=4.29

#1
by ArthurZ HF Staff - opened
ArthurZ changed pull request status to merged
Helsinki-NLP Research Group org

Automatically merging the PR.

Helsinki-NLP Research Group org

Following the merge of a PR in transformers it appeared that this model was not properly converted. This PR will fix the inference and was tested using the following script:

>>> from transformers import AutoTokenizer, MarianMTModel
>>> tokenizer = AutoTokenizer.from_pretrained('Helsinki-NLP/opus-mt-tc-big-he-itc')
>>> inputs = tokenizer("ื”ื™ื™!ื‘ื•ืื• ื ืœืžื“ ื‘ื™ื—ื“", return_tensors="pt", padding=True)
>>> model = MarianMTModel.from_pretrained('Helsinki-NLP/opus-mt-tc-big-he-itc')
>>> print(tokenizer.batch_decode(model.generate(**inputs)))
['<pad> Vamos aprender juntos!</s>']

Sign up or log in to comment