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 Use correct attribute name for HQQ in merge #1791

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/peft/tuners/lora/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ def _replace_module(self, parent, child_name, new_module, child):
child = child.base_layer

if not hasattr(new_module, "base_layer"):
new_module.weight = child.weight
if hasattr(new_module, "W_q"): # HQQ
new_module.W_q = child.W_q
else:
new_module.weight = child.weight
if hasattr(child, "bias"):
new_module.bias = child.bias

Expand Down
Loading