From b5146fa981e2057c0e31eeb6e0b20c6396166636 Mon Sep 17 00:00:00 2001 From: tzhouam Date: Thu, 3 Sep 2026 15:15:59 +0800 Subject: [PATCH] rebase: rename Qwen3-Omni audio attention projection to qkv_proj vLLM 0.29 renamed the audio attention projection from qkv to qkv_proj, and its stacked mapping now rewrites checkpoint q_proj/k_proj/v_proj onto that name. Omni subclasses the upstream audio attention and mirrors its __init__ to add quant_config, so it kept building self.qkv and weight loading died with "There is no module or parameter named layers.0.self_attn.qkv_proj in Qwen3OmniMoeAudioEncoder ... available: self_attn.qkv.weight". The inherited forward calls self.qkv_proj too, so the old name broke both paths. This is a second, independent cause behind the Omni Accuracy Test failure: the shutdown-timeout signature also appeared in that job, which is why the earlier pass attributed it solely to the shutdown fix. Both builds 3009 and 3010 carry this weight-loading error, so it predates that pass. Not reproducible locally: it needs the 30B checkpoint. The rename mirrors upstream Qwen3OmniMoeAudioAttention exactly, and the 20 Qwen3-Omni unit tests still pass. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_0146Xu5Sgj4vXxLxvLjV5YPj Signed-off-by: tzhouam --- .../models/qwen3_omni/qwen3_omni_moe_thinker.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vllm_omni/model_executor/models/qwen3_omni/qwen3_omni_moe_thinker.py b/vllm_omni/model_executor/models/qwen3_omni/qwen3_omni_moe_thinker.py index 16b9d020d..8e0e7deb3 100644 --- a/vllm_omni/model_executor/models/qwen3_omni/qwen3_omni_moe_thinker.py +++ b/vllm_omni/model_executor/models/qwen3_omni/qwen3_omni_moe_thinker.py @@ -278,7 +278,12 @@ class Qwen3OmniMoeAudioAttention(_Qwen3OmniMoeAudioAttention): self.scaling = self.head_dim**-0.5 - self.qkv = QKVParallelLinear( + # vLLM 0.29 renamed the audio attention projection to ``qkv_proj`` and + # its stacked mapping rewrites checkpoint ``q_proj``/``k_proj``/ + # ``v_proj`` onto that name, so the module must match or weight loading + # fails with "no module or parameter named ...self_attn.qkv_proj". + # The inherited forward also calls ``self.qkv_proj``. + self.qkv_proj = QKVParallelLinear( hidden_size=self.embed_dim, head_size=self.head_dim, total_num_heads=self.num_heads, @@ -286,7 +291,7 @@ class Qwen3OmniMoeAudioAttention(_Qwen3OmniMoeAudioAttention): bias=True, disable_tp=disable_tp, quant_config=quant_config, - prefix=f"{prefix}.qkv", + prefix=f"{prefix}.qkv_proj", ) self.out_proj = RowParallelLinear(