-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Custom 4D tensor caused shape mismatch error #35290
Comments
Hey! are you running the script with |
Can you explain why it does not support custom mask? Also, is there any better way to implementing packing, e.g. letting the mask to be |
Try to add a dimension with torch.unsqueeze() for broadcasting the expanded_attn_mask. |
Can I take this issue up? |
hey @ArthurZucker , i was having a look at this and i think i ended up resolving it , in the process , so i raised a PR regarding the same . would really appreciate if you could take a look at it and respond at the earliest . |
System Info
transformers
version: 4.46.3Who can help?
@ArthurZucker
Can you take a look at this? I want to pack the samples using the custom attention mask. However, when using a mask of shape [1, 1, seq_len, seq_len], it raises the following error
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Expected behavior
Run without error.
The text was updated successfully, but these errors were encountered: