pub fn ssm_rowwise_w_bf16_layer_bytes(config: &ModelConfig) -> usizeExpand description
BF16 bytes ONE GDN layer’s row-wise prefill arms dequantise and keep:
the fused in_proj_qkvz [ssm_qkvz_size, hidden] and out_proj
[hidden, value_dim], 2 bytes per element.
EXACT, not an upper bound: these are the two weights
set_fp8_rowwise_prefill_weights installs and the only two the row-wise
arms dequantise. value_dim = linear_num_value_heads * linear_value_head_dim
— the same extent trait_prefill_block.rs passes as the out_proj K.
Qwen3.8-27B (hidden 5120, 16x128 key heads, 48x128 value heads):
16384*5120*2 + 5120*6144*2 = 167772160 + 62914560 = 230686720 B.