Update checkpoint for transformers>=4.29

#7
by ArthurZ HF staff - opened
Language Technology Research Group at the University of Helsinki 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 MarianModel, MarianMTModel
>>> tokenizer = AutoTokenizer.from_pretrained('Helsinki-NLP/opus-mt-tc-big-ar-en')
>>> inputs = tokenizer("يا!دعونا نتعلم معا", return_tensors="pt", padding=True)
>>> model = MarianMTModel.from_pretrained('Helsinki-NLP/opus-mt-tc-big-ar-en')
>>> print(tokenizer.batch_decode(model.generate(**inputs)))
["<pad> Hey! Let's learn together</s>"]

HI, i have tried test script but still output is random words. for above arabic text im getting
[' Salafist Salafist Salafist Salafist Salafist Salafist Salafist Salafist Salafist Salafist Salafist Salafist Salafist Salafist Salafist ']

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment