Repository navigation
from_pretrain with peft adapter on the hub (# 379) - #380
Merged
Merged
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
younesbelkada
left a comment
Contributor
There was a problem hiding this comment.
Thank you very much for this!
I have one comment, I am not really comfortable using try/except directly on the PeftConfig.from_pretrained call as this might catch a lot of exceptions that we don't want to catch. How about using hf_hub_download as it was done before?
Contributor
Author
|
I just pushed a new version. I also added a few logging.info(). Let me know if that's a bad idea, I can revert that too. |
younesbelkada
approved these changes
May 25, 2023
younesbelkada
left a comment
Contributor
There was a problem hiding this comment.
Thanks very much! This looks good to me
lvwerra
approved these changes
May 26, 2023
lvwerra
left a comment
Member
There was a problem hiding this comment.
Looks good, thanks for adding!
yxliu-TAMU
pushed a commit
to mincheolseong/ECEN743-GRPO-Project-Proposal
that referenced
this pull request
Apr 20, 2025
* from_pretrain with peft adapter on the hub (# 379) * Update the comment * PR comment
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.
I also added a warning in case an adapter is found but a peft_config is also given. And I tried to simplify a bit since the same processing is done in PeftConfig.from_pretrained.
is_peft_available() is indirectly checked. If it is not installed, it will trigger an exception and trained_adapter_config will be set to None.
Let me know what you think. If you don't think this is an improvement, I can revert, no problem.