Skip to content

[SpecDecode] Fix Draft model proposer#7230

Merged
MengqingCao merged 1 commit intovllm-project:mainfrom
MengqingCao:teest
Mar 14, 2026
Merged

[SpecDecode] Fix Draft model proposer#7230
MengqingCao merged 1 commit intovllm-project:mainfrom
MengqingCao:teest

Conversation

@MengqingCao
Copy link
Copy Markdown
Collaborator

@MengqingCao MengqingCao commented Mar 13, 2026

What this PR does / why we need it?

This pr fix the Unified draft parallel feature.

  1. In Draft model proposer, there are exceed 1 attention layers in target model, thus removing the assertion on layer number.
  2. we should get block size through draft_attn_groups instead of attn_metadata_builder after 0.17.0.
  3. attn_update_stack_num_spec_norm shouldn't be done when unified draft parallel is enabled

How was this patch tested?

Test pass with tests/e2e/singlecard/spec_decode/test_v1_spec_decode.py::test_parallel_drafting_acceptance, which is already included in CI

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 introduces a preliminary patch within the vllm_ascend worker module. It primarily adds a direct vllm import and provides a placeholder, no-operation implementation for batch_memcpy within vllm.v1.worker.mamba_utils. This change appears to be a foundational step, possibly for testing or future integration of Ascend-specific memory operations, without introducing functional changes at this stage.

Highlights

  • New vllm import: Added a direct import for the top-level vllm package in the patch file.
  • Placeholder batch_memcpy: Introduced a no-operation batch_memcpy function and assigned it to vllm.v1.worker.mamba_utils.batch_memcpy, likely serving as a temporary stub for Ascend integration.

🧠 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
  • vllm_ascend/patch/worker/patch_triton.py
    • Imported the top-level vllm package.
    • Defined a no-op batch_memcpy function.
    • Patched vllm.v1.worker.mamba_utils.batch_memcpy with the new no-op function.
Activity
  • No specific activity (comments, reviews, or progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

gemini-code-assist[bot]

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@MengqingCao MengqingCao changed the title test patch [SpecDecode] Fix Draft model proposer Mar 13, 2026
@MengqingCao MengqingCao added ready read for review ready-for-test start test by label for PR labels Mar 13, 2026
@MengqingCao MengqingCao marked this pull request as ready for review March 13, 2026 14:50
@MengqingCao MengqingCao requested a review from wangxiyuan as a code owner March 13, 2026 14:50
@MengqingCao MengqingCao added ready read for review and removed ready read for review labels Mar 13, 2026
Signed-off-by: MengqingCao <cmq0113@163.com>
@MengqingCao
Copy link
Copy Markdown
Collaborator Author

CI failed due to unrelated reasons, let's merge quickly to unblock CI
https://github.com/vllm-project/vllm-ascend/actions/runs/23078413556/job/67055332044?pr=7230

@MengqingCao MengqingCao merged commit e7aa2c2 into vllm-project:main Mar 14, 2026
49 of 52 checks passed
Nagisa125 pushed a commit to starmountain1997/vllm-ascend that referenced this pull request Mar 17, 2026
### What this PR does / why we need it?
This pr fix the Unified draft parallel feature. 
1. In Draft model proposer, there are exceed 1 attention layers in
target model, thus removing the assertion on layer number.
2. we should get block size through `draft_attn_groups` instead of
`attn_metadata_builder` after 0.17.0.
3. `attn_update_stack_num_spec_norm` shouldn't be done when unified
draft parallel is enabled

### How was this patch tested?
Test pass with
`tests/e2e/singlecard/spec_decode/test_v1_spec_decode.py::test_parallel_drafting_acceptance`,
which is already included in CI

- vLLM version: v0.17.0
- vLLM main:
vllm-project/vllm@4034c3d

Signed-off-by: MengqingCao <cmq0113@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready read for review ready-for-test start test by label for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants