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

MergedLinear bug? #92

Closed
shipengai opened this issue Jun 20, 2023 · 2 comments
Closed

MergedLinear bug? #92

shipengai opened this issue Jun 20, 2023 · 2 comments

Comments

@shipengai
Copy link

Hi, I meet a issue:
after_B = F.conv1d(
RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [50, 14, 16, 14]

result = F.linear(x, T(self.weight), bias=self.bias) if self.r > 0: after_A = F.linear(self.lora_dropout(x), self.lora_A) after_B = F.conv1d( after_A.transpose(-2, -1), self.lora_B.unsqueeze(-1), groups=sum(self.enable_lora) ).transpose(-2, -1) result += self.zero_pad(after_B) * self.scaling
x.shape is [50, 14, 14, 768]
lora_A.shape is [16, 768]
after_A.shape is ([50, 14, 14, 16])

How to fix it?

@shipengai
Copy link
Author

I have fix it up.

@godlin-bd
Copy link

Hey bro, I met the same question as yours, could you please tell me how to fix it?

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

No branches or pull requests

2 participants