vllm.models.beam.nvidia.layernorm
¶
Beam kernels preserving FP32 normalization and affine arithmetic.
Classes:
-
RMSNorm–Parameters for normalization performed directly by the model kernels.
Functions:
-
beam_norm_residual_norm–Fuse post-norm, scaled residual add and next pre-norm, keeping each cast.
-
beam_rms_norm–Normalize strided token/head rows, rounding only after the affine multiply.
RMSNorm
¶
Bases: Module
Parameters for normalization performed directly by the model kernels.
Source code in vllm/models/beam/nvidia/layernorm.py
beam_norm_residual_norm(x, residual, post_weight, post_eps, next_weight, next_eps, scales)
¶
Fuse post-norm, scaled residual add and next pre-norm, keeping each cast.
Returns the new residual and, when next_weight is given, its
normalization for the next sublayer.
Source code in vllm/models/beam/nvidia/layernorm.py
beam_rms_norm(x, weight, eps)
¶
Normalize strided token/head rows, rounding only after the affine multiply.