Modify efficient GPU training doc with now-available adamw_bnb_8bit optimizer#25807
Merged
amyeroberts merged 2 commits intohuggingface:mainfrom Aug 31, 2023
Merged
Conversation
Collaborator
|
cc @younesbelkada for BNB related stuff 🙏 |
Contributor
younesbelkada
left a comment
There was a problem hiding this comment.
This looks good, thanks, I left one question!
cc @SunMarc as well
stevhliu
approved these changes
Aug 29, 2023
Member
stevhliu
left a comment
There was a problem hiding this comment.
Thanks, I left some suggestions to make it more concise!
Co-authored-by: Steven Liu <[email protected]>
Contributor
Author
|
Thanks @stevhliu for the suggestions! |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
parambharat
pushed a commit
to parambharat/transformers
that referenced
this pull request
Sep 26, 2023
…ptimizer (huggingface#25807) * Modify single-GPU efficient training doc with now-available adamw_bnb_8bit optimizer * Apply suggestions from code review Co-authored-by: Steven Liu <[email protected]> --------- Co-authored-by: Steven Liu <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The documentation for efficient single-GPU training previously mentioned that the
adamw_bnb_8bitoptimizer could only be integrated using a third-party implementation. However, this is now available in Trainer directly as a result of this issue and corresponding PR.I think it's valuable to keep the 8-bit Adam entry in the documentation as it's a significant improvement over Adafactor. And I also think it's valuable to keep the sample integration with a third-party implementation of an optimizer for reference purposes. I have adjusted the documentation accordingly.
I was able to validate myself that both approaches, using Trainer directly with the
optimflag and doing the third-party integration still appear to work when fine-tuning small LLMs on a single GPU.Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@stevhliu and @MKhalusova