[mypy] Forward pass function type hints in lora (#11740)
Signed-off-by: lucast2021 <lucast2021@headroyce.org> Co-authored-by: lucast2021 <lucast2021@headroyce.org>
This commit is contained in:
co-authored by
lucast2021
parent
022c5c6944
commit
9c749713f6
+2
-1
@@ -4,7 +4,7 @@ import math
|
||||
import os
|
||||
import re
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, Callable, Dict, List, Optional, Sequence, Type
|
||||
from typing import Any, Callable, Dict, List, Optional, Sequence, Type, Union
|
||||
|
||||
import safetensors.torch
|
||||
import torch
|
||||
@@ -219,6 +219,7 @@ class LoRAModel(AdapterModel):
|
||||
|
||||
config["vllm_max_position_embeddings"] = max_position_embeddings
|
||||
peft_helper = PEFTHelper.from_dict(config)
|
||||
unexpected_modules: List[Union[list[str], str]]
|
||||
if os.path.isfile(lora_tensor_path):
|
||||
tensors: Dict[str, torch.Tensor] = {}
|
||||
# Find unexpected modules.
|
||||
|
||||
Reference in New Issue
Block a user