From 4839cecbb0d304ed17e86eca897321f3d2b78648 Mon Sep 17 00:00:00 2001 From: Yisheng Gong Date: Sat, 18 Apr 2026 02:07:02 -0700 Subject: [PATCH] [main] chore: add bias for base layer with lora (#22169) --- python/sglang/srt/lora/layers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/sglang/srt/lora/layers.py b/python/sglang/srt/lora/layers.py index 8b596c7ef..502aaf23b 100644 --- a/python/sglang/srt/lora/layers.py +++ b/python/sglang/srt/lora/layers.py @@ -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)