We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36ec5a8 commit 954a6ddCopy full SHA for 954a6dd
vllm/transformers_utils/__init__.py
@@ -0,0 +1,17 @@
1
+from vllm.envs import VLLM_USE_MODELSCOPE
2
+
3
+if VLLM_USE_MODELSCOPE:
4
+ # Patch here, before each import happens
5
+ import modelscope
6
+ from packaging import version
7
8
+ # patch_hub begins from modelscope>=1.18.1
9
+ if version.parse(modelscope.__version__) <= version.parse('1.18.0'):
10
+ raise ImportError(
11
+ 'Using vLLM with ModelScope needs modelscope>=1.18.1, please '
12
+ 'install by `pip install modelscope>=1.18.1`')
13
14
+ from modelscope.utils.hf_util import patch_hub
15
16
+ # Patch hub to download models from modelscope to speed up.
17
+ patch_hub()
0 commit comments