[main] chore: add bias for base layer with lora (#22169)

This commit is contained in:
Yisheng Gong
2026-04-18 02:07:02 -07:00
committed by GitHub
parent ea20f1baa4
commit 4839cecbb0
+2
View File
@@ -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)