Skip to main content

ClikaRT::ops::gated_rms_norm

function

gated_rms_norm()

Tensor gated_rms_norm(
    Tensor x,
    Tensor z,
    ClikaRT::Span<const std::int64_t> normalized_shape,
    OptionalTensor weight = {},
    std::optional<double> eps = std::nullopt
)

Fused group RMS norm + post-norm silu(z) gate: out = rms_norm(x) · silu(z), the norm taken over the trailing normalized_shape group extent ({vd} for a per-head norm over [.., HV, vd]). weight is the optional [group] gamma applied after the normalization; an absent eps takes the runtime's rms-norm default.

Declared in ClikaRT/compute/ops.h, line 3735