microsoft / LoRA

Code for loralib, an implementation of "LoRA: Low-Rank Adaptation of Large Language Models"
https://arxiv.org/abs/2106.09685
MIT License
10.78k stars 688 forks source link

AttributeError: 'lora.Conv2d' object has no attribute 'weight' #134

Closed bjzhb666 closed 1 year ago

bjzhb666 commented 1 year ago

Thanks for your great work!

When I use loralib-0.1.2, I get this error. In nn.Conv2d, it has the attribute 'weight'. I think it is better to add weight attribute to our lora.Conv2d.

It is interesting that in version loralib-0.1.1, lora.Conv2d has this attribute, but in the latest version, my code gives me this bug.

### Tasks
RasmusD commented 1 year ago

It's because of this PR: https://github.com/microsoft/LoRA/pull/63

edwardjhu commented 1 year ago

Good catch. It's now self.conv.weight.

bjzhb666 commented 1 year ago

Thanks for your replies!