Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SIYIXNI
vllm
Commits
ed70c70e
"exampleREAD" did not exist on "fcba889ef461bb334e8f74ea465713f5b7611855"
Unverified
Commit
ed70c70e
authored
Feb 07, 2024
by
liuyhwangyh
Committed by
GitHub
Feb 06, 2024
Browse files
modelscope: fix issue when model parameter is not a model id but path of the model. (#2489)
parent
f0d4e145
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
vllm/config.py
vllm/config.py
+6
-3
No files found.
vllm/config.py
View file @
ed70c70e
...
@@ -93,9 +93,12 @@ class ModelConfig:
...
@@ -93,9 +93,12 @@ class ModelConfig:
# download model from ModelScope hub,
# download model from ModelScope hub,
# lazy import so that modelscope is not required for normal use.
# lazy import so that modelscope is not required for normal use.
from
modelscope.hub.snapshot_download
import
snapshot_download
# pylint: disable=C
from
modelscope.hub.snapshot_download
import
snapshot_download
# pylint: disable=C
model_path
=
snapshot_download
(
model_id
=
model
,
if
not
os
.
path
.
exists
(
model
):
cache_dir
=
download_dir
,
model_path
=
snapshot_download
(
model_id
=
model
,
revision
=
revision
)
cache_dir
=
download_dir
,
revision
=
revision
)
else
:
model_path
=
model
self
.
model
=
model_path
self
.
model
=
model_path
self
.
download_dir
=
model_path
self
.
download_dir
=
model_path
self
.
tokenizer
=
model_path
self
.
tokenizer
=
model_path
...
...
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