@@ -117,6 +117,12 @@ def list_repo_files(
117117
118118 def lookup_files ():
119119 try :
120+ if VLLM_USE_MODELSCOPE :
121+ from vllm .transformers_utils .utils import (
122+ modelscope_list_repo_files )
123+ return modelscope_list_repo_files (repo_id ,
124+ revision = revision ,
125+ token = token )
120126 return hf_list_repo_files (repo_id ,
121127 revision = revision ,
122128 repo_type = repo_type ,
@@ -382,17 +388,17 @@ def get_hf_file_to_dict(file_name: str,
382388@cache
383389def get_pooling_config (model : str , revision : Optional [str ] = 'main' ):
384390 """
385- This function gets the pooling and normalize
386- config from the model - only applies to
387- sentence-transformers models.
391+ This function gets the pooling and normalize
392+ config from the model - only applies to
393+ sentence-transformers models.
388394
389395 Args:
390396 model (str): The name of the Hugging Face model.
391- revision (str, optional): The specific version
397+ revision (str, optional): The specific version
392398 of the model to use. Defaults to 'main'.
393399
394400 Returns:
395- dict: A dictionary containing the pooling
401+ dict: A dictionary containing the pooling
396402 type and whether normalization is used.
397403 """
398404
@@ -499,7 +505,7 @@ def get_sentence_transformer_tokenizer_config(model: str,
499505 revision = revision ,
500506 token = HF_TOKEN )
501507 except Exception as e :
502- logger .debug ("Error getting repo files" , e )
508+ logger .error ("Error getting repo files" , e )
503509 repo_files = []
504510
505511 for config_name in sentence_transformer_config_files :
0 commit comments