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

add is_trainable in kwargs #363

Merged
merged 1 commit into from
May 15, 2023
Merged

Conversation

Opdoop
Copy link
Contributor

@Opdoop Opdoop commented May 12, 2023

What does this PR do?

This PR enables continue training of peft model by add is_trainable as a kwarg on from_pretained of PreTrainedWrapper. (ref. #342 (comment))

is_trainable is a parameter of PeftModel.from_pretrained() which enable continue training. LoraConfig do not have is_trainable parameter.

Use case example: huggingface/peft#282 (comment)
Source: https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L145

cc @lvwerra @younesbelkada

Add is_trainable in kwargs to enable continue training of peft model.
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented May 12, 2023

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

Copy link
Collaborator

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the clean work!
This looks great to me!

@younesbelkada younesbelkada merged commit a31bad8 into huggingface:main May 15, 2023
11 checks passed
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.

None yet

4 participants