[Bugfix] Fix modelscope usage (#52431)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Cyrus Leung committed
Aug 15, 2026 at 17:40 UTC
5cecfc01375052698823fc401e31518fb32a981e
2 files changed
+3
-5
vllm/envs.py
+1
-2
@@ -716,9 +716,8 @@ environment_variables: dict[str, Callable[[], Any]] = {
716
"VLLM_RPC_BASE_PATH", tempfile.gettempdir()
717
),
718
# If true, will load models from ModelScope instead of Hugging Face Hub.
719
- # note that the value is true or false, not numbers
719
"VLLM_USE_MODELSCOPE": lambda: (
721
- os.environ.get("VLLM_USE_MODELSCOPE", "False").lower() == "true"
720
+ os.environ.get("VLLM_USE_MODELSCOPE", "False").strip().lower() in ("1", "true")
721
),
722
# If true, replace the Rust BPE backend that powers HF fast tokenizers
723
# with the `fastokens` (https://github.com/crusoecloud/fastokens) shim.
vllm/transformers_utils/utils.py
+2
-3
@@ -48,15 +48,14 @@ def modelscope_list_repo_files(
48
49
api = HubApi()
50
api.login(token)
51
+
52
# same as huggingface_hub.list_repo_files
52
- files = [
53
+ return [
54
file["Path"]
55
for file in api.get_model_files(
56
model_id=repo_id, revision=revision, recursive=True
57
)
57
- if file["Type"] == "blob"
58
]
59
- return files
59
60
61
def _maybe_json_dict(path: str | PathLike) -> dict[str, str]: