Skip to content

Commit ec991fe

Browse files
lengrongfu22quinn
authored andcommitted
[Bugfix] when use s3 model cannot use default load_format (vllm-project#24435)
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io> Co-authored-by: 22quinn <33176974+22quinn@users.noreply.github.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
1 parent f429ca0 commit ec991fe

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

vllm/config/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3029,6 +3029,18 @@ def try_verify_and_update_config(self):
30293029
SequenceClassificationConfig)
30303030
SequenceClassificationConfig.verify_and_update_config(self)
30313031

3032+
if hasattr(self.model_config, "model_weights") and is_runai_obj_uri(
3033+
self.model_config.model_weights):
3034+
if self.load_config.load_format == "auto":
3035+
logger.info("Detected Run:ai model config. "
3036+
"Overriding `load_format` to 'runai_streamer'")
3037+
self.load_config.load_format = "runai_streamer"
3038+
elif self.load_config.load_format != "runai_streamer":
3039+
raise ValueError(f"To load a model from S3, 'load_format' "
3040+
f"must be 'runai_streamer', "
3041+
f"but got '{self.load_config.load_format}'. "
3042+
f"Model: {self.model_config.model}")
3043+
30323044
def __str__(self):
30333045
return (
30343046
f"model={self.model_config.model!r}, "

vllm/engine/arg_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,6 @@ def create_model_config(self) -> ModelConfig:
959959
if (not isinstance(self, AsyncEngineArgs) and envs.VLLM_CI_USE_S3
960960
and self.model in MODELS_ON_S3 and self.load_format == "auto"):
961961
self.model = f"{MODEL_WEIGHTS_S3_BUCKET}/{self.model}"
962-
self.load_format = "runai_streamer"
963962

964963
if self.disable_mm_preprocessor_cache:
965964
logger.warning(

0 commit comments

Comments
 (0)