Skip to content

Fix hard-coded parameter name in gemma3n.py#27946

Merged
ywang96 merged 8 commits intovllm-project:mainfrom
seungduk-yanolja:gemma3n
Nov 6, 2025
Merged

Fix hard-coded parameter name in gemma3n.py#27946
ywang96 merged 8 commits intovllm-project:mainfrom
seungduk-yanolja:gemma3n

Conversation

@seungduk-yanolja
Copy link
Contributor

@seungduk-yanolja seungduk-yanolja commented Nov 2, 2025

Purpose

When Gemma3nCausalLM is extracted from gemma-3n models, the hardcoded parameter name causes an error.

Test Plan

Tested both extracted Gemma3nCausalLM and google/gemma-3n-e4b-it

Test Result

Both worked


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@github-actions
Copy link

github-actions bot commented Nov 2, 2025

👋 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 ask your reviewers to trigger select CI tests on top of fastcheck CI.

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.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

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 correctly addresses an issue with a hard-coded parameter name in gemma3n.py by dynamically determining the model prefix. This makes the KV cache sharing mechanism more robust across different Gemma-3n model variations. The overall logic is sound. I have one suggestion to further improve the robustness by failing fast in case of an unexpected prefix format, rather than relying on a default value which could lead to subtle issues.

@seungduk-yanolja
Copy link
Contributor Author

cc @NickLucche

@NickLucche NickLucche added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 4, 2025
Copy link
Collaborator

@NickLucche NickLucche left a comment

Choose a reason for hiding this comment

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

Looks correct, thanks for contributing @seungduk-yanolja !
Please check the DCO errors in CI

seungduk-yanolja and others added 2 commits November 4, 2025 11:25
Signed-off-by: Seungduk Kim <seungduk.kim@yanolja.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Seungduk Kim <seungduk.kim@yanolja.com>
seungduk-yanolja and others added 2 commits November 4, 2025 11:28
Signed-off-by: Seungduk Kim <seungduk.kim@yanolja.com>
@seungduk-yanolja
Copy link
Contributor Author

Can someone tell me how to merge this?

@ywang96 ywang96 merged commit 201dc98 into vllm-project:main Nov 6, 2025
53 checks passed
@ywang96
Copy link
Member

ywang96 commented Nov 6, 2025

Can someone tell me how to merge this?

I think @NickLucche simply forgot to turn on auto-merge. I just merged it.

ZhengHongming888 pushed a commit to ZhengHongming888/vllm that referenced this pull request Nov 8, 2025
Signed-off-by: Seungduk Kim <seungduk.kim@yanolja.com>
Signed-off-by: Biswa Panda <biswa.panda@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Biswa Panda <biswa.panda@gmail.com>
Co-authored-by: Nicolò Lucchesi <nlucches@redhat.com>
devpatelio pushed a commit to SumanthRH/vllm that referenced this pull request Nov 29, 2025
Signed-off-by: Seungduk Kim <seungduk.kim@yanolja.com>
Signed-off-by: Biswa Panda <biswa.panda@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Biswa Panda <biswa.panda@gmail.com>
Co-authored-by: Nicolò Lucchesi <nlucches@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants