Skip to content

Commit c4fed91

Browse files
committed
[Bugfix] Fix Dense module loading for sentence-transformers embedding models v12
Signed-off-by: FFFfff1FFFfff <[email protected]>
1 parent bac4d91 commit c4fed91

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

vllm/transformers_utils/config.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
RWConfig, SpeculatorsConfig,
3838
Step3TextConfig, Step3VLConfig,
3939
UltravoxConfig)
40+
4041
# yapf: enable
4142
from vllm.transformers_utils.configs.mistral import adapt_config_dict
4243
from vllm.transformers_utils.utils import check_gguf_file
@@ -65,11 +66,6 @@ def _get_hf_token() -> Optional[str]:
6566
return token
6667
return None
6768

68-
69-
_CONFIG_REGISTRY_OVERRIDE_HF: dict[str, type[PretrainedConfig]] = {
70-
"mllama": MllamaConfig
71-
}
72-
7369
_CONFIG_REGISTRY: dict[str, type[PretrainedConfig]] = {
7470
"chatglm": ChatGLMConfig,
7571
"deepseek_vl_v2": DeepseekVLV2Config,
@@ -83,7 +79,6 @@ def _get_hf_token() -> Optional[str]:
8379
"eagle": EAGLEConfig,
8480
"speculators": SpeculatorsConfig,
8581
"nemotron": NemotronConfig,
86-
"NVLM_D": NVLM_D_Config,
8782
"ovis": OvisConfig,
8883
"ultravox": UltravoxConfig,
8984
"step3_vl": Step3VLConfig,
@@ -928,9 +923,9 @@ def get_hf_file_bytes(file_name: str,
928923
model: Union[str, Path],
929924
revision: Optional[str] = 'main') -> Optional[bytes]:
930925
file_path = try_get_local_file(model=model,
931-
file_name=file_name,
932-
revision=revision)
933-
926+
file_name=file_name,
927+
revision=revision)
928+
934929
if file_path is None:
935930
try:
936931
hf_hub_file = hf_hub_download(model,
@@ -940,12 +935,12 @@ def get_hf_file_bytes(file_name: str,
940935
file_path = Path(hf_hub_file)
941936
except Exception:
942937
return None
943-
938+
944939
if file_path is not None and file_path.is_file():
945940
try:
946941
with open(file_path, 'rb') as file:
947942
return file.read()
948943
except Exception:
949944
return None
950-
945+
951946
return None

0 commit comments

Comments
 (0)