oa::ml::matrix::rms_norm

Apply weighted root-mean-square normalization over the final dimension. Errors Returns an error unless input is a nonempty F32 Matrix, weight is a same-engine F32 vector matching its final dimension, epsilon is finite and positive, or runtime recording fails.

FnRust public API

Function Documentation

pub fn rms_norm( input: &Matrix, weight: &Matrix, epsilon: f32 ) -> Result<Matrix>
Apply weighted root-mean-square normalization over the final dimension. Errors Returns an error unless input is a nonempty F32 Matrix, weight is a same-engine F32 vector matching its final dimension, epsilon is finite and positive, or runtime recording fails.