vllm.model_executor.layers.mamba.gdn.replayssm
¶
Adapter for FlashInfer's FP16-state GDN ReplaySSM decode kernel.
Functions:
-
load_gdn_replayssm_kernel–Import FlashInfer's SM100 UMMA ReplaySSM decode kernel.
-
load_gdn_replayssm_materializer–Import FlashInfer's prefix materializer and check its FP16 state dtype.
-
pack_replayssm_rows–Pack variable-length token rows into
[num_rows, executed_width, ...]. -
run_gdn_replayssm–Run one FlashInfer decode step over the replay rows.
load_gdn_replayssm_kernel()
cached
¶
Import FlashInfer's SM100 UMMA ReplaySSM decode kernel.
Source code in vllm/model_executor/layers/mamba/gdn/replayssm.py
load_gdn_replayssm_materializer()
cached
¶
Import FlashInfer's prefix materializer and check its FP16 state dtype.
Source code in vllm/model_executor/layers/mamba/gdn/replayssm.py
pack_replayssm_rows(values, query_start_loc, executed_width, offsets=None, padding_value=0.0, uniform=False, allow_strided_rows=False)
¶
Pack variable-length token rows into [num_rows, executed_width, ...].
Row i holds the tokens in query_start_loc[i]:query_start_loc[i + 1]
followed by padding_value. With uniform, every row has exactly
executed_width tokens, so the result is a view of values when it
is contiguous and aligned for CuTe, and a contiguous copy otherwise.
allow_strided_rows also preserves aligned, non-overlapping 2D rows.
Source code in vllm/model_executor/layers/mamba/gdn/replayssm.py
run_gdn_replayssm(*, kernel, executed_width, mixed_qkv, a, b, A_log, dt_bias, checkpoint_state, replayssm_cache, ring_start, num_committed, query_start_loc, state_indices, output_indices, num_k_heads, num_v_heads, head_k_dim, head_v_dim, offsets=None, uniform_query_length=None)
¶
Run one FlashInfer decode step over the replay rows.
Returns the outputs of real tokens in output_indices order. The kernel
reads the committed cursors but does not publish them; vLLM commits the
accepted tokens once per model step, after every layer runs.
Source code in vllm/model_executor/layers/mamba/gdn/replayssm.py
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 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | |