vllm.models.qwen4_exp.nvidia.ops.cute_dsl.hc_down_silu
¶
Adapted from vllm/model_executor/kernels/linear/cute_dsl/ll_bf16.py.
Fused Qwen4Exp mHC down projection + SiLU epilogue, where
columns < lora_rank get silu(bf16(acc) / hc_count), the hc_count
injection-logit columns pass through as bf16(acc), and the pad columns
are never computed. Output is bf16 (ll_bf16's fp32-output bonus is given up
to preserve the production rounding boundary).
The GEMM uses an FMA backend for M <= 4 and a split-K MMA backend beyond, both with PDL. The model uses its Linear module above M=48.
Functions:
-
hc_down_silu–Fused Qwen4Exp HC down projection + SiLU.
-
request_hc_down_silu_warmup–Precompile the fused kernels for CUDA-graph capture token counts.
HcDownSiluGemm
¶
Dispatch/compile cache for the fused mHC down+SiLU GEMM.
Source code in vllm/models/qwen4_exp/nvidia/ops/cute_dsl/hc_down_silu.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | |
hc_down_silu(x, weight, rank, hc)
¶
Fused Qwen4Exp HC down projection + SiLU.
Parameters:
-
(x¶Tensor) –Normalized hyper-hidden input, [M, K].
-
(weight¶Tensor) –Merged down+inject weight, [N, K].
-
(rank¶int) –Number of low-rank output columns.
-
(hc¶int) –Number of injection-logit output columns.
Returns:
Source code in vllm/models/qwen4_exp/nvidia/ops/cute_dsl/hc_down_silu.py
request_hc_down_silu_warmup(m_values, rank, hc, k)
¶
Precompile the fused kernels for CUDA-graph capture token counts.
Parameters:
-
(m_values¶Iterable[int]) –Token counts the model may capture CUDA graphs for; values outside the fused dispatch range are ignored.
-
(rank¶int) –Number of low-rank output columns.
-
(hc¶int) –Number of injection-logit output columns.
-
(k¶int) –Input feature size.