From 7ae5a5fb11151e029609009b7950cc46ff097407 Mon Sep 17 00:00:00 2001 From: Jiangyun Zhu Date: Sun, 9 Nov 2025 15:59:24 +0800 Subject: [PATCH] [Misc] Add some comments in qwen3-next (#28267) Signed-off-by: zjy0516 --- vllm/model_executor/models/qwen3_next.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vllm/model_executor/models/qwen3_next.py b/vllm/model_executor/models/qwen3_next.py index b095c79dc954b..880655da3f0a5 100644 --- a/vllm/model_executor/models/qwen3_next.py +++ b/vllm/model_executor/models/qwen3_next.py @@ -462,6 +462,8 @@ class Qwen3NextGatedDeltaNet(nn.Module, MambaBase): # ============================================================ # Part 2: Core Attention (Custom Op) # ============================================================ + # Note: we should not use torch.empty here like other attention backends, + # see discussions in https://github.com/vllm-project/vllm/pull/28182 core_attn_out = torch.zeros( (num_tokens, self.num_v_heads // self.tp_size, self.head_v_dim), dtype=hidden_states.dtype,