Skip to content

Conversation

@pacman100
Copy link
Contributor

@pacman100 pacman100 commented Nov 10, 2023

What does this PR do?

  1. Speed up the peft lora unload
  2. PR Refactor base layer pattern peft#1106 should be merged first

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Nov 10, 2023

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

@pacman100 pacman100 marked this pull request as ready for review November 16, 2023 11:25
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 Sourab for making this work with the new PR on PEFT. I have some minor comments, no blockers.

For context, the mentioned PR is now merged and this change is necessary to work with PEFT main. We ran a test on OPT-350m, where we saw 15x speedup in unloading with the new changes.

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

@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 this and for taking care of the backward compatibility! left one suggestion above

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.

LGTM, thanks.

@patrickvonplaten
Copy link
Contributor

Thanks!

@patrickvonplaten patrickvonplaten merged commit 6f14353 into main Nov 17, 2023
@pacman100 pacman100 deleted the smangrul/peft-lora-unload-speedup branch November 25, 2023 05:38
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* Update peft_utils.py

* fix bug

* make the util backwards compatible.

Co-Authored-By: Younes Belkada <[email protected]>

* fix import issue

* refactor the backward compatibilty condition

* rename the conditional variable

* address comments

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

* address comment

---------

Co-authored-by: Younes Belkada <[email protected]>
Co-authored-by: Benjamin Bossan <[email protected]>
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* Update peft_utils.py

* fix bug

* make the util backwards compatible.

Co-Authored-By: Younes Belkada <[email protected]>

* fix import issue

* refactor the backward compatibilty condition

* rename the conditional variable

* address comments

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

* address comment

---------

Co-authored-by: Younes Belkada <[email protected]>
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.

6 participants