-
Notifications
You must be signed in to change notification settings - Fork 6.6k
do not automatically enable xformers #1640
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
Conversation
| # 3. Feed-forward | ||
| self.norm3 = nn.LayerNorm(dim) | ||
|
|
||
| # if xformers is installed try to use memory_efficient_attention by default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not automatically enable xformers for three reasons:
-
- It's not PyTorch-like API. PyTorch doesn't by default enable all the fastest options available
-
- We allocate GPU memory before the user even does
.to("cuda")
- We allocate GPU memory before the user even does
-
- This behavior is not consistent with cases where xformers is not installed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related issues: #1565
#1344 (comment)
anton-l
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very much agree with the reasoning, thanks for the update!
|
The documentation is not available anymore as the PR was closed or merged. |
…remove_automatic_xformers
* do not automatically enable xformers * uP
* do not automatically enable xformers * uP
* do not automatically enable xformers * uP
* do not automatically enable xformers * uP
No description provided.