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 14, 05:30 UTC
[Misc] enhance static type hint (#23059)
Signed-off-by: Andy Xie <andy.xning@gmail.com>
Ning Xie committed
Aug 18, 2025 at 13:09 UTC
7be3a59d8ee7014d6462c258222cbfa8be815831
1 file changed
+3
-1
vllm/v1/worker/lora_model_runner_mixin.py
+3
-1
@@ -8,6 +8,7 @@ from contextlib import contextmanager
8
from typing import Union
9
10
import numpy as np
11
+import torch
12
import torch.nn as nn
13
14
from vllm.config import LoRAConfig, ModelConfig, SchedulerConfig
@@ -31,7 +32,8 @@ class LoRAModelRunnerMixin:
32
33
def load_lora_model(self, model: nn.Module, model_config: ModelConfig,
34
scheduler_config: SchedulerConfig,
34
- lora_config: LoRAConfig, device: str) -> nn.Module:
35
+ lora_config: LoRAConfig,
36
+ device: torch.device) -> nn.Module:
37
38
if not supports_lora(model):
39
raise ValueError(