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
754b699c
Unverified
Commit
754b699c
authored
May 13, 2025
by
Jon Gill
Committed by
GitHub
May 13, 2025
Browse files
[Bug]: Fix S3 model/tokenizer path resolution (#18083)
Signed-off-by:
Jon Gill
<
jon@yurts.ai
>
parent
6e27c6d8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
17 deletions
+24
-17
vllm/config.py
vllm/config.py
+24
-17
No files found.
vllm/config.py
View file @
754b699c
...
@@ -611,23 +611,30 @@ class ModelConfig:
...
@@ -611,23 +611,30 @@ class ModelConfig:
def
maybe_pull_model_tokenizer_for_s3
(
self
,
model
:
str
,
def
maybe_pull_model_tokenizer_for_s3
(
self
,
model
:
str
,
tokenizer
:
str
)
->
None
:
tokenizer
:
str
)
->
None
:
"""
"""Pull model/tokenizer from S3 to temporary directory when needed.
Pull the model config or tokenizer to a temporary
directory in case of S3.
Args:
Args:
model: The model name or path.
model: Model name or path
tokenizer: The tokenizer name or path.
tokenizer: Tokenizer name or path
"""
"""
if
is_s3
(
model
)
or
is_s3
(
tokenizer
):
if
not
(
is_s3
(
model
)
or
is_s3
(
tokenizer
)):
return
if
is_s3
(
model
):
if
is_s3
(
model
):
s3_model
=
S3Model
()
s3_model
=
S3Model
()
s3_model
.
pull_files
(
s3_model
.
pull_files
(
model
,
model
,
allow_pattern
=
[
"*.model"
,
"*.py"
,
"*.json"
])
allow_pattern
=
[
"*.model"
,
"*.py"
,
"*.json"
])
self
.
model_weights
=
self
.
model
self
.
model_weights
=
model
self
.
model
=
s3_model
.
dir
self
.
model
=
s3_model
.
dir
# If tokenizer is same as model, download to same directory
if
model
==
tokenizer
:
s3_model
.
pull_files
(
model
,
ignore_pattern
=
[
"*.pt"
,
"*.safetensors"
,
"*.bin"
])
self
.
tokenizer
=
s3_model
.
dir
return
# Only download tokenizer if needed and not already handled
if
is_s3
(
tokenizer
):
if
is_s3
(
tokenizer
):
s3_tokenizer
=
S3Model
()
s3_tokenizer
=
S3Model
()
s3_tokenizer
.
pull_files
(
s3_tokenizer
.
pull_files
(
...
...
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