-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Deutsch to English Translation Model by Google doesn't work anymore... #7761
Comments
Do you want to post the full error message? (and the information asked in the issue template) |
These models have been added last months, so they shouldn't have changed much. The full issue template filled would be very helpful here! |
This is the error: Using exactly the code appearing in the link I passed: from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("google/bert2bert_L-24_wmt_de_en", pad_token="<pad>", eos_token="</s>", bos_token="<s>")
model = AutoModelForSeq2SeqLM.from_pretrained("google/bert2bert_L-24_wmt_de_en")
sentence = "Willst du einen Kaffee trinken gehen mit mir?"
input_ids = tokenizer(sentence, return_tensors="pt", add_special_tokens=False).input_ids
output_ids = model.generate(input_ids)[0]
print(tokenizer.decode(output_ids, skip_special_tokens=True)) Transformers version: 3.1.0 |
@patrickvonplaten what should be done here? The |
Then how could I load it? |
Hey @alexvaca0 - the google/encoder-decoder models were released in transformers 3.2.0 => so you will have to update your transformers version for it :-) It should then work as expected. |
Ohhh so sorry, my bad :( Thanks a lot for the quick response! :) |
I think this may not have been fully resolved? I'm getting a simmilar error:
python = 3.76, torch==1.4.0, transformers==3.2.0 |
Hi @ezekielbarnett could you open a new issue and fill the issue template? A reproducible code example would be particularly helpful here. |
Hi, the model in: https://huggingface.co/google/bert2bert_L-24_wmt_de_en doesn't work anymore. It seems that the library has changed a lot since the model was added, therefore the classes themselves seem to have changed in names etc.
Can anyone tell me how could I apply with the current library functionality?
Thanks in advance! :)
The text was updated successfully, but these errors were encountered: