Command Palette
Search for a command to run...
Root Mean Square Layer Normalization RMSNorm
Root Mean Square Layer Normalization (RMSNorm) was proposed by Biao Zhang and Rico Sennrich in 2019 in the paper “Root Mean Square Layer Normalization”. It is a simplification of Layer Normalization (LayerNorm): LayerNorm first subtracts the mean from the sample activations and then divides by the standard deviation, whereas RMSNorm only divides by the root mean square, omitting the mean calculation (and usually does not use a bias parameter), so it no longer has re-centering invariance and retains only re-scaling invariance.
The paper’s core hypothesis is that “the re-centering invariance of LayerNorm is not necessary.” Experiments show that this simplification, while maintaining model performance, can bring runtime reductions of 7% to 64% across different models; the authors also proposed pRMSNorm, which estimates the root mean square using only part of the input. Because its computation is simpler, RMSNorm was later adopted by models such as PaLM and LLaMA, and T5 also adopted a similar simplified form without mean centering. Since PyTorch 2.4, torch.nn.RMSNorm has become an official built-in layer and is a common component in large language models.
Build AI with AI
From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.