[Main2Main] Upgrade to newest vLLM 0205#6511
[Main2Main] Upgrade to newest vLLM 0205#6511Meihan-chen wants to merge 12 commits intovllm-project:mainfrom
Conversation
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. |
Summary of ChangesHello @Meihan-chen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on upgrading the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request upgrades the vLLM dependency to version 0.15.0. While the compatibility fixes are correct, the implementation introduces significant code duplication by repeating the same conditional import logic across multiple files. My review includes a high-severity comment recommending a refactoring to centralize this logic for better maintainability.
As per the repository's style guide, here are suggestions for the pull request title and summary:
Suggested PR Title:
[Main2Main][Compatibility][Upgrade] Upgrade vLLM dependency to 0.15.0Suggested PR Summary:
### What this PR does / why we need it?
This PR upgrades the core vLLM dependency to version `v0.15.0`. To ensure compatibility, this change adapts the codebase to account for the new location of the `Attention` and `MLAAttention` classes in the updated vLLM API.
The versioning policy documentation has also been updated to reflect this change.
### Does this PR introduce _any_ user-facing change?
No, this is an internal dependency upgrade and should not introduce any user-facing changes.
### How was this patch tested?
CI tests should be run to verify compatibility with the new vLLM version and ensure there are no regressions.| from vllm_ascend.utils import vllm_version_is | ||
|
|
||
| if vllm_version_is("v0.15.0"): | ||
| from vllm.attention.layer import Attention, MLAAttention # type: ignore | ||
| else: | ||
| from vllm.model_executor.layers.attention import Attention, MLAAttention |
There was a problem hiding this comment.
This conditional import logic for Attention and MLAAttention is duplicated across multiple files in this PR (e.g., tests/ut/quantization/test_modelslim_config.py, vllm_ascend/compilation/npugraph_ex_passes/graphex_qknorm_rope_fusion_pass.py, etc.). This harms maintainability, as any future compatibility changes will need to be updated in many places.
To improve this, I recommend centralizing this version-dependent import logic. You could create a new compatibility module (e.g., vllm_ascend/compatibility.py) that handles these imports and then import from that module in all the necessary files.
For example, vllm_ascend/compatibility.py could contain:
from .utils import vllm_version_is
if vllm_version_is("v0.15.0"):
from vllm.attention.layer import Attention, MLAAttention # type: ignore
else:
from vllm.model_executor.layers.attention import Attention, MLAAttention
__all__ = ["Attention", "MLAAttention"]Then, in this file and others, you could replace the conditional import block with a single line:
from vllm_ascend.compatibility import Attention, MLAAttention
This would make the code cleaner and easier to maintain.
b19fddf to
18b7654
Compare
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
fa4ee20 to
e4cc3d4
Compare
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
71044e1 to
e24e92e
Compare
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
1764198 to
4c1d16d
Compare
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com> Signed-off-by: hfadzxy <starmoon_zhang@163.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
4c1d16d to
2da910c
Compare
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
This reverts commit 2a826b5.
c9d0c6e to
b3af86c
Compare
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Thanks for your contribution! It looks like the DCO check failed. Please follow this guide to fix it: https://docs.vllm.ai/projects/ascend/en/latest/developer_guide/contribution/index.html |
What this PR does / why we need it?
Does this PR introduce any user-facing change?
How was this patch tested?