Last updated: 2026-06-12
Inference Runtime
Rms Norm
T-CPU RMS_NORM implementation.
This is the scalar reference for RMS normalization and intentionally favors exactness and readable shape checks over throughput.
2 exports shown
struct
Params
pub const Params = struct Inputs and outputs for one RMS_NORM call.
function
run
pub fn run(params: Params) !void Compute `output[i] = weight[i] * input[i] / sqrt(mean(input^2) + eps)`.
Scalar reference implementation; favors readable shape checks and bit-stable math over throughput. `output` do not exactly match `input.len`, otherwise void.