Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[training] use the lr when using 8bit adam. #9796

Merged
merged 3 commits into from
Oct 31, 2024
Merged

Conversation

sayakpaul
Copy link
Member

What does this PR do?

Oops.

@a-r-r-o-w FYI.

@sayakpaul sayakpaul requested a review from linoytsaban October 29, 2024 12:13
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@linoytsaban linoytsaban left a comment

Choose a reason for hiding this comment

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

Nice catch!

@sayakpaul
Copy link
Member Author

@linoytsaban sorry I think I went too soon with the PR. I realized that we ALWAYS pack "lr" in params_to_optimize irrespective of the optimizer class we're using.

So, I think you were right not to pass the lr. However, when using "prodigy" we were still passing lr. So, to remove the inconsistency, I omitted those instances in this PR. Could you please give this another look?

Cc: @a-r-r-o-w for the changed Cog scripts.

Copy link
Member

@a-r-r-o-w a-r-r-o-w left a comment

Choose a reason for hiding this comment

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

Looks good! IIUC, since LR is already packed with parameters, no need to pass it to optimizer_class when creating it - this inconsistency was there in some of our scripts?

@sayakpaul
Copy link
Member Author

Correct. And this PR resolves that.

@sayakpaul sayakpaul merged commit 8ce37ab into main Oct 31, 2024
11 checks passed
@sayakpaul sayakpaul deleted the use-lr-optim-class branch October 31, 2024 10:21
a-r-r-o-w pushed a commit that referenced this pull request Nov 1, 2024
* use the lr when using 8bit adam.

* remove lr as we pack it in params_to_optimize.

---------

Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com>
sayakpaul added a commit that referenced this pull request Dec 23, 2024
* use the lr when using 8bit adam.

* remove lr as we pack it in params_to_optimize.

---------

Co-authored-by: Linoy Tsaban <57615435+linoytsaban@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.

4 participants