Skip to content

Fix Qwen3.5-Next RMSNormGated Initialization Error on TPU#37229

Closed
jrplatin wants to merge 1 commit intovllm-project:mainfrom
jrplatin:jacobplatin/fix-tpu-qwen3.5-next
Closed

Fix Qwen3.5-Next RMSNormGated Initialization Error on TPU#37229
jrplatin wants to merge 1 commit intovllm-project:mainfrom
jrplatin:jacobplatin/fix-tpu-qwen3.5-next

Conversation

@jrplatin
Copy link
Copy Markdown
Contributor

@jrplatin jrplatin commented Mar 16, 2026

Purpose

Similar to #33501 -- fixes the following error seen on TPU:

# CMD
vllm serve Qwen/Qwen3.5-397B-A17B-FP8 --tensor-parallel-size=8 --kv-cache-dtype=fp8 --limit-mm-per-prompt '{"image": 0, "video": 0}'

# Error
(EngineCore pid=3259063) ERROR 03-16 20:56:27 [core.py:1099]   File "/mnt/disks/jacobplatin/vllm/vllm/model_executor/models/qwen3_5.py", line 245, in __init__
(EngineCore pid=3259063) ERROR 03-16 20:56:27 [core.py:1099]     self.linear_attn = Qwen3_5GatedDeltaNet(
(EngineCore pid=3259063) ERROR 03-16 20:56:27 [core.py:1099]                        ^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=3259063) ERROR 03-16 20:56:27 [core.py:1099]   File "/mnt/disks/jacobplatin/vllm/vllm/model_executor/models/qwen3_next.py", line 504, in __init__
(EngineCore pid=3259063) ERROR 03-16 20:56:27 [core.py:1099]     device=current_platform.current_device(),
(EngineCore pid=3259063) ERROR 03-16 20:56:27 [core.py:1099]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=3259063) ERROR 03-16 20:56:27 [core.py:1099] TypeError: 'NoneType' object is not callable

Test Plan

Test Result


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.

@jrplatin jrplatin requested a review from sighingnow as a code owner March 16, 2026 21:27
@github-actions
Copy link
Copy Markdown

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

🚀

@mergify mergify Bot added the qwen Related to Qwen models label Mar 16, 2026
Copy link
Copy Markdown
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 resolves a TypeError encountered during the initialization of RMSNormGated for the Qwen3.5-Next model on TPUs. The issue stems from current_platform.current_device() returning None on this platform, leading to a crash. By removing the explicit device argument from the RMSNormGated constructor, the code now relies on PyTorch's default device handling, which is a more portable and robust approach. This change correctly fixes the initialization error without introducing side effects on other platforms.

@yaochengji
Copy link
Copy Markdown
Collaborator

Is making TPUPlatform support current_device() an alternative way to fix this issue?

@jrplatin
Copy link
Copy Markdown
Contributor Author

@yaochengji Yep good idea and will patch in TPU Inference, thanks!

@jrplatin jrplatin closed this Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qwen Related to Qwen models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants