-
Notifications
You must be signed in to change notification settings - Fork 247
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
(Maybe) A bug of huggingface version of OFA Model? #309
Comments
Thanks for your attention. It is not a bug, since the invert operation is in the _expand_mask() function. |
I've noticed this, the _expand_mask function is defined as follows:
Let's consider a 2-dimentional example, if Is this right? Or I make some mistakes? And during experiments, after adding Furthermore, the same problem happens in line 1940 of transformers/src/transformers/models/ofa/modeling_ofa.py: |
Yes, your deduction is right. The returned value is [-inf, -inf, -inf, 0, 0, 0] in the example. |
ummm... you mean the mask tokens should be attended while other tokens should not be attended? |
The original |
Thanks a lot. |
It seems that line 1484 of transformers/src/transformers/models/ofa/modeling_ofa.py has a bug?
I think it should be
expanded_attn_mask = _expand_mask(~attention_mask, dtype, tgt_len=input_shape[-1])
Maybe you miss a "~"?
The text was updated successfully, but these errors were encountered: