Implement Muon optimizer on ssl-diffusion branch - #2682
Merged
shmh40 merged 4 commits intoJul 25, 2026
Merged
Conversation
Contributor
Author
|
@sophie-xhonneux @clessig Can you provide me any config, so that I can test on this branch? |
shmh40
reviewed
Jul 24, 2026
| # aiming for beta1 = 0.9 at one node, ie kappa=B=4 | ||
| beta1 = max(0.5, 1.0 - kappa * (1.0 - optimizer_cfg.adamw.beta1)) | ||
| # aiming for beta2 = 0.95 at one node, ie B=4 | ||
| beta2 = max(0.9, 1.0 - kappa * (1.0 - optimizer_cfg.adamw.beta2)) |
Contributor
There was a problem hiding this comment.
don't think so, it just moved https://github.com/ecmwf/WeatherGenerator/blob/develop/src/weathergen/train/trainer.py#L328
shmh40
reviewed
Jul 24, 2026
| model.parameters(), | ||
| lr=shared_lr_cfg.lr_start, | ||
| weight_decay=optimizer_cfg.weight_decay, | ||
| fused=True, |
| "earthkit-data==0.17.0", | ||
| "earthkit-utils==0.1.2", | ||
| "imageio[ffmpeg]>=2.37.2", | ||
| "scipy>=1.12", |
Contributor
There was a problem hiding this comment.
is this needed or something else?
| else: | ||
| new_entry[key] = val | ||
| self.optimizer.state[param] = new_entry | ||
| optimizer.state[param] = new_entry |
Contributor
There was a problem hiding this comment.
Isn't the reference to this optimizer state lost? I don't think I quite get the ownership model here
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this branch, few commits from earlier muon PR (#2639) are cherry-picked on
develop-ssl-diffusion-v1.