rms_norm — LLMCORE prepare op

• Data kinds: tokens → tokens

• Call: import fullseye as fs; fs.ledger.rms_norm(tokens, eps: 'float' = 0.0, weight=None) -> 'np.ndarray' (to call the implementation directly, import llmcore; llmcore.rms_norm(tokens, eps: 'float' = 0.0, weight=None) -> 'np.ndarray'; from the registry, opsllmcore.get("rms_norm"))

Usage

RMS normalization → tokens. With the defaults (eps=0, no weight) the RMS of the output is exactly 1.

Zhang and Sennrich 2019. LayerNorm with the mean-subtraction stage dropped; what remains is only "equalise the norm of each row" -- so RMS becoming 1 serves as the cross-check (measured 2.2e-16). Adding eps shifts it away from 1. That is the price of eps.

Args:

tokens: (T, d) float. 1 row is 1 token.

eps: an offset added inside the square root. With 0 the RMS is exactly 1; if positive it shrinks below 1.

weight: (d,) float or None. A learned per-axis scale (it is only multiplied, so the RMS moves).

Returns:

tokens (T, d) float: each row divided by its own RMS (multiplied by weight if given).

Rows whose components are all 0 cannot be divided, so ValueError (it does not silently return NaN from 0/0).

Detailed usage guide

• llmcore family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_attention_identities — py -3.11 examples/poc_attention_identities.py

Ops the type connects to (they accept tokens as input)

rope_rotate · attention_scores · attention_apply · attention_softmax · attention_tiled · attention_linear · attention_grouped · kv_cache_decode

Same category (prepare)

rope_rotate


*Provenance: llmcore.py — LLMCORE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.