Skip to content

[Bugfix] detect alibi and revert to FA2 #15231

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No 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? No Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

tjohnson31415
Copy link
Contributor

@tjohnson31415 tjohnson31415 commented Mar 20, 2025

On Hopper, Flash Attention 3 is enabled by default (since the v0.7.0 release), but FA3 does not support ALiBi positional encodings. This PR will revert to FA2 if alibi_slopes are passed in to FlashAttentionBackend.

In the v0.8.1 release, the error when attempting to use a model with FA3 with ALiBi (such as bigscience/bloom-1b1) is:

RuntimeError: If cu_seqlens_k is passed in, then page table is not supported

Now there is change in vllm_flash_attn that will raise an AssertionError if alibi is used with FA3. This improves the error message, but the server would still fail to come up. With this PR, vLLM will fall back to FA2 instead of erroring.

FIX #13810

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

Copy link

mergify bot commented Mar 20, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @tjohnson31415.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

Copy link
Collaborator

@LucasWilkinson LucasWilkinson left a comment

Choose a reason for hiding this comment

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

LGTM, good catch, thanks for the contribution!

@LucasWilkinson LucasWilkinson enabled auto-merge (squash) March 20, 2025 16:29
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 20, 2025
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
auto-merge was automatically disabled March 20, 2025 18:37

Head branch was pushed to by a user without write access

@vllm-bot vllm-bot merged commit 0032903 into vllm-project:main Mar 21, 2025
33 of 36 checks passed
@tjohnson31415 tjohnson31415 deleted the fa3-alibi branch March 24, 2025 16:48
erictang000 pushed a commit to erictang000/vllm that referenced this pull request Mar 25, 2025
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
lulmer pushed a commit to lulmer/vllm that referenced this pull request Apr 7, 2025
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
nishith-fujitsu pushed a commit to nishith-fujitsu/vllm that referenced this pull request Apr 9, 2025
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Usage]: vllm v0.7.2 can not support baichuan2 model
4 participants