Skip to content

[core] refactor peft API#231

Merged
younesbelkada merged 12 commits intomainfrom
refactor-peft-api
Mar 21, 2023
Merged

[core] refactor peft API#231
younesbelkada merged 12 commits intomainfrom
refactor-peft-api

Conversation

@younesbelkada
Copy link
Copy Markdown
Contributor

This PR slightly refactors the way we use / load peft models

For now I think it is important to let users pass the PeftConfig to from_pretrained , as it is an essential component for create peft models

I also think that we should be able to pass prepare_int8_training kwargs directly to from_pretrained as well, since sometimes you need some tweaks to enable int8 training

This PR is also fully backward compatible with the previous API

cc @lvwerra

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

HuggingFaceDocBuilderDev commented Mar 20, 2023

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

Comment thread examples/sentiment/scripts/gpt2-sentiment_peft.py Outdated
@younesbelkada
Copy link
Copy Markdown
Contributor Author

younesbelkada commented Mar 20, 2023

GPT2 sentiment script: https://wandb.ai/distill-bloom/trl/runs/jvg0lxz7?workspace=user-younesbelkada
will run the NPP script with the new API soon
EDIT: please ignore the above run

@younesbelkada
Copy link
Copy Markdown
Contributor Author

@younesbelkada younesbelkada requested a review from lvwerra March 20, 2023 17:28
Copy link
Copy Markdown
Member

@lvwerra lvwerra left a comment

Choose a reason for hiding this comment

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

One comment otherwise looks good to me!

Comment thread docs/source/sentiment_tuning_peft.mdx
@younesbelkada younesbelkada merged commit 0610711 into main Mar 21, 2023
@younesbelkada younesbelkada deleted the refactor-peft-api branch March 21, 2023 12:35
yxliu-TAMU pushed a commit to mincheolseong/ECEN743-GRPO-Project-Proposal that referenced this pull request Apr 20, 2025
* refactor peft API

* update gpt2 peft script

* refactor

* few fixes

* fix bug

* make style

* update docs

* more update

* fix docs

* fix issues and add tests

* make style

* update dcos
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.

3 participants