RMS Normalizer

Experimental alpha. Expect breaking changes and major bugs. Your feedback is much appreciated.

RMS Normalizer

Rescales each vector to a root mean square of 1, then applies a learned gain. It takes nothing off first and adds nothing after, so it does the job of a Normalizer with fewer steps and fewer weights.

RMS normalization

Shapes

[…×C] in, the same shape out. Each vector is normalized over its last size.

Parameters

C. ε is 1e-5.

In PyTorch

self.norm1 = nn.RMSNorm(C)
h = self.norm1(x)

Notes

The numbers keep their sign and their order, and a row far from zero stays far from zero: only its size changes. See The Modern Block.

Making it

The Fabricator makes it from a photomask of RMS Norm: verify the spec on a Bench, or find a salvaged mask in the ruins, which makes it unfused. See The Bench and the Fabricator.