Skip to content
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

Make Flash attention configurable #44

Open
theissenhelen opened this issue Sep 16, 2024 · 1 comment · May be fixed by #47
Open

Make Flash attention configurable #44

theissenhelen opened this issue Sep 16, 2024 · 1 comment · May be fixed by #47
Assignees
Labels
enhancement New feature or request

Comments

@theissenhelen
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

The current implementation causes issues when loading old model checkpoints during inference as it is not clear whether flash attention was used or not.

Describe the solution you'd like

A class MultiHeadSelfAttention and FlashMultiHeadSelfAttention which inherits from the former, but makes use of flash attention. This should be set by the user in the config.

Describe alternatives you've considered

No response

Additional context

No response

Organisation

ECMWF

@theissenhelen theissenhelen added the enhancement New feature or request label Sep 16, 2024
@theissenhelen theissenhelen self-assigned this Sep 16, 2024
@clessig
Copy link

clessig commented Sep 16, 2024

The flash attention has useful options like softcapping. Might be worth exposing them.

@theissenhelen theissenhelen linked a pull request Sep 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants