Update checkpoint for transformers>=4.29
#9
by
ArthurZ
HF staff
- opened
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-it-en')
>>> inputs = tokenizer("EHI!Impariamo insieme", return_tensors="pt", padding=True)
>>> model = MarianMTModel.from_pretrained('Helsinki-NLP/opus-mt-tc-big-it-en')
>>> print(tokenizer.batch_decode(model.generate(**inputs)))
["<pad> EHI!Let's Learn Together</s>"]