LoRA icon indicating copy to clipboard operation
LoRA copied to clipboard

Probably a bug in the lora embeding class in loralib/layers.py

Open favorart opened this issue 1 year ago • 2 comments

Is there a bug on that line or incorrect comment? https://github.com/microsoft/LoRA/blob/3f5c193f431c8a09448f0184f6f883ad393f22d0/loralib/layers.py#L59C27-L59C27

The names of the fields are exchanged

# initialize A the same way as the default for nn.Linear and B to zero
nn.init.zeros_(self.lora_A)
nn.init.normal_(self.lora_B)

favorart avatar Sep 05 '23 18:09 favorart

Nice catch, I saw this too and came to check out if there are any issues pertaining to this! I am sure it is simply a typo, but I'd wait for the authors to respond too to clarify this.

vishaal27 avatar Sep 10 '23 12:09 vishaal27

Ahh just stumbled upon this where the authors responded: https://github.com/microsoft/LoRA/issues/114

vishaal27 avatar Sep 10 '23 12:09 vishaal27