[main] chore: add bias for base layer with lora (#22169)
This commit is contained in:
@@ -39,6 +39,8 @@ class BaseLayerWithLoRA(nn.Module):
|
||||
self.lora_backend: BaseLoRABackend = lora_backend
|
||||
if hasattr(self.base_layer, "weight"):
|
||||
self.weight = self.base_layer.weight
|
||||
if hasattr(self.base_layer, "bias") and self.base_layer.bias is not None:
|
||||
self.bias = self.base_layer.bias
|
||||
|
||||
def forward(self, x: torch.Tensor):
|
||||
return self.base_layer.forward(x)
|
||||
|
||||
Reference in New Issue
Block a user