mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-03-24 06:03:40 +08:00
update
Signed-off-by: bk-201 <joy25810@foxmail.com>
This commit is contained in:
parent
0fa9111e82
commit
882213cca2
@ -336,7 +336,7 @@ class LoRAModelManager:
|
||||
max_num_batched_tokens: int,
|
||||
vocab_size: int,
|
||||
lora_config: LoRAConfig,
|
||||
model_config: Optional[ModelConfig],
|
||||
model_config: ModelConfig | None,
|
||||
device: torch.device,
|
||||
):
|
||||
"""Create a LoRAModelManager and adapter for a given model.
|
||||
@ -709,7 +709,7 @@ class LoRAModelManager:
|
||||
return any([module_name.startswith(prefix) for prefix in prefix_lst])
|
||||
return False
|
||||
|
||||
def _get_mm_punica_wrapper(self, module_name: str) -> Optional[PunicaWrapperBase]:
|
||||
def _get_mm_punica_wrapper(self, module_name: str) -> PunicaWrapperBase | None:
|
||||
"""
|
||||
Match the corresponding punica_wrapper based on module_name,
|
||||
and return None if lora is not supported for this module.
|
||||
|
||||
@ -71,7 +71,7 @@ class WorkerLoRAManager:
|
||||
def create_lora_manager(
|
||||
self,
|
||||
model: torch.nn.Module,
|
||||
model_config: Optional[ModelConfig] = None,
|
||||
model_config: ModelConfig | None = None,
|
||||
) -> Any:
|
||||
lora_manager = create_lora_manager(
|
||||
model,
|
||||
@ -222,7 +222,7 @@ class LRUCacheWorkerLoRAManager(WorkerLoRAManager):
|
||||
def create_lora_manager(
|
||||
self,
|
||||
model: torch.nn.Module,
|
||||
model_config: Optional[ModelConfig] = None,
|
||||
model_config: ModelConfig | None = None,
|
||||
) -> Any:
|
||||
lora_manager = create_lora_manager(
|
||||
model,
|
||||
|
||||
@ -131,7 +131,10 @@ class LoRAModelRunnerMixin:
|
||||
|
||||
@contextmanager
|
||||
def maybe_select_dummy_loras(
|
||||
self, lora_config: LoRAConfig | None, num_scheduled_tokens: np.ndarray, is_mm_input: bool = False
|
||||
self,
|
||||
lora_config: LoRAConfig | None,
|
||||
num_scheduled_tokens: np.ndarray,
|
||||
is_mm_input: bool = False,
|
||||
):
|
||||
if lora_config is None:
|
||||
yield
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user