TypeError: T5Model.forward() got an unexpected keyword argument 'token_type_ids'

#2
by atasoglu - opened

Hi,

While playing with your model using sentence-transformers, I encountered this issue. Then, as mentioned in the comment here, when I ran the model as shown below, I got the error in the output.

from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("boun-tabi-LMG/TURNA")
tokenizer = AutoTokenizer.from_pretrained("boun-tabi-LMG/TURNA")
inputs = tokenizer("Merhaba dünya!", return_tensors="pt")
outputs = model(**inputs)

Output:

TypeError: T5Model.forward() got an unexpected keyword argument 'token_type_ids'

I wanted to share this with you for your information.

Also, thank you very much for your great contribution to the Turkish language model literature!

boun-tabi-LMG org

Thank you for your valuable feedback on our model! We have made changes in our models accordingly.

gokceuludogan changed discussion status to closed

Sign up or log in to comment