Model problem - translate
#5
by
miroslavjaros
- opened
I can not use this model. There are Hallucination. I tried use example
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"Podívej se na své kalhoty! Zapni si je na zip.",
"Mrzí mě, že Tom odchází."
]
model_name = "Helsinki-NLP/opus-mt-tc-big-ces_slk-en"
tokenizer = MarianTokenizer.from_pretrained(model_name)
model = MarianMTModel.from_pretrained(model_name)
translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
for t in translated:
print( tokenizer.decode(t, skip_special_tokens=True) )
expected output:
Look at your pants, zip them up.
I'm sorry Tom's leaving.
But it is not working.