From 87bc0c492f324a2b8b7566c9aa222921b514d4dc Mon Sep 17 00:00:00 2001 From: Jee Jee Li Date: Fri, 17 Oct 2025 12:43:16 +0800 Subject: [PATCH] [Bugfix] Fix ReplicatedLinearWithLoRA (#27065) Signed-off-by: Jee Jee Li --- vllm/lora/layers/replicated_linear.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vllm/lora/layers/replicated_linear.py b/vllm/lora/layers/replicated_linear.py index 5ad4a9f44f40..243736c4ebc6 100644 --- a/vllm/lora/layers/replicated_linear.py +++ b/vllm/lora/layers/replicated_linear.py @@ -56,3 +56,15 @@ class ReplicatedLinearWithLoRA(BaseLinearLayerWithLoRA): model_config: PretrainedConfig | None, ) -> bool: return type(source_layer) is ReplicatedLinear + + def slice_lora_a( + self, lora_a: torch.Tensor | list[torch.Tensor | None] + ) -> torch.Tensor | list[torch.Tensor | None]: + """Slice lora a if splitting for tensor parallelism.""" + return lora_a + + def slice_lora_b( + self, lora_b: torch.Tensor | list[torch.Tensor | None] + ) -> torch.Tensor | list[torch.Tensor | None]: + """Slice lora b if splitting with tensor parallelism.""" + return lora_b