-
Notifications
You must be signed in to change notification settings - Fork 72
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
forward() got an unexpected keyword argument 'cross_attn_head_mask' #18
Comments
I am having the same issue on latest version of transformers(4.8.0), a workaround would be to downgrade transformers to 4.4.2 and it'll works. But still needs fixing. |
It's enough to downgrade to 4.6.1. Version 4.4.2 doesn't have this patch: huggingface/transformers#10651 |
I still hit this error. If I downgrade transformers to 4.6.1, then I get an error |
This is actually not a small thing. Here's what I think is going on: First, check out this before that PR,
and I think |
@sam-writer Thanks, I got it working by installing fastt5 on a clean conda slate |
|
I get the same error with the newest verion of transfroemrs and 4.6.1 does not work at all. |
Also with 4.4.2 it does not work at all. So no way to get it to work now. |
Yeah, I'm having the same problem, I can't get it to work at all. I set up a huggingface space to demonstrate the issue: https://huggingface.co/spaces/aseifert/fastt5 (this demo app will show the output of Underlying code: https://huggingface.co/spaces/aseifert/fastt5/blob/main/app.py |
@aseifert you forgot to import from transformers import AutoTokenizer I tried it on my machine and it gives the following output without any error.
the output is similar to the output of the original model. |
@Ki6an thank you so much for looking into this! Indeed I forgot to include the AutoTokenizer. However, adding it doesn't resolve the problem in the huggingface space environment (cf. links above). It's weird … |
@aseifert I assume the huggingface space is using a version of transformers > 4.6.1, which fastt5 can't work with currently I think there are 2 issues here, @Ki6an :
FWIW, I am currently working on a fix so that fastt5 will be able to support transformers v4.7.0 and above |
@sam-writer I pinned transformers to 4.6.1 in the requirements, and I check this by writing the output of very good to hear that you are working on fixing fastt5 for higher versions of transformers, thanks for that! in my case however, something is off even with 4.6.1 |
@sam-writer You are right, it does look like something specific to the env. I opened an issue here huggingface/transformers#14604 Thanks! |
@sam-writer @aseifert I was able to fix this issue, the changes to transformers were made right after I created a PR. and that was causing the issue. it's a simple one-line fix 97d5505 haven't tested it enough, let me know if you face any issues. |
@Ki6an I will check it out. I was expecting there to also be changes to |
@sam-writer we could add these additional params (while exporting) if they improve the speed or accuracy. |
It would probably be good to have some script for testing the accuracy of the ONNX version... I think I saw something like this in the TensorRT demo from NVIDIA |
I am still experiencing this problem |
The text was updated successfully, but these errors were encountered: