Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions vllm/transformers_utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ def file_exists(
# In offline mode the result can be a false negative
def file_or_path_exists(model: Union[str, Path], config_name: str,
revision: Optional[str]) -> bool:
if Path(model).exists():
return (Path(model) / config_name).is_file()
if (local_path := Path(model)).exists():
return (local_path / config_name).is_file()

# Offline mode support: Check if config file is cached already
cached_filepath = try_to_load_from_cache(repo_id=model,
Expand Down Expand Up @@ -492,7 +492,7 @@ def get_sentence_transformer_tokenizer_config(model: str,
if encoder_dict:
break

if not encoder_dict:
if not encoder_dict and not Path(model).exists():
try:
# If model is on HuggingfaceHub, get the repo files
repo_files = list_repo_files(model,
Expand Down