A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 08:30 UTC
[BUGFIX] catch subclass first for try...except (#18672)
Signed-off-by: Andy Xie <andy.xning@gmail.com>
Ning Xie committed
May 25, 2025 at 13:34 UTC
44073a7ac338c511dff0ba6cbec0d932f51ac364
1 file changed
+3
-2
vllm/model_executor/model_loader/weight_utils.py
+3
-2
@@ -319,6 +319,7 @@ def download_safetensors_index_file_from_hf(
319
320
Args:
321
model_name_or_path (str): The model name or path.
322
+ index_file (str): The safetensors index file name
323
cache_dir (Optional[str]): The cache directory to store the model
324
weights. If None, will use HF defaults.
325
revision (Optional[str]): The revision of the model.
@@ -337,10 +338,10 @@ def download_safetensors_index_file_from_hf(
338
)
339
# If file not found on remote or locally, we should not fail since
340
# only some models will have index_file.
340
- except huggingface_hub.utils.EntryNotFoundError:
341
- logger.info("No %s found in remote.", index_file)
341
except huggingface_hub.utils.LocalEntryNotFoundError:
342
logger.info("No %s found in local cache.", index_file)
343
+ except huggingface_hub.utils.EntryNotFoundError:
344
+ logger.info("No %s found in remote.", index_file)
345
346
347
# For models like Mistral-7B-v0.3, there are both sharded