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

Add flash_attention_1/flash_attention_2 support & examples #130

Closed
truskovskiyk opened this issue Apr 7, 2024 · 1 comment · Fixed by #139
Closed

Add flash_attention_1/flash_attention_2 support & examples #130

truskovskiyk opened this issue Apr 7, 2024 · 1 comment · Fixed by #139
Assignees
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request

Comments

@truskovskiyk
Copy link
Contributor

Are we supporting flash_attention feature? https://github.com/Dao-AILab/flash-attention/tree/main

@benjaminye
Copy link
Contributor

This should be a relatively easy implementation. When loading a model with hf transformers, users can pass in attn_implementation="flash_attention_2". Details here

I suggest us:

  1. freeze the version of transformers and trl in dependencies
  2. add flash-attn into dependencies list
  3. have ConfigModel mapping to parameters of the underlying transformers modules

@benjaminye benjaminye added enhancement New feature or request dependencies Pull requests that update a dependency file labels Apr 8, 2024
@benjaminye benjaminye self-assigned this Apr 8, 2024
@benjaminye benjaminye linked a pull request Apr 8, 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
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants