Open jcrist1 opened 3 months ago
@EricLBuehler I could have a look at this if you think it looks like an issue
@jcrist1 yeah, this seems like an issue. May require modifying the macro itself, and/or adding features to the construction of layers to ensure recursive LoRA initialization.
I tried to instantiate a bert model with the following code:
cargo manifest
and model config
Which outputs
Importantly it doesn't seem to create lora weights for any of the encoder layers, only the embedding layers. I looked at the expanded code, and noticed that the generated constructor for a linear layer looks like this
But when I dig into
this.get_lora_model
I noticed that it doesn't actually use the self parameterFor comparison the
get_lora_model
of theBertEmbeddings
ends withIt seems like the macro isn't quite expanding correctly. Could this be the case?