Skip to content

Conversation

@Luka-D
Copy link
Contributor

@Luka-D Luka-D commented Jun 5, 2025

I am trying to resolve this issue with dependabot updating to a new version of the peft library. The update has not been merged as it is encountering the following error:

from peft.tuners.lora.gptq import QuantLinear as LoraLinearGPTQ
ImportError: cannot import name 'QuantLinear' from 'peft.tuners.lora.gptq' (/home/tuning/.local/lib/python3.12/site-packages/peft/tuners/lora/gptq.py)

Turns out this is because QuantLinear has been renamed to GPTQLoraLinear in the newer version of peft. This can be seen in this commit.

So I have changed the import statement to import GPTQLoraLinear and modified the code not to use LoraLinearGPTQ anymore, as I felt it was pretty similar to the base class name which we could use instead.

Please let me know your thoughts.

Renaming QuantLinear to GPTQLoraLinear to match the changes made in the peft library.

Signed-off-by: Luka Dojcinovic <[email protected]>
@Luka-D Luka-D requested a review from fabianlim as a code owner June 5, 2025 20:52
Copy link
Collaborator

@willmj willmj left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@fabianlim fabianlim left a comment

Choose a reason for hiding this comment

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

im ok with this.. but it might make sense to lower bound the version of PEFT, since this will cause regression breakages.

Updated dependencies to include peft>=0.15

Signed-off-by: Luka Dojcinovic <[email protected]>
@Luka-D
Copy link
Contributor Author

Luka-D commented Jun 6, 2025

Thanks Fabian, I have pushed a new commit specifying "peft>=0.15" in the dependencies for foak and accelerate-peft

willmj added 2 commits June 10, 2025 09:46
Signed-off-by: Will Johnson <[email protected]>
Signed-off-by: Will Johnson <[email protected]>
@willmj willmj merged commit 179848a into foundation-model-stack:main Jun 10, 2025
7 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.

3 participants