For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Python class
GemmaRMSNorm
GemmaRMSNorm
class max.experimental.nn.norm.GemmaRMSNorm(dim, eps=1e-06)
Bases: RMSNorm
Gemma-style root mean square normalization.
Subclasses RMSNorm with two differences:
- Scales by
1 + weightrather thanweight. - Multiplies by the scale before casting back to the input dtype, instead of after.
The constructor signature is identical to RMSNorm. Used by
the Gemma model family.
forward()
forward(x)
Returns x normalized using the Gemma-style RMS variant.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!