From 6dffa4b0a6120159ef2fe44d695a46817aff65bc Mon Sep 17 00:00:00 2001 From: Murali Andoorveedu <37849411+andoorve@users.noreply.github.com> Date: Thu, 8 Aug 2024 00:02:27 -0700 Subject: [PATCH] [Bugfix] Fix LoRA with PP (#7292) --- vllm/lora/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vllm/lora/models.py b/vllm/lora/models.py index 279477562a940..bc4cab1470f44 100644 --- a/vllm/lora/models.py +++ b/vllm/lora/models.py @@ -25,6 +25,7 @@ from vllm.lora.utils import (from_layer, from_layer_logits_processor, parse_fine_tuned_lora_name, replace_submodule) from vllm.model_executor.models.interfaces import SupportsLoRA +from vllm.model_executor.models.utils import PPMissingLayer from vllm.utils import is_pin_memory_available logger = init_logger(__name__) @@ -432,6 +433,8 @@ def remove_all_adapters(self): def _create_lora_modules(self): for module_name, module in self.model.named_modules( remove_duplicate=False): + if isinstance(module, PPMissingLayer): + continue if not self._match_target_modules(module_name): continue parts = module_name.split(".")[-1]