-
Notifications
You must be signed in to change notification settings - Fork 1k
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
from_pretrain with peft adapter on the hub (# 379) #380
Conversation
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much! This looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for adding!
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.