Training, adaptation, compression, and systems techniques · Training, fine-tuning, adaptation, compression, and systems techniques · TRN009 · Training method
RMS normalization
Normalizes feature scale using root mean square without subtracting the feature mean.
In CodeSplash
Documented in the Academy only. There's no Set up button.
- Availability
- Explained here
- Code example
- Component demo, not a trained model
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- The reference's example ran in Python and R here, and they agree.
- The reference's record
- Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.
Purpose
Normalizes feature scale using root mean square without subtracting the feature mean.
Question / hypotheses
Does this intervention improve the intended quality, adaptation, resource, or reliability objective under a controlled comparison? It defines a method, not an intrinsic null-hypothesis test.
Architecture / computational structure
Each token’s squared feature average supplies a scale denominator, followed by learned channel gains.
Assumptions
The method provides rescaling behavior rather than LayerNorm’s mean-centering behavior. Checkpoint-compatible placement and epsilon are important.
Formula / computational definition
Parameters and notation
Learned: gain gamma in a common form. Hyperparameters: epsilon, normalized shape, partial-sampling variant if used, and architecture placement; biases vary by implementation.
Fitting, fine-tuning, and adaptation
Keep pretrained normalization conventions during adaptation. If tuning only normalization parameters, record the exact trainable subset and test whether capacity is adequate for the domain shift.
How to use and calibrate
Compare numerical stability and compute on the target device. Example: evaluate a language transformer’s normalization under reduced precision.
Example application
evaluate a language transformer’s normalization under reduced precision.
Interpretation / pitfalls
Watch out
RMSNorm is not simply a faster drop-in numerical equivalent of LayerNorm. Its omission of centering changes the function and invariances.
Python and R code examples
Scope: numerical mechanism demonstration. Validation: Python executed successfully on the supplied synthetic inputs; R reviewed but not executed (Rscript unavailable).
Python and R
The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.
Component demo, not a trained model — numerical mechanism demonstration. · needs numpy
import numpy as np
x=np.array([1.,2.,4.]); gamma=np.ones(3)
print(gamma*x/np.sqrt(np.mean(x*x)+1e-6))
Component demo, not a trained model — numerical mechanism demonstration.
x <- c(1,2,4); gamma <- rep(1,3)
print(gamma*x/sqrt(mean(x*x)+1e-6))
Sources
- Primary/official source 1arxiv.org
From the CodeSplash reference, entry TRN009.