Repository navigation
Add Lion optimizer support - #3813
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. |
457ce16 to
c4a57c3
Compare
| @@ -2171,6 +1855,16 @@ def _add_regularization_args(parser): | |||
| help='How to perform NS calculation for tensor model parallel weights') | |||
| group.add_argument('--muon-extra-scale-factor', type=float, default=1.0, | |||
| help='Additional scale factor for the muon update') | |||
| group.add_argument('--muon-nonlinear-optimizer', type=str, default='adam', | |||
There was a problem hiding this comment.
We need to make sure to ping downstream stuff (Mbridge etc)'s Muon recipe to additionally add --muon-non-linear-optimizer as an extra entry.
There was a problem hiding this comment.
@janEbert , maybe you could add this to mbridge?
6dd614b to
0fb94af
Compare
|
/ok ebdbe2c |
|
/ok to test f212469 |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
/ok to test 207c465 |
This reverts commit f212469.
|
/ok to test e911d8a |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/23215212706 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/23215938659 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/23219203590 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/23227234166 |
New files: - tests/unit_tests/test_lion_optimizer.py
Signed-off-by: Mike Chrzanowski <mchrzanowski@nvidia.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: root <root@pool0-0020.cm.cluster> Co-authored-by: root <root@pool0-0038.cm.cluster> Co-authored-by: root <root@pool0-0022.cm.cluster>
Signed-off-by: Mike Chrzanowski <mchrzanowski@nvidia.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: root <root@pool0-0020.cm.cluster> Co-authored-by: root <root@pool0-0038.cm.cluster> Co-authored-by: root <root@pool0-0022.cm.cluster> Signed-off-by: yhgalaxy <yhgalaxy@outlook.com>
Signed-off-by: Mike Chrzanowski <mchrzanowski@nvidia.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: root <root@pool0-0020.cm.cluster> Co-authored-by: root <root@pool0-0038.cm.cluster> Co-authored-by: root <root@pool0-0022.cm.cluster> Signed-off-by: Jon Barker <jbarker@aws-cmh-slurm-1-vscode-02.cm.cluster>
Signed-off-by: Mike Chrzanowski <mchrzanowski@nvidia.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: root <root@pool0-0020.cm.cluster> Co-authored-by: root <root@pool0-0038.cm.cluster> Co-authored-by: root <root@pool0-0022.cm.cluster>
Import Lion optimizer from emerging_optimizers and integrate it as a standalone optimizer (--optimizer lion) and as a Muon nonlinear parameter optimizer (--muon-nonlinear-optimizer lion).