Is this model ready to use?
#1
by
xezpeleta
- opened
Hi!
I've just tried to use this model with the following code:
from transformers import MarianMTModel, MarianTokenizer
from transformers import AutoTokenizer
from transformers import AutoModelForSeq2SeqLM
src_text = ["this is a test"]
model_name = "HiTZ/mt-hitz-en-eu"
tokenizer = MarianTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
print([tokenizer.decode(t, skip_special_tokens=True) for t in translated])
The model returns random words:
Thanks!
Hi!
Try using the recommended transformer versions established in the Model card: transformers-4.12.3, 4.15.0 and 4.26.1
Hope this is helpful!
Thanks!
I've downgraded transformers from 4.41.2 to 4.26.1 and it works like a charm!
xezpeleta
changed discussion status to
closed