mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-17 21:46:52 +08:00
address ci issue
Signed-off-by: bk-201 <joy25810@foxmail.com>
This commit is contained in:
parent
5ff0c6fb73
commit
d3c2f3dbe3
@ -65,8 +65,8 @@ class LoRAModelManager:
|
|||||||
max_num_batched_tokens: int,
|
max_num_batched_tokens: int,
|
||||||
vocab_size: int,
|
vocab_size: int,
|
||||||
lora_config: LoRAConfig,
|
lora_config: LoRAConfig,
|
||||||
vllm_config: VllmConfig,
|
|
||||||
device: torch.device,
|
device: torch.device,
|
||||||
|
vllm_config: VllmConfig | None = None,
|
||||||
):
|
):
|
||||||
"""Create a LoRAModelManager and adapter for a given model.
|
"""Create a LoRAModelManager and adapter for a given model.
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ class LoRAModelManager:
|
|||||||
|
|
||||||
self.model.lora_manager = self
|
self.model.lora_manager = self
|
||||||
|
|
||||||
def _init_multimodal_config(self, vllm_config: VllmConfig):
|
def _init_multimodal_config(self, vllm_config: VllmConfig | None = None):
|
||||||
# Used to indicate whether the model is a multimodal model
|
# Used to indicate whether the model is a multimodal model
|
||||||
self.supports_mm: bool = (
|
self.supports_mm: bool = (
|
||||||
supports_multimodal(self.model)
|
supports_multimodal(self.model)
|
||||||
@ -125,7 +125,7 @@ class LoRAModelManager:
|
|||||||
|
|
||||||
self.supports_mm_lora = False
|
self.supports_mm_lora = False
|
||||||
|
|
||||||
if self.supports_mm:
|
if self.supports_mm and vllm_config is not None:
|
||||||
model_config: ModelConfig = vllm_config.model_config
|
model_config: ModelConfig = vllm_config.model_config
|
||||||
self.mm_mapping: MultiModelKeys = self.model.get_mm_mapping()
|
self.mm_mapping: MultiModelKeys = self.model.get_mm_mapping()
|
||||||
if self.lora_config.enable_mm_lora:
|
if self.lora_config.enable_mm_lora:
|
||||||
@ -708,8 +708,8 @@ class LRUCacheLoRAModelManager(LoRAModelManager):
|
|||||||
max_num_batched_tokens: int,
|
max_num_batched_tokens: int,
|
||||||
vocab_size: int,
|
vocab_size: int,
|
||||||
lora_config: LoRAConfig,
|
lora_config: LoRAConfig,
|
||||||
vllm_config: VllmConfig,
|
|
||||||
device: torch.device,
|
device: torch.device,
|
||||||
|
vllm_config: VllmConfig | None = None,
|
||||||
):
|
):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
model,
|
model,
|
||||||
@ -717,8 +717,8 @@ class LRUCacheLoRAModelManager(LoRAModelManager):
|
|||||||
max_num_batched_tokens,
|
max_num_batched_tokens,
|
||||||
vocab_size,
|
vocab_size,
|
||||||
lora_config,
|
lora_config,
|
||||||
vllm_config,
|
|
||||||
device,
|
device,
|
||||||
|
vllm_config,
|
||||||
)
|
)
|
||||||
self._registered_adapters: LoRALRUCache = LoRALRUCache(
|
self._registered_adapters: LoRALRUCache = LoRALRUCache(
|
||||||
self.capacity, self.deactivate_adapter
|
self.capacity, self.deactivate_adapter
|
||||||
|
|||||||
@ -69,7 +69,7 @@ class WorkerLoRAManager:
|
|||||||
def create_lora_manager(
|
def create_lora_manager(
|
||||||
self,
|
self,
|
||||||
model: torch.nn.Module,
|
model: torch.nn.Module,
|
||||||
vllm_config: VllmConfig,
|
vllm_config: VllmConfig | None = None,
|
||||||
) -> Any:
|
) -> Any:
|
||||||
lora_manager = create_lora_manager(
|
lora_manager = create_lora_manager(
|
||||||
model,
|
model,
|
||||||
@ -212,7 +212,7 @@ class LRUCacheWorkerLoRAManager(WorkerLoRAManager):
|
|||||||
def create_lora_manager(
|
def create_lora_manager(
|
||||||
self,
|
self,
|
||||||
model: torch.nn.Module,
|
model: torch.nn.Module,
|
||||||
vllm_config: VllmConfig,
|
vllm_config: VllmConfig | None = None,
|
||||||
) -> Any:
|
) -> Any:
|
||||||
lora_manager = create_lora_manager(
|
lora_manager = create_lora_manager(
|
||||||
model,
|
model,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user