[Misc] Raise error for V1 not supporting Long LoRA. (#16415)

Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
This commit is contained in:
Jee Jee Li 2025-04-11 16:51:20 +08:00 committed by GitHub
parent aa3b3d76e0
commit a26f59ccbc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -2573,6 +2573,11 @@ class LoRAConfig:
logger.warning("LoRA with chunked prefill is still experimental "
"and may be unstable.")
def verify_lora_support(self):
if self.long_lora_scaling_factors is not None and envs.VLLM_USE_V1:
raise ValueError(
"V1 LoRA does not support long LoRA, please use V0.")
@dataclass
class PromptAdapterConfig:
@ -3672,6 +3677,7 @@ class VllmConfig:
self.lora_config.verify_with_model_config(self.model_config)
self.lora_config.verify_with_scheduler_config(
self.scheduler_config)
self.lora_config.verify_lora_support()
if self.prompt_adapter_config:
self.prompt_adapter_config.verify_with_model_config(
self.model_config)

View File

@ -364,7 +364,7 @@ class LoRAModelManager(AdapterModelManager):
self._last_mapping: Optional[LoRAMapping] = None
self._create_lora_modules()
self.model.lora_manager = self
self.adapter_type = 'LoRa'
self.adapter_type = 'LoRA'
@property
def capacity(self) -> int: