Skip to content

[Doc] Add how to use Lion optimizer#152

Merged
younesbelkada merged 11 commits intohuggingface:mainfrom
younesbelkada:lion-optimizer
Feb 21, 2023
Merged

[Doc] Add how to use Lion optimizer#152
younesbelkada merged 11 commits intohuggingface:mainfrom
younesbelkada:lion-optimizer

Conversation

@younesbelkada
Copy link
Copy Markdown
Contributor

@younesbelkada younesbelkada commented Feb 16, 2023

What does this PR do?

This PR adds LION optimizer from: https://arxiv.org/abs/2302.06675 / code source is: https://github.com/google/automl/blob/master/lion/lion_pytorch.py

For now it does not really seem to improve convergence in gpt-sentiment, but thought it would be nice to showcase that it can be applied for trl and used out of the box

EDIT: it seems to converge nicely after dividing the learning rate by 3, as suggested by the paper

cc @lvwerra @kashif

I think this is a nice-to-have artifact in this lib, as it reduces quite nicely the memory footprint of training (got 10% reduction)

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

HuggingFaceDocBuilderDev commented Feb 16, 2023

The documentation is not available anymore as the PR was closed or merged.

@younesbelkada younesbelkada changed the title Add Lion optimizer [Doc] Add how to use Lion optimizer Feb 16, 2023
Copy link
Copy Markdown
Member

@lvwerra lvwerra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two minor comments, otherwise looks good! ❤️

Comment thread docs/source/customization.mdx Outdated
Comment thread docs/source/customization.mdx Outdated
Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
Comment thread docs/source/customization.mdx Outdated
@younesbelkada younesbelkada merged commit 9eaea2e into huggingface:main Feb 21, 2023
@younesbelkada younesbelkada deleted the lion-optimizer branch February 21, 2023 19:08
yxliu-TAMU pushed a commit to mincheolseong/ECEN743-GRPO-Project-Proposal that referenced this pull request Apr 20, 2025
* add Lion optimizer

* remove files

* revert changes

* update docs

* use html instead

* correct link

* Update customization.mdx

* Update customization.mdx

* Update customization.mdx

* Update docs/source/customization.mdx

Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>

* Update docs/source/customization.mdx

---------

Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
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