vllm.models.inkling2.nvidia.ops.activation
¶
Softcapped SwiGLU of the Inkling2 experts, fused with the down-projection input quantization.
Functions:
-
swiglu_quantize–Quantized (NVFP4 with
weight_amax, else MXFP8) bf16
_div_rn(x, DIVISOR)
¶
Bitwise tl.div_rn(x, DIVISOR) without the division routine: the
product with the rounded reciprocal and one FMA correction step (whose
residual is clamped for infinite x) are exact for these divisors on
every float32 input.
Source code in vllm/models/inkling2/nvidia/ops/activation.py
_row_inputs(Rows, Gammas, CtaExpert, WAmax, r, num_rows, TILE, NVFP4)
¶
Row, routing weight and (NVFP4) weight amax of routed row r.
Source code in vllm/models/inkling2/nvidia/ops/activation.py
_situ(X, row, start, gamma, N, BLOCK, GATE_CAP, UP_CAP)
¶
fp32 values of the bf16 SiTU of columns [start, start + BLOCK).
Source code in vllm/models/inkling2/nvidia/ops/activation.py
swiglu_quantize(x, gammas, gate_cap, up_cap, rows, tile, weight_amax=None, weight_denominator=None)
¶
Quantized (NVFP4 with weight_amax, else MXFP8) bf16
softcap(gate) * sigmoid(gate) * softcap(up) * gamma, computed in fp32.
x is [M, 2N] with interleaved (gate, up) columns in the expert layout
of tile-row GEMM tiles. rows holds the routed rows (the others are
left uninitialized), their number and the expert of each tile. Returns the
values, block scales and, for NVFP4, each row's down-projection output
scale.