Repository navigation
Conversation
|
This PR has been automatically converted to draft because all PRs must start as drafts. When you are ready for review, click Ready for Review to begin the review process. This will:
See the contribution guide for more details. |
|
Hi @janEbert @mkhona-nvidia! Planning to split this into 4 PRs as described. Design doc is attached. |
|
Tagging @NVIDIA/mcore-oncall; the design discussion for this PR happened in #4381. |
|
@janEbert should I start adding the next PRs too? |
|
If they're already done, why not? It's nice to see the overarching "story" and wrap-up, too. Thank you for the additional work in making this more manageable! |
|
Added! |
…icy-infra # Conflicts: # megatron/core/optimizer/__init__.py
|
Made a few changes: some naming changes (ResolvedScalingContext --> ScalingContext, ResolvedScalingPolicy --> ModelScalingPolicy, and a few others), optimizer-group resume tests. |
|
Hi @mkhona-nvidia @janEbert! Have added the rest of the PRs, waiting on the reviews! |
|
@janEbert just a bump! |
|
Hey, what I like about the initial design here is that it has a very explicit goal, hardcoding things where it makes sense to enable parametrization support but nothing else, which keeps things simple. However, I think that's also a limitation that we'd like to avoid integrating before other design decisions. I'd prefer we start with general user-facing optimizer and initialization configuration APIs, which would allow other modern related configurations as well. I've had the feeling that modern LLM trainings really like to make use of per-layer configuration and enabling more general configuration options would benefit both goals in the long-term, enabling another dimension of user-freedom. The proposed scaling recipes could then be worked on top of those general APIs. (Although we'd prefer these to stay as examples. We would probably not maintain a list of parametrization policies in the core codebase.) I think it makes sense to first consider these questions, which were also raised in #5732, and work from there. |
What does this PR do ?
PR 1/4 of the planned scaling-recipes stack.
Design doc: PR_MuP.pdf
Adds
mup,depth_mup, and Muon interaction PRs, without introducing the public scaling-recipe surface yet, as planned in General scaling policy for HP transfer + Depth MuP recipe #4381.This PR:
megatron.core.parameterizationwith resolved scaling context, model policy, training policy, and parameter-role helpers.max_lr/min_lrfrom group identity;This is intentionally the infrastructure slice only. Follow-up PRs layer on:
feature/scaling-recipe-mup: canonical width-MuP recipe API.feature/depth-mup: experimental dense-GPT depth-MuP support.feature/muon-spectral-mup: Muon scalar optimizer interaction.Issue tracking
Linked issue: Related to #4381.
Testing
BASE_REF=main SKIP_DOCS=true ./tools/autoformat.shgit diff --checkgit diff --name-only upstream/main...HEAD -- '*.py' | xargs python3 -m py_compileContribution process
Pre-checks