Skip to content

Conversation

@zhtmike
Copy link
Collaborator

@zhtmike zhtmike commented Jul 16, 2025

需配合 #1164 保障测试脚本收敛精度

What does this PR do?

Fixes # (issue)

Adds # (feature)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline?
  • Did you make sure to update the documentation with your changes? E.g. record bug fixes or new features in What's New. Here are the
    documentation guidelines
  • Did you build and run the code without any errors?
  • Did you report the running environment (NPU type/MS version) and performance in the doc? (better record it for data loading, model inference, or training tasks)
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@xxx

@zhtmike zhtmike requested a review from vigo999 as a code owner July 16, 2025 09:22
@SamitHuang
Copy link
Collaborator

pls add the test script

@zhtmike
Copy link
Collaborator Author

zhtmike commented Jul 16, 2025

pls add the test script

done

@@ -0,0 +1,236 @@
"""Modified from https://github.com/MoonshotAI/Moonlight/blob/master/examples/toy_train.py"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add copyright statement

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add copyright statement

original script does not contain copyright statement

X = X / (mint.norm(X) + 1e-7)
# Perform the NS iterations
for _ in range(steps):
A = X @ X.T
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may try mint.matmul explicitly for better performance

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated. Yes, change to mint get 15% speed boost

@zhtmike
Copy link
Collaborator Author

zhtmike commented Oct 20, 2025

merged in #1198

@zhtmike zhtmike closed this Oct 20, 2025
@zhtmike zhtmike deleted the muon branch October 20, 2025 02:53
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.

3 participants