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

fix the embedding saving for adaption prompt #1314

Merged
merged 6 commits into from
Jan 3, 2024

Conversation

pacman100
Copy link
Contributor

@pacman100 pacman100 commented Jan 1, 2024

What does this PR do?

  1. For Adaption prompt, the embedding saving feature is currently broken. This PR fixes that.
  2. Automate setting save_embedding_layers when embedding layer is resized during finetuning

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@pacman100 pacman100 requested review from BenjaminBossan and younesbelkada and removed request for BenjaminBossan January 1, 2024 19:01
@pacman100 pacman100 marked this pull request as ready for review January 1, 2024 19:01
Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Nice catch. I have a small suggestion to be on the super safe side. It would also be nice to have a test, but not a must.

src/peft/utils/save_and_load.py Outdated Show resolved Hide resolved
@pacman100 pacman100 removed the request for review from younesbelkada January 2, 2024 20:30
Co-Authored-By: Benjamin Bossan <[email protected]>
@pacman100
Copy link
Contributor Author

It would also be nice to have a test, but not a must.

Will do it in a follow up PR

Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@pacman100 pacman100 merged commit cbf346d into main Jan 3, 2024
14 checks passed
@sayakpaul sayakpaul deleted the smangrul/fix-embedding-layer-resizing-support branch January 3, 2024 15:05
YuliangXiu pushed a commit to yfeng95/peft that referenced this pull request Jan 8, 2024
* fix the embedding saving for adaption prompt

* fix

* automate setting `save_embedding_layers` when embedding layer is resized during finetuning

* fix

* address comment

Co-Authored-By: Benjamin Bossan <[email protected]>

* oops

---------

Co-authored-by: Benjamin Bossan <[email protected]>
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