[Misc] Raise error for V1 not supporting Long LoRA. (#16415)
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
This commit is contained in:
@@ -2573,6 +2573,11 @@ class LoRAConfig:
|
|||||||
logger.warning("LoRA with chunked prefill is still experimental "
|
logger.warning("LoRA with chunked prefill is still experimental "
|
||||||
"and may be unstable.")
|
"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
|
@dataclass
|
||||||
class PromptAdapterConfig:
|
class PromptAdapterConfig:
|
||||||
@@ -3672,6 +3677,7 @@ class VllmConfig:
|
|||||||
self.lora_config.verify_with_model_config(self.model_config)
|
self.lora_config.verify_with_model_config(self.model_config)
|
||||||
self.lora_config.verify_with_scheduler_config(
|
self.lora_config.verify_with_scheduler_config(
|
||||||
self.scheduler_config)
|
self.scheduler_config)
|
||||||
|
self.lora_config.verify_lora_support()
|
||||||
if self.prompt_adapter_config:
|
if self.prompt_adapter_config:
|
||||||
self.prompt_adapter_config.verify_with_model_config(
|
self.prompt_adapter_config.verify_with_model_config(
|
||||||
self.model_config)
|
self.model_config)
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ class LoRAModelManager(AdapterModelManager):
|
|||||||
self._last_mapping: Optional[LoRAMapping] = None
|
self._last_mapping: Optional[LoRAMapping] = None
|
||||||
self._create_lora_modules()
|
self._create_lora_modules()
|
||||||
self.model.lora_manager = self
|
self.model.lora_manager = self
|
||||||
self.adapter_type = 'LoRa'
|
self.adapter_type = 'LoRA'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def capacity(self) -> int:
|
def capacity(self) -> int:
|
||||||
|
|||||||
Reference in New Issue
Block a user