已开启
docs: describe RMSNorm side output as inverse root mean square #138
docs: describe RMSNorm side output as inverse root mean square #138
已开启
tianjun创建于 10 天前
tianjun
10 天前

描述

RMSNorm README公式正确写为1/sqrt(mean(x^2)+epsilon),但返回值表却将rstd解释为标准差倒数。标准差使用中心化平方差,RMSNorm不减均值;常数行[2,2]是确定性反例:文中公式约0.5,而中心化标准差加epsilon后的倒数约1000。调用方据表解释side output会使用错误归一化含义。

修正rstd返回值术语为稳定化均方根倒数,并给出常数输入反例说明不减均值;不改kernel、参数或精度门槛。

类型

如何测试

标准库math对[2,2]、epsilon=1e-6分别计算平方均值与中心化平方差公式,得到约0.5与1000;核对原README公式及实现的平方和/列数归约。仅语义文档验证,无NPU执行。 仓库适用 pre-commit hooks 与 diff --check 通过。

本地无 NPU,未执行训练或硬件测试;提交后使用 /compile 触发仓库 CI。

Checklist:

其他信息

Fixes #28

基于 e5f66414a59883500e115d621b7317acf4b3dd6c,PR 保留一个提交。

AI 参与

使用 OpenAI Codex(GPT-6 系列)审查代码与文档,在 Host 侧复现、核对已有报告并准备修复。提交者账号为 Ethan_Zou。

likedislike
合并受阻
Ttianjun
10 天前 创建了 pull request,commit f21f3634
Ttianjun
10 天前 关联了issue:[Docs] RMSNorm将rstd误写为标准差倒数,与平方均值公式不符
tianjun
10 天前 评论:

/compile

likedislike
Ttianjun
10 天前 预合并成功(commit_id: c0c3266e5ea2f2666e23069ebffef004f2eeffa4)
CANN-robotCANN-robot成员
10 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
10 天前 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)

Module Approval Details

module lgtm status approve status
repo-cann/cannbot-dsl ❌ (0/2)(You can also ask: liujun2025, yang-jiwei, 陈振宇, 陆玲辉, 金炯) ❌ (0/1)(You can also ask: 沈敏, 陆玲辉, 金炯, liujun2025, yang-jiwei)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
CANN-robot
CANN-robot成员
10 天前 评论:

CLA Signature Pass

Ethan_Zou, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robot
CANN-robot成员
10 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
10 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
10 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
10 天前 添加了label:ci-pipeline-failed