Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opus-mt-tc-big-tr-en doesn't work properly. #96

Open
bleriot14 opened this issue Nov 27, 2023 · 0 comments
Open

opus-mt-tc-big-tr-en doesn't work properly. #96

bleriot14 opened this issue Nov 27, 2023 · 0 comments

Comments

@bleriot14
Copy link

Hello, I added the code below. It returns strange output. Do you know how can I make work this model right ?

from transformers import AutoTokenizer, MarianMTModel
tokenizer = AutoTokenizer.from_pretrained('2_models\opus-mt-tc-big-tr-en')
inputs = tokenizer("Hey!Birlikte öğrenelim", return_tensors="pt", padding=True)
model = MarianMTModel.from_pretrained('2_models\opus-mt-tc-big-tr-en')
print(tokenizer.batch_decode(model.generate(**inputs)))

it returns "[' connectconnectconneectconnectconnectconnectconnectconnectconnectcoconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnectconnect']"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant