@@ -117,6 +117,12 @@ def list_repo_files(
117
117
118
118
def lookup_files ():
119
119
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 )
120
126
return hf_list_repo_files (repo_id ,
121
127
revision = revision ,
122
128
repo_type = repo_type ,
@@ -382,17 +388,17 @@ def get_hf_file_to_dict(file_name: str,
382
388
@cache
383
389
def get_pooling_config (model : str , revision : Optional [str ] = 'main' ):
384
390
"""
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.
388
394
389
395
Args:
390
396
model (str): The name of the Hugging Face model.
391
- revision (str, optional): The specific version
397
+ revision (str, optional): The specific version
392
398
of the model to use. Defaults to 'main'.
393
399
394
400
Returns:
395
- dict: A dictionary containing the pooling
401
+ dict: A dictionary containing the pooling
396
402
type and whether normalization is used.
397
403
"""
398
404
@@ -499,7 +505,7 @@ def get_sentence_transformer_tokenizer_config(model: str,
499
505
revision = revision ,
500
506
token = HF_TOKEN )
501
507
except Exception as e :
502
- logger .debug ("Error getting repo files" , e )
508
+ logger .error ("Error getting repo files" , e )
503
509
repo_files = []
504
510
505
511
for config_name in sentence_transformer_config_files :
0 commit comments