vllm.models.qwen3_5.nvidia.ops.fused_gdn_gated_norm
¶
Functions:
-
fused_gdn_gated_rms_norm–Gated RMS norm
out = rms_norm(x) * act(z)for Qwen3.5 GDN.
_fused_gdn_gated_rms_norm_kernel(x_ptr, z_ptr, w_ptr, out_ptr, stride_x_tok, stride_z_tok, stride_out_tok, M, eps, N, BLOCK_N, ROWS_PER_BLOCK, NORM_BEFORE_GATE, ACTIVATION)
¶
FLA-equivalent per-head gated RMS norm with token-strided z.
Source code in vllm/models/qwen3_5/nvidia/ops/fused_gdn_gated_norm.py
fused_gdn_gated_rms_norm(x, z, weight, out, eps, num_v_heads, head_v_dim, norm_before_gate, activation)
¶
Gated RMS norm out = rms_norm(x) * act(z) for Qwen3.5 GDN.
Parameters:
-
(x¶Tensor) –(num_tokens, num_v_heads * head_v_dim), contiguous. May alias out.
-
(z¶Tensor) –(num_tokens, num_v_heads * head_v_dim) gate values, typically a strided view into the packed in_proj_qkvz output. Only the last dim must be contiguous.
-
(weight¶Tensor) –(head_v_dim,) shared per-head norm weight.
-
(out¶Tensor) –(num_tokens, num_v_heads * head_v_dim), contiguous.
-
(eps¶float) –RMS norm epsilon.
-
(num_v_heads¶int) –number of V heads per TP rank.
-
(head_v_dim¶int) –head_v_dim (per-row norm size).
-
(norm_before_gate¶bool) –if True, out = norm(x) * act(z), else out = norm(x * act(z)).
-
(activation¶str) –"swish"/"silu" or "sigmoid".