@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / a26f59ccbc
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 14:45 UTC

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

Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>

Jee Jee Li committed Apr 11, 2025 at 16:51 UTC a26f59ccbc0ad4d72acce6595db0f128e83180f1
2 files changed +7 -1
vllm/config.py
+6
@@ -2573,6 +2573,11 @@ class LoRAConfig:
2573 logger.warning("LoRA with chunked prefill is still experimental "
2574 "and may be unstable.")
2575
2576 + def verify_lora_support(self):
2577 + if self.long_lora_scaling_factors is not None and envs.VLLM_USE_V1:
2578 + raise ValueError(
2579 + "V1 LoRA does not support long LoRA, please use V0.")
2580 +
2581
2582 @dataclass
2583 class PromptAdapterConfig:
@@ -3672,6 +3677,7 @@ class VllmConfig:
3677 self.lora_config.verify_with_model_config(self.model_config)
3678 self.lora_config.verify_with_scheduler_config(
3679 self.scheduler_config)
3680 + self.lora_config.verify_lora_support()
3681 if self.prompt_adapter_config:
3682 self.prompt_adapter_config.verify_with_model_config(
3683 self.model_config)
vllm/lora/models.py
+1 -1
@@ -364,7 +364,7 @@ class LoRAModelManager(AdapterModelManager):
364 self._last_mapping: Optional[LoRAMapping] = None
365 self._create_lora_modules()
366 self.model.lora_manager = self
367 - self.adapter_type = 'LoRa'
367 + self.adapter_type = 'LoRA'
368
369 @property
370 def capacity(self) -> int: