Skip to content

feat: add Lion - #4331

Merged
mrwyattii merged 2 commits into
deepspeedai:masterfrom
enneamer:upstream-pr/feat/lion
Oct 5, 2023
Merged

mrwyattii merged 2 commits into
deepspeedai:masterfrom
enneamer:upstream-pr/feat/lion

Conversation

@enneamer

@enneamer enneamer commented Sep 14, 2023 •

Copy link
Copy Markdown
Contributor

Implement Lion optimizer as specified by Chen, et al. The optimizer seems welcomed by some diffusion model developers.

@enneamer

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@mrwyattii

Copy link
Copy Markdown
Contributor

Thank you for this contribution @enneamer! Could you also please add a unit test? Take a look at some of our other unit tests for optimizers to get an idea of how to add one:
https://github.com/microsoft/DeepSpeed/blob/master/tests/unit/ops/adam/test_adamw.py

@enneamer
enneamer force-pushed the upstream-pr/feat/lion branch from 539567b to 8dda78c Compare September 15, 2023 02:07
@enneamer
enneamer requested a review from tjruwase as a code owner September 15, 2023 02:07
@enneamer

Copy link
Copy Markdown
Contributor Author

@mrwyattii, I have added similar unit tests. I also added code to allow creating optimizer through JSON configuration. I know that there is a separate list for DeepSpeed ZeRO-supported optimizers. Should I add it there as well?

@enneamer
enneamer force-pushed the upstream-pr/feat/lion branch from 951f88c to 50fa389 Compare September 15, 2023 02:37
@mrwyattii mrwyattii self-assigned this Sep 15, 2023
@mrwyattii

Copy link
Copy Markdown
Contributor

@enneamer
enneamer requested a review from samyam as a code owner September 21, 2023 13:55
@enneamer
enneamer force-pushed the upstream-pr/feat/lion branch from 2af7b40 to 0bbbd94 Compare September 21, 2023 14:09
@enneamer

Copy link
Copy Markdown
Contributor Author

@mrwyattii , I have added both optimizers to the supported optimizer list.

I have added some fixes and ran the newly added unit tests locally. It seems fine. However, my test machine is an ARM64 CUDA server, so the results of CPU/CUDA comparison test might differ from those of the CI check here. Let's see.

@enneamer
enneamer force-pushed the upstream-pr/feat/lion branch from 0bbbd94 to 7a50dc0 Compare September 23, 2023 00:35
@enneamer
enneamer force-pushed the upstream-pr/feat/lion branch from 7a50dc0 to ce80c8a Compare October 1, 2023 07:48
@enneamer

enneamer commented Oct 1, 2023

Copy link
Copy Markdown
Contributor Author

@mrwyattii , I just rebased the branch and noticed CI needs your approval again. Thank you for your help.

@mrwyattii

Copy link
Copy Markdown
Contributor

@mrwyattii , I just rebased the branch and noticed CI needs your approval again. Thank you for your help.

Just approved. Sorry for the delay, I was on vacation last week. I will get this merged this week. Thank you again for the contribution!

@enneamer

enneamer commented Oct 3, 2023

Copy link
Copy Markdown
Contributor Author

@mrwyattii , no problem at all. I wish you had a wonderful break.

It seems that the optimizers are fine. The failed tests seem to be related to ongoing development in DeepSpeed inference.

@tjruwase

tjruwase commented Oct 4, 2023

Copy link
Copy Markdown
Contributor

@enneamer, thanks for this incredible contribution. LGTM.

@mrwyattii
mrwyattii added this pull request to the merge queue Oct 4, 2023
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 4, 2023
@tjruwase
tjruwase added this pull request to the merge queue Oct 4, 2023
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 4, 2023
@tjruwase
tjruwase added this pull request to the merge queue Oct 4, 2023
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 4, 2023
@mrwyattii
mrwyattii added this pull request to the merge queue Oct 5, 2023
Merged via the queue into deepspeedai:master with commit 8e64c3b Oct 5, 2023
mauryaavinash95 pushed a commit to mauryaavinash95/DeepSpeed that referenced this pull request Oct 9, 2023
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.

4 participants