vllm.models.kimi_k3.nvidia.specialized_decode.cutedsl.mla.value
¶
MLA value projection (W_UV) and sigmoid gate of the BF16 attention latent.
Classes:
-
MlaGate–The sigmoid gate of the W_UV output rows:
values[H, B, 128] BF16 (the -
MlaValue–W_UV and the sigmoid gate, [B, H, 512] BF16 latent -> [B, H*128]. One
Functions:
-
value_bmm–Whether
batchrows ofheadslocal heads take the batched GEMM.
MlaGate
¶
The sigmoid gate of the W_UV output rows: values [H, B, 128] BF16 (the
batched GEMM's), gate [B, H * 128] -> output [B, H * 128], as MlaValue
rounds and gates them (BF16 value times the FP32 sigmoid, rounded to BF16;
rows of empty requests zero). One 256-thread CTA per (16 rows, head): each
thread 8 outputs of one row.
Source code in vllm/models/kimi_k3/nvidia/specialized_decode/cutedsl/mla/value.py
MlaValue
¶
W_UV and the sigmoid gate, [B, H, 512] BF16 latent -> [B, H*128]. One
128-thread CTA per (32 outputs, head, 16 rows); warp w owns outputs
8w..8w+7 over the whole latent (BF16 MMA, FP32 accumulation). W_UV must have a
contiguous latent axis (the absorbed kv_b_proj view). Rows are tokens, q per
request (lengths per request).
Source code in vllm/models/kimi_k3/nvidia/specialized_decode/cutedsl/mla/value.py
value_bmm(heads, batch)
¶
Whether batch rows of heads local heads take the batched GEMM.