Skip to content

Commit 61784b4

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

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

requirements/test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,4 +1241,4 @@ yarl==1.17.1
12411241
zipp==3.23.0
12421242
# via importlib-metadata
12431243
zstandard==0.23.0
1244-
# via lm-eval
1244+
# via lm-eval

vllm/transformers_utils/config.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
RWConfig, SpeculatorsConfig,
3838
Step3TextConfig, Step3VLConfig,
3939
UltravoxConfig)
40-
4140
# yapf: enable
4241
from vllm.transformers_utils.configs.mistral import adapt_config_dict
4342
from vllm.transformers_utils.utils import check_gguf_file
@@ -929,9 +928,9 @@ def get_hf_file_bytes(file_name: str,
929928
model: Union[str, Path],
930929
revision: Optional[str] = 'main') -> Optional[bytes]:
931930
file_path = try_get_local_file(model=model,
932-
file_name=file_name,
933-
revision=revision)
934-
931+
file_name=file_name,
932+
revision=revision)
933+
935934
if file_path is None:
936935
try:
937936
hf_hub_file = hf_hub_download(model,
@@ -941,12 +940,12 @@ def get_hf_file_bytes(file_name: str,
941940
file_path = Path(hf_hub_file)
942941
except Exception:
943942
return None
944-
943+
945944
if file_path is not None and file_path.is_file():
946945
try:
947946
with open(file_path, 'rb') as file:
948947
return file.read()
949948
except Exception:
950949
return None
951-
950+
952951
return None

0 commit comments

Comments
 (0)