-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
System Info
peft==0.15.2
torch==2.2.2
Who can help?
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examples
folder - My own task or dataset (give details below)
Reproduction
from peft import LoraConfig, get_peft_model
import torch
class MyModel(torch.nn.Module):
def __init__(self):
super(MyModel, self).__init__()
self.conv = torch.nn.Conv2d(96, 192, (3, 3), stride=(2, 2), padding=(1, 1), bias=False, groups=2)
self.fc = torch.nn.Linear(192, 10)
def forward(self, x):
x = self.conv(x)
x = self.fc(x)
return x
model = MyModel()
lora_config = LoraConfig(
r=16,
target_modules=["conv"],
use_dora=True
)
model = get_peft_model(model, lora_config)
Expected behavior
RuntimeError: shape '[192, 48, 3, 3]' is invalid for input of size 165888
165888 / (192 * 48 * 3 * 3) = 2
when groups=2
got an error
if groups=1
works fine
Metadata
Metadata
Assignees
Labels
No labels