Skip to content

Fix detection of flash-attention 2 and 4#771

Open
BrownianNotion wants to merge 2 commits into
allenai:mainfrom
BrownianNotion:fix-attn-detection
Open

Fix detection of flash-attention 2 and 4#771
BrownianNotion wants to merge 2 commits into
allenai:mainfrom
BrownianNotion:fix-attn-detection

Conversation

@BrownianNotion

Copy link
Copy Markdown

Flash attention 2 still distributes the cute submodule, so the current flash-attention 4 detection will give a false positive and cause later errors. I've changed the detection to match transformers, which has the correct behaviour https://github.com/huggingface/transformers/blob/main/src/transformers/utils/import_utils.py#L1102-L1109

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27bf23376a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/olmo_core/nn/attention/flash_attn_api.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant