Skip to content

[Bugfix] gemma[2,3] interleaved attention when sliding window is disabled #17180

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

Merged
merged 3 commits into from
Apr 26, 2025

Conversation

heheda12345
Copy link
Collaborator

@heheda12345 heheda12345 commented Apr 25, 2025

I get the following errors when running VLLM_ATTENTION_BACKEND=FLASHINFER vllm serve google/gemma-2-2b-it

ERROR 04-25 02:35:23 [core.py:395]   File “***/vllm/model_executor/models/gemma2.py", line 149, in __init__
ERROR 04-25 02:35:23 [core.py:395]     config.interleaved_sliding_window is not None)
ERROR 04-25 02:35:23 [core.py:395]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 04-25 02:35:23 [core.py:395]   File “***/lib/python3.11/site-packages/transformers/configuration_utils.py", line 210, in __getattribute__
ERROR 04-25 02:35:23 [core.py:395]     return super().__getattribute__(key)
ERROR 04-25 02:35:23 [core.py:395]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 04-25 02:35:23 [core.py:395] AttributeError: 'Gemma2Config' object has no attribute 'interleaved_sliding_window'

This PR fix it

Signed-off-by: Chen Zhang <zhangch99@outlook.com>
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.

🚀

@heheda12345 heheda12345 requested a review from WoosukKwon April 25, 2025 10:24
@DarkLight1337 DarkLight1337 requested a review from mgoin April 25, 2025 13:58
@DarkLight1337
Copy link
Member

Reference Slack discussion: https://vllm-dev.slack.com/archives/C07QCGVDNUF/p1744754229620969

Signed-off-by: Chen Zhang <zhangch99@outlook.com>
Signed-off-by: Chen Zhang <zhangch99@outlook.com>
@kylehh
Copy link
Contributor

kylehh commented Apr 25, 2025

Confirmed this fix works for both v0 and v1 engine for following test
VLLM_ATTENTION_BACKEND=FLASHINFER VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 python3 examples/offline_inference/vision_language.py --model gemma3

Copy link
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

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

Thank you!

@mgoin mgoin added bug Something isn't working ready ONLY add when PR is ready to merge/full CI is needed labels Apr 25, 2025
@mgoin mgoin enabled auto-merge (squash) April 25, 2025 19:57
@vllm-bot vllm-bot merged commit 8de2901 into vllm-project:main Apr 26, 2025
60 of 62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 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.

5 participants