Skip to contents

A step of the mistr_native implementation. Called by mistr_mistral_block. See the file header for the source the module follows.

Usage

mistr_rms_norm(x, weight = NULL, eps = 1e-06)

Arguments

x

A vector; its length is taken.

weight

Optional; may be NULL. A vector; its length is taken.

eps

Numeric; combined arithmetically in the body. Defaults to 1e-06.

Value

A numeric value.

Examples

mistr_rms_norm(c(3, 4))   # divides by sqrt(mean(x^2)) = sqrt(12.5)
#> [1] 0.8485281 1.1313708