vllm.models.inkling2.nvidia.ops.loop
¶
Loop message controllers, batched over streams.
A controller blends a fp32 message into a fp32 sublayer input dest: from
h = down(rms([dest, message])) (bf16), out = (1 - tanh(forget(h))) * dest +
tanh(gain(h)) * message in fp32, unfused as the reference. The output feeds
the sublayer's RMSNorm, applied in the same kernel.
Functions:
-
blend_rms_norm–bf16
(S, T, D)RMSNorm (rowsofnorm_weight(S, D)) of -
pair_rms_norm–bf16
(S, T, 2D)[rms(dest), rms(message)]of fp32(S, T, D)
blend_rms_norm(dest, message, gain_forget, norm_weight, norm_eps)
¶
bf16 (S, T, D) RMSNorm (row s of norm_weight (S, D)) of
(1 - tanh(forget)) * dest + tanh(gain) * message, with fp32 (S, T, D)
dest (may broadcast over streams) and message, and fp32 (S, T, 2D)
gain_forget = [gain, forget]. norm_weight may broadcast too.
Source code in vllm/models/inkling2/nvidia/ops/loop.py
pair_rms_norm(dest, message)
¶
bf16 (S, T, 2D) [rms(dest), rms(message)] of fp32 (S, T, D)
inputs, weightless; dest may broadcast over streams (stride 0).