mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 02:44:57 +08:00
[Misc] enhance static type hint (#23059)
Signed-off-by: Andy Xie <andy.xning@gmail.com>
This commit is contained in:
parent
8ea0c2753a
commit
7be3a59d8e
@ -8,6 +8,7 @@ from contextlib import contextmanager
|
||||
from typing import Union
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
|
||||
from vllm.config import LoRAConfig, ModelConfig, SchedulerConfig
|
||||
@ -31,7 +32,8 @@ class LoRAModelRunnerMixin:
|
||||
|
||||
def load_lora_model(self, model: nn.Module, model_config: ModelConfig,
|
||||
scheduler_config: SchedulerConfig,
|
||||
lora_config: LoRAConfig, device: str) -> nn.Module:
|
||||
lora_config: LoRAConfig,
|
||||
device: torch.device) -> nn.Module:
|
||||
|
||||
if not supports_lora(model):
|
||||
raise ValueError(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user