mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-17 23:34:27 +08:00
[Bugfix] GGUF: fix AttributeError: 'PosixPath' object has no attribute 'startswith' (#21579)
Signed-off-by: Kebe <mail@kebe7jun.com>
This commit is contained in:
parent
8ed01e32f7
commit
7311f74468
@ -584,7 +584,7 @@ def get_pooling_config_name(pooling_name: str) -> Union[str, None]:
|
|||||||
|
|
||||||
|
|
||||||
@cache
|
@cache
|
||||||
def get_sentence_transformer_tokenizer_config(model: str,
|
def get_sentence_transformer_tokenizer_config(model: Union[str, Path],
|
||||||
revision: Optional[str] = 'main'
|
revision: Optional[str] = 'main'
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
@ -592,7 +592,7 @@ def get_sentence_transformer_tokenizer_config(model: str,
|
|||||||
given Sentence Transformer BERT model.
|
given Sentence Transformer BERT model.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
- model (str): The name of the Sentence Transformer
|
- model (str|Path): The name of the Sentence Transformer
|
||||||
BERT model.
|
BERT model.
|
||||||
- revision (str, optional): The revision of the m
|
- revision (str, optional): The revision of the m
|
||||||
odel to use. Defaults to 'main'.
|
odel to use. Defaults to 'main'.
|
||||||
@ -620,7 +620,7 @@ def get_sentence_transformer_tokenizer_config(model: str,
|
|||||||
if encoder_dict:
|
if encoder_dict:
|
||||||
break
|
break
|
||||||
|
|
||||||
if not encoder_dict and not model.startswith("/"):
|
if not encoder_dict and not Path(model).is_absolute():
|
||||||
try:
|
try:
|
||||||
# If model is on HuggingfaceHub, get the repo files
|
# If model is on HuggingfaceHub, get the repo files
|
||||||
repo_files = list_repo_files(model,
|
repo_files = list_repo_files(model,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user