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
39d3f8d9
Unverified
Commit
39d3f8d9
authored
Sep 28, 2024
by
tastelikefeet
Committed by
GitHub
Sep 28, 2024
Browse files
[Bugfix] Fix code for downloading models from modelscope (#8443)
parent
b0298aa8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
vllm/transformers_utils/__init__.py
vllm/transformers_utils/__init__.py
+17
-0
No files found.
vllm/transformers_utils/__init__.py
View file @
39d3f8d9
from
vllm.envs
import
VLLM_USE_MODELSCOPE
if
VLLM_USE_MODELSCOPE
:
# Patch here, before each import happens
import
modelscope
from
packaging
import
version
# patch_hub begins from modelscope>=1.18.1
if
version
.
parse
(
modelscope
.
__version__
)
<=
version
.
parse
(
'1.18.0'
):
raise
ImportError
(
'Using vLLM with ModelScope needs modelscope>=1.18.1, please '
'install by `pip install modelscope>=1.18.1`'
)
from
modelscope.utils.hf_util
import
patch_hub
# Patch hub to download models from modelscope to speed up.
patch_hub
()
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