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

Bark model Flash Attention 2 Enabling to pass on check_device_map parameter to super() #29357

Merged

Conversation

damithsenanayake
Copy link
Contributor

What does this PR do?

when using flash_attention_2 with bark model, the _check_and_enable_flash_attn_2() method receives a 'check_device_map' paramter from modeling_utils.py. However it's not passed on to the super and fails execution. The fix simply grabs it from the caller and passes it on to the super.

Fixes # 29332

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@sanchit-gandhi

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

LGMT let's make sure CI's are green !

@damithsenanayake
Copy link
Contributor Author

LGMT let's make sure CI's are green !

Checked! Style fixup was needed and done.

@amyeroberts
Copy link
Collaborator

@damithsenanayake Thanks for working on this!

Did you happen to rebase? If so, did you force push? At the moment the branch commit history shows lots of unrelated commits from main, which looks like rebasing without force pushing (this is necessary as rebasing is effectively rewriting the branch history)

@damithsenanayake
Copy link
Contributor Author

@damithsenanayake Thanks for working on this!

Did you happen to rebase? If so, did you force push? At the moment the branch commit history shows lots of unrelated commits from main, which looks like rebasing without force pushing (this is necessary as rebasing is effectively rewriting the branch history)

Hi, thanks for the clarification. I have rebased the dev branch and git push --force . I still see the unrelated commits (although they seem to be already merged in the upstream main). should I create a separate PR with the most recent fetch/pull?

@damithsenanayake
Copy link
Contributor Author

@damithsenanayake Thanks for working on this!
Did you happen to rebase? If so, did you force push? At the moment the branch commit history shows lots of unrelated commits from main, which looks like rebasing without force pushing (this is necessary as rebasing is effectively rewriting the branch history)

Hi, thanks for the clarification. I have rebased the dev branch and git push --force . I still see the unrelated commits (although they seem to be already merged in the upstream main). should I create a separate PR with the most recent fetch/pull?

NVM I had to resync the PR. Thanks for your help! :)

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for adding!

@amyeroberts amyeroberts merged commit 9a3f4d4 into huggingface:main Mar 11, 2024
17 checks passed
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.

None yet

3 participants