Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
f7d2946e
Unverified
Commit
f7d2946e
authored
Nov 03, 2025
by
pwschuurman
Committed by
GitHub
Nov 03, 2025
Browse files
[Bugfix] Skip gs:// model paths for speculator detection (#27846)
Signed-off-by:
Peter Schuurman
<
psch@google.com
>
parent
294c805f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
5 deletions
+39
-5
tests/transformers_utils/test_utils.py
tests/transformers_utils/test_utils.py
+26
-0
vllm/engine/arg_utils.py
vllm/engine/arg_utils.py
+5
-5
vllm/transformers_utils/utils.py
vllm/transformers_utils/utils.py
+8
-0
No files found.
tests/transformers_utils/test_utils.py
0 → 100644
View file @
f7d2946e
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from
vllm.transformers_utils.utils
import
is_cloud_storage
,
is_gcs
,
is_s3
def
test_is_gcs
():
assert
is_gcs
(
"gs://model-path"
)
assert
not
is_gcs
(
"s3://model-path/path-to-model"
)
assert
not
is_gcs
(
"/unix/local/path"
)
assert
not
is_gcs
(
"nfs://nfs-fqdn.local"
)
def
test_is_s3
():
assert
is_s3
(
"s3://model-path/path-to-model"
)
assert
not
is_s3
(
"gs://model-path"
)
assert
not
is_s3
(
"/unix/local/path"
)
assert
not
is_s3
(
"nfs://nfs-fqdn.local"
)
def
test_is_cloud_storage
():
assert
is_cloud_storage
(
"gs://model-path"
)
assert
is_cloud_storage
(
"s3://model-path/path-to-model"
)
assert
not
is_cloud_storage
(
"/unix/local/path"
)
assert
not
is_cloud_storage
(
"nfs://nfs-fqdn.local"
)
vllm/engine/arg_utils.py
View file @
f7d2946e
...
@@ -86,7 +86,7 @@ from vllm.transformers_utils.config import (
...
@@ -86,7 +86,7 @@ from vllm.transformers_utils.config import (
is_interleaved
,
is_interleaved
,
maybe_override_with_speculators
,
maybe_override_with_speculators
,
)
)
from
vllm.transformers_utils.utils
import
check_gguf_file
,
is_
s3
from
vllm.transformers_utils.utils
import
check_gguf_file
,
is_
cloud_storage
from
vllm.utils.argparse_utils
import
FlexibleArgumentParser
from
vllm.utils.argparse_utils
import
FlexibleArgumentParser
from
vllm.utils.mem_constants
import
GiB_bytes
from
vllm.utils.mem_constants
import
GiB_bytes
from
vllm.utils.network_utils
import
get_ip
from
vllm.utils.network_utils
import
get_ip
...
@@ -1310,10 +1310,10 @@ class EngineArgs:
...
@@ -1310,10 +1310,10 @@ class EngineArgs:
# Check if the model is a speculator and override model/tokenizer/config
# Check if the model is a speculator and override model/tokenizer/config
# BEFORE creating ModelConfig, so the config is created with the target model
# BEFORE creating ModelConfig, so the config is created with the target model
# Skip speculator detection for
S3 models since HuggingFace cannot load
# Skip speculator detection for
cloud storage models (eg: S3, GCS) since
# configs directly from S3 URLs. S3 models can still
use speculators with
#
HuggingFace cannot load
configs directly from S3 URLs. S3 models can still
# explicit --speculative-config.
#
use speculators with
explicit --speculative-config.
if
not
is_
s3
(
self
.
model
):
if
not
is_
cloud_storage
(
self
.
model
):
(
self
.
model
,
self
.
tokenizer
,
self
.
speculative_config
)
=
(
(
self
.
model
,
self
.
tokenizer
,
self
.
speculative_config
)
=
(
maybe_override_with_speculators
(
maybe_override_with_speculators
(
model
=
self
.
model
,
model
=
self
.
model
,
...
...
vllm/transformers_utils/utils.py
View file @
f7d2946e
...
@@ -19,6 +19,14 @@ def is_s3(model_or_path: str) -> bool:
...
@@ -19,6 +19,14 @@ def is_s3(model_or_path: str) -> bool:
return
model_or_path
.
lower
().
startswith
(
"s3://"
)
return
model_or_path
.
lower
().
startswith
(
"s3://"
)
def
is_gcs
(
model_or_path
:
str
)
->
bool
:
return
model_or_path
.
lower
().
startswith
(
"gs://"
)
def
is_cloud_storage
(
model_or_path
:
str
)
->
bool
:
return
is_s3
(
model_or_path
)
or
is_gcs
(
model_or_path
)
def
check_gguf_file
(
model
:
str
|
PathLike
)
->
bool
:
def
check_gguf_file
(
model
:
str
|
PathLike
)
->
bool
:
"""Check if the file is a GGUF model."""
"""Check if the file is a GGUF model."""
model
=
Path
(
model
)
model
=
Path
(
model
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment