Skip to content

Conversation

@delock
Copy link
Collaborator

@delock delock commented Oct 22, 2025

This PR follow the suggestion in this artical https://kellerjordan.github.io/posts/muon/#empirical-considerations that non-hidden layers ('embedding' and 'lm_head') needs to be excluded from Muon optimizer. It check parameter name for embed and lm_head and not apply 'use_muon' attribute if any of these string present in the name.

Note in nanochat it also take the same approach (put embedding and lm_head in adam_groups to avoid using Muon) https://github.com/karpathy/nanochat/blob/2e938530ce7f38d51052b4e5b37cf5613d0a45fb/nanochat/gpt.py#L226 , so this should be a common practice.

@sfc-gh-truwase sfc-gh-truwase merged commit 67b365a into master Oct 22, 2025
12 checks passed
@sfc-gh-truwase sfc-gh-truwase deleted the gma/auto_muon branch October 22, 2025 14:40
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