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

> This operator's description has not been translated yet. The original text follows as it is.

RMS 正規化 → tokens。既定(eps=0, weight なし)では出力の RMS が厳密に 1。

Zhang・Sennrich 2019。LayerNorm から平均を引く段を落としたもので、残るのは

「行のノルムを揃える」だけ —— だから RMS が 1 になることが検算になる

(実測 2.2e-16)。`eps を入れると 1 からずれる。それが eps` の値段。

Args:

tokens: (T, d) float。1 行が 1 トークン。

eps: 平方根の中に足す下駄。0 なら RMS は厳密に 1、正なら 1 未満に縮む。

weight: (d,) float か None。学習で付く軸ごとの倍率(掛けるだけなので RMS は動く)。

Returns:

tokens (T, d) float: 各行を自分の RMS で割ったもの(`weight` があれば掛けたもの)。

全成分が 0 の行は割れないので ValueError(黙って 0/0 の NaN を返さない)。

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.