Skip to content

rmsNorm allows nil weight - #524

Merged
davidkoski merged 2 commits into
mainfrom
rms-norm-nil
Nov 17, 2026
Merged

davidkoski merged 2 commits into
mainfrom
rms-norm-nil

Conversation

@davidkoski

Copy link
Copy Markdown
Member

Proposed changes

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

@davidkoski
davidkoski requested a review from nwh November 4, 2026 17:24
@nwh

nwh commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

see: #528

for updated doc string and a test

- doc comments note that a nil weight applies no scaling and preserves the dtype of x
- add RMSNormTests covering nil weight vs reference / ones weight, dtype
  preservation (mlx-swift-lm#751), explicit weight, and gradients
@davidkoski
davidkoski merged commit 2dd02d4 into main Nov 17, 2026
1 check passed
@davidkoski
davidkoski deleted the rms-norm-nil branch November 17, 2026 23:25
smdesai added a commit to smdesai/mlx-swift that referenced this pull request Nov 28, 2026
Upstream: asMTLBuffer returns nil for zero-size arrays (ml-explore#522), and
rmsNorm takes an optional weight (ml-explore#524). No conflicts; the mlx and
mlx-c submodules stay at prism's cbe567e and v0.8.0 (upstream's
commits don't move them).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants