-
Notifications
You must be signed in to change notification settings - Fork 454
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
Causal attention hard-codes lower triangular matrices as uint8 #636
Comments
Actually comes from https://github.com/huggingface/transformers/blob/4d10ffd50614ebcdfe7e99c0092740f0f7234923/src/transformers/models/gpt2/modeling_gpt2.py#L130 . I have no idea why |
My best guess would be because it's very old code and PyTorch did not support |
Closing as in any case pytorch represents torch.bool on a byte (pytorch/pytorch#41571 (comment)), and ONNX as well (checking the initializer ByteSize()). |
System Info
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Not necessarily a bug per se. Likely due to e.g. https://github.com/huggingface/transformers/blob/4d10ffd50614ebcdfe7e99c0092740f0f7234923/src/transformers/models/gpt2/modeling_gpt2.py#L196 . Similar for other models.
Expected behavior
/
The text was updated successfully, but these errors were encountered: