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

Migrate multipack to refactored flash attention #1774

Open
5 tasks done
casper-hansen opened this issue Jul 19, 2024 · 1 comment
Open
5 tasks done

Migrate multipack to refactored flash attention #1774

casper-hansen opened this issue Jul 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@casper-hansen
Copy link
Collaborator

⚠️ Please check that this feature request hasn't been suggested before.

  • I searched previous Ideas in Discussions didn't find any similar feature requests.
  • I searched previous Issues didn't find any similar feature requests.

🔖 Feature description

Transformers recently refactored flash attention. At current point in time, axolotl replaces the _get_unpad_data for its multipack feature. Instead, replace the central _get_unpad_data in the new transformers.
huggingface/transformers#31446

✔️ Solution

Replace the long if-statement in monkeypatch/multipack and directly replace the centralized unpad function:

        transformers.modeling_flash_attention_utils._get_unpad_data = (  # pylint: disable=protected-access
            get_unpad_data
        )

❓ Alternatives

No response

📝 Additional Context

No response

Acknowledgements

  • My issue title is concise, descriptive, and in title casing.
  • I have searched the existing issues to make sure this feature has not been requested yet.
  • I have provided enough information for the maintainers to understand and evaluate this request.
@casper-hansen casper-hansen added the enhancement New feature or request label Jul 19, 2024
@winglian
Copy link
Collaborator

this should be fixed with #1773 , I just need to do some manual testing

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

No branches or pull requests

2 participants