RMSNorm

Per-token root-mean-square scaling that rescales each hidden vector without mean centering, as used in many modern decoder transformers.

RMSNorm keeps each token's hidden vector in a stable scale band by dividing by its root mean square instead of using full mean-and-variance normalization, which makes it a lighter fit for many modern decoder-only transformer stacks.

At a glance

Released

October 2019

Authors

Biao Zhang, Rico Sennrich

Optimizes

  • Training Stability
  • Inference Efficiency

What It Is

Root mean square normalization rescales one token's hidden vector by dividing by the root mean square of its features, then applying learned gain. Unlike layer norm, it does not subtract the feature mean first.

Why It Exists

RMSNorm targets stable hidden-state scale with less normalization work than full layer norm. It keeps per-token magnitudes predictable while avoiding the mean-centering step.

How It Works

For one token vector, RMSNorm computes the root mean square over the features, divides the vector by that stabilized scale, then applies learned gain. The switcher below keeps that path next to layer norm so you can see that RMSNorm preserves the same per-token pattern while skipping mean subtraction.

Math Or Compute Schema

These two formulas both normalize one token vector at a time. RMSNorm keeps the scale correction from layer norm but removes the mean-centering term.
Layer normalization
LN(x)=γ⊙x−μσ2+ϵ+β\mathrm{LN}(x) = \gamma \odot \frac{x - \mu}{\sqrt{\sigma^2 + \epsilon}} + \beta
xx
Hidden feature vector at one token position.
μ\mu
Mean of the features in x.
σ2\sigma^2
Variance of the features in x.
ϵ\epsilon
Small constant for numerical stability.
γ\gamma
Learned per-feature scale.
β\beta
Learned per-feature shift.
RMS normalization
RMSNorm(x)=γ⊙x1d∑i=1dxi2+ϵ\mathrm{RMSNorm}(x) = \gamma \odot \frac{x}{\sqrt{\frac{1}{d}\sum_{i=1}^{d} x_i^2 + \epsilon}}
xx
Hidden feature vector at one token position.
dd
Number of features in x.
ϵ\epsilon
Small constant for numerical stability.
γ\gamma
Learned per-feature scale.

Compared To Nearby Modules

RMSNorm is closest to layer norm because both normalize one token at a time. The main difference is that RMSNorm keeps the scale correction but drops mean centering and often omits the learned bias term as well.
Comparison dimensionRMSNormLayer NormBatch Norm
Mean centeringNo; scales by root mean square onlyYes; subtracts the token's feature meanYes; uses minibatch feature statistics
Learned shift termOften omitted; learned gain is the main parameterUsually includes both learned gain and biasUsually includes both learned gain and bias
Common placementPer-token norm inside modern decoder transformersPer-token norm around transformer sublayersFeature or channel norm across image-style minibatches

Example Architectures

RMSNorm appears in many recent decoder transformers, especially Llama-style stacks and related architectures that prefer a lighter normalization rule than classic layer norm.

Limitations And Tradeoffs

RMSNorm gives up explicit mean centering, so it is not identical to layer norm. In setups that benefit from subtracting the feature mean, designers may still prefer the fuller layer norm rule.

Why It Still Matters

RMSNorm is now one of the most common normalization names in modern LLM writeups. Knowing how it differs from layer norm helps you read those architectures without treating the label as a black box.

Tags

References

  1. Zhang, Biao, and Rico Sennrich. "Root Mean Square Layer Normalization." arXiv, 2019, https://arxiv.org/abs/1910.07467.