[Misc] Add some comments in qwen3-next (#28267)

Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
This commit is contained in:
Jiangyun Zhu 2025-11-09 15:59:24 +08:00 committed by GitHub
parent de2b78305f
commit 7ae5a5fb11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,