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 14, 23:45 UTC
[Bugfix] fix modelscope snapshot_download serialization (#21536)
Signed-off-by: Andy Xie <andy.xning@gmail.com>
Ning Xie committed
Jul 25, 2025 at 13:44 UTC
adaf2c6d4f4043d24d77559f2975dc8c80334566
1 file changed
+6
-6
vllm/model_executor/model_loader/default_loader.py
+6
-6
@@ -69,10 +69,10 @@ class DefaultModelLoader(BaseModelLoader):
69
# pylint: disable=C.
70
from modelscope.hub.snapshot_download import snapshot_download
71
72
- if not os.path.exists(model):
73
- # Use file lock to prevent multiple processes from
74
- # downloading the same model weights at the same time.
75
- with get_lock(model, self.load_config.download_dir):
72
+ # Use file lock to prevent multiple processes from
73
+ # downloading the same model weights at the same time.
74
+ with get_lock(model, self.load_config.download_dir):
75
+ if not os.path.exists(model):
76
model_path = snapshot_download(
77
model_id=model,
78
cache_dir=self.load_config.download_dir,
@@ -81,8 +81,8 @@ class DefaultModelLoader(BaseModelLoader):
81
revision=revision,
82
ignore_file_pattern=self.load_config.ignore_patterns,
83
)
84
- else:
85
- model_path = model
84
+ else:
85
+ model_path = model
86
return model_path
87
return None
88