ArthurZ HF Staff commited on
Commit
8c8ace0
·
1 Parent(s): 41a5f5e

Update checkpoint for transformers>=4.29

Browse files

Following the merge of [a PR](https://github.com/huggingface/transformers/pull/24310) in `transformers` it appeared that this model was not properly converted. This PR will fix the inference and was tested using the following script:
```python
>>> from transformers import MarianModel, MarianMTModel
>>> tokenizer = AutoTokenizer.from_pretrained(Helsinki-NLP/opus-mt-tc-big-gmw-gmw)
>>> inputs = tokenizer(' >>en<< Hey how are you?', return_tensors=pt, padding=True)
>>> model = MarianMTModel.from_pretrained(Helsinki-NLP/opus-mt-tc-big-gmw-gmw)
>>> print(tokenizer.batch_decode(model.generate(**inputs)))
['<pad> "H Hey, wie geht es dir?"?"????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????</s>']
```

Files changed (0) hide show