Skip to content

Conversation

@shen-shanshan
Copy link
Collaborator

@shen-shanshan shen-shanshan commented Aug 25, 2025

What this PR does / why we need it?

Replace apply_grammar_bitmask() method with that in vllm to avoid maintenance.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the code to use the apply_grammar_bitmask function from the upstream vLLM library, removing the local implementation. This is a positive change that reduces code duplication and improves maintainability. The implementation correctly handles the necessary tensor manipulations, such as moving logits to the CPU and handling dtype conversions, which were previously part of the removed method. The changes appear correct and beneficial.

@github-actions
Copy link

👋 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.

@shen-shanshan shen-shanshan marked this pull request as draft August 29, 2025 07:38
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

…ntenance

Signed-off-by: shen-shanshan <467638484@qq.com>
@shen-shanshan shen-shanshan added ready read for review ready-for-test start test by label for PR and removed ready read for review ready-for-test start test by label for PR labels Oct 23, 2025
@shen-shanshan
Copy link
Collaborator Author

CC @wangxiyuan

@wangxiyuan wangxiyuan merged commit e3c1ac8 into vllm-project:main Oct 23, 2025
89 checks passed
shaopeng-666 pushed a commit to shaopeng-666/vllm-ascend that referenced this pull request Oct 23, 2025
…t in vllm to avoid maintenance (vllm-project#2524)

### What this PR does / why we need it?
Replace `apply_grammar_bitmask()` method with that in vllm to avoid
maintenance.

- vLLM version: v0.11.0rc3
- vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.0

Signed-off-by: shen-shanshan <467638484@qq.com>
Signed-off-by: shaopeng666 <shaopeng666@noreply.gitcode.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