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
norm
vllm
Commits
ed70c70e
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
Show 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
if
not
os
.
path
.
exists
(
model
):
model_path
=
snapshot_download
(
model_id
=
model
,
model_path
=
snapshot_download
(
model_id
=
model
,
cache_dir
=
download_dir
,
cache_dir
=
download_dir
,
revision
=
revision
)
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