LayerNorm computes a mean and a variance every single forward pass. What if the mean-centering step was never buying you much in the first place?
Same six activations as the last chapter — mean , not . LayerNorm would force the output's mean back to . RMSNorm doesn't: it never subtracts a mean at all, so whatever bias was in the input mean survives into the output, just rescaled.
RMSNorm divides by the root-mean-square of the vector — no mean subtraction anywhere in the formula:
- — channel 's raw value.
- RMS() — the root-mean-square of the whole vector: the square root of its average squared value.
- — a learned (here, shared-scalar) gain applied after normalizing.
- — a tiny constant keeping the division well-defined near zero.
- LayerNorm: subtract the mean, then divide by the standard deviation
— two statistics computed from the data, one subtraction, one division.
- RMSNorm: skip the subtraction entirely
— one statistic, one division. Whatever mean the input had is still there, just divided down along with everything else.
Drag the gain. Every one of the six channels scales up or down by exactly the same factor — RMSNorm never treats any channel differently based on where the group's center happens to sit, because it never computed a center.
- RMS of the six activations
Squaring each of and summing: . Mean-of-squares , so .
- RMSNorm's output mean isn't 0
Dividing every value by divides the mean by too: . LayerNorm on the identical input forces that same quantity to exactly by construction.
- One fewer statistic, one fewer reduction
RMSNorm needs only , not both and — cheaper to compute, and in practice competitive with LayerNorm's accuracy on large transformer models, which is why models like LLaMA and T5 use it instead.
Tune the gain until channel c4 (raw value 3) normalizes to about 2.
RMSNorm keeps normalization's core benefit — controlling the scale of activations layer after layer — while dropping the assumption that re-centering to mean zero was doing meaningful work. One fewer statistic to compute, one fewer place for a bug to hide, and empirically little accuracy lost. The next few chapters turn from activation stability to a different training concern: keeping the model from simply memorizing its training data.