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

[WIP] Add support for flex attention (paged attention) #35419

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

blzheng
Copy link

@blzheng blzheng commented Dec 26, 2024

What does this PR do?

This pr integrates PyTorch Flex attention (paged attention) into Llama and GPT-J (greedy search).

TODOs

  • Add flex attention for first token. The current implementation uses SDPA for first token and flex attention for next token
  • Address re-compile issues to eliminate hard-coded logic
  • Extend support to beam search

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.

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.

2 participants