{"id":50507499,"url":"https://github.com/modelscope/modelscope_hub","last_synced_at":"2026-06-02T17:03:25.703Z","repository":{"id":360956933,"uuid":"1252118249","full_name":"modelscope/modelscope_hub","owner":"modelscope","description":"The official Python client to connect with ModelScope Hub.","archived":false,"fork":false,"pushed_at":"2026-05-28T14:45:55.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T16:22:41.866Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modelscope.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-28T07:52:49.000Z","updated_at":"2026-05-28T14:46:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/modelscope/modelscope_hub","commit_stats":null,"previous_names":["modelscope/modelscope_hub"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/modelscope/modelscope_hub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope_hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope_hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope_hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope_hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modelscope","download_url":"https://codeload.github.com/modelscope/modelscope_hub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope_hub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33831629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-02T17:03:24.981Z","updated_at":"2026-06-02T17:03:25.696Z","avatar_url":"https://github.com/modelscope.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cbr\u003e\n    \u003cimg src=\"https://modelscope.oss-cn-beijing.aliyuncs.com/modelscope.gif\" width=\"400\"/\u003e\n    \u003cbr\u003e\n\u003cp\u003e\n\n\u003cdiv align=\"center\"\u003e\n\nThe official Python SDK \u0026 CLI for [ModelScope Hub](https://modelscope.cn) — download, upload, and manage AI assets from one unified interface.\n\n[![PyPI](https://img.shields.io/pypi/v/modelscope-hub)](https://pypi.org/project/modelscope-hub/)\n[![Python](https://img.shields.io/pypi/pyversions/modelscope-hub)](https://pypi.org/project/modelscope-hub/)\n[![license](https://img.shields.io/github/license/modelscope/modelscope_hub.svg)](https://github.com/modelscope/modelscope_hub/blob/main/LICENSE)\n[![open issues](https://isitmaintained.com/badge/open/modelscope/modelscope_hub.svg)](https://github.com/modelscope/modelscope_hub/issues)\n[![GitHub pull-requests](https://img.shields.io/github/issues-pr/modelscope/modelscope_hub.svg)](https://github.com/modelscope/modelscope_hub/pulls)\n[![GitHub latest commit](https://badgen.net/github/last-commit/modelscope/modelscope_hub)](https://github.com/modelscope/modelscope_hub/commits/main)\n\n[modelscope.cn](https://modelscope.cn) | [modelscope.ai](https://modelscope.ai)\n\n\u003c/div\u003e\n\n## Why modelscope-hub?\n\n`modelscope-hub` connects your code to the [ModelScope](https://modelscope.cn) ecosystem — models, datasets, Studio spaces, skills, and MCP servers — through a single `HubApi` class or the `ms` CLI.\n\n- **Unified repo interface** — one set of methods for models, datasets, studios, skills, and MCP servers\n- **OpenAPI-first** — built on the ModelScope OpenAPI surface with transparent legacy fallback\n- **Production-grade downloads** — HTTP Range resume, parallel range download for large files, per-file retry with backoff, SHA256 integrity checks, file lock for multiprocess safety, offline mode, progress callbacks, and intra-cloud acceleration\n- **Full lifecycle CLI** — download, upload, deploy, manage secrets, inspect cache — all from the terminal\n- **Deep ecosystem integration** — seamless access to 100K+ models and datasets on ModelScope Hub; works with the `modelscope` training framework, Studio deployment platform, and MCP server infrastructure\n\n---\n\n## Installation\n\n```bash\npip install modelscope-hub\n```\n\nRequires Python 3.10+. Lightweight — only `requests`, `tqdm`, `filelock`, `urllib3`.\n\n---\n\n## Quick Start\n\n### Authenticate\n\n```bash\nms login\n# or pass a token directly\nms login --token $MODELSCOPE_API_TOKEN\n```\n\nGet your token at [modelscope.cn/my/access/token](https://modelscope.cn/my/access/token) or [modelscope.ai/my/access/token](https://modelscope.ai/my/access/token).\n\n```python\nfrom modelscope_hub import HubApi\n\napi = HubApi(token=\"your-token\")\nuser = api.whoami()\nprint(user.username)\n```\n\n### Download\n\n```bash\n# Full snapshot\nms download Qwen/Qwen3-0.6B\n\n# Single file\nms download Qwen/Qwen3-0.6B config.json\n\n# With filters\nms download Qwen/Qwen3-0.6B --include \"*.safetensors\" --exclude \"*.bin\"\n\n# Directly into a local directory (bypasses cache)\nms download Qwen/Qwen3-0.6B --local-dir ./my-model\n```\n\n```python\npath = api.download_file(\"Qwen/Qwen3-0.6B\", \"model\", \"config.json\")\n\nsnapshot = api.download_repo(\n    \"Qwen/Qwen3-0.6B\", \"model\",\n    allow_patterns=[\"*.safetensors\", \"*.json\"],\n    max_workers=8,\n)\n\n# Offline mode — return cached path without network access\npath = api.download_file(\"Qwen/Qwen3-0.6B\", \"model\", \"config.json\", local_files_only=True)\n```\n\n### Upload\n\n```bash\nms upload my-org/my-model ./weights.safetensors\nms upload my-org/my-model ./output --repo-type model --commit-message \"add weights\"\n```\n\n```python\napi.upload_file(\"my-org/my-model\", \"model\", \"./weights.safetensors\", \"weights.safetensors\")\napi.upload_folder(\"my-org/my-model\", \"model\", \"./output\", path_in_repo=\"\")\n```\n\n### Create a Repository\n\n```bash\nms repo create my-org/my-model --repo-type model --visibility private\n```\n\n```python\napi.create_repo(\"my-org/my-model\", \"model\", visibility=\"private\", license=\"apache-2.0\")\n```\n\n### Deploy a Studio\n\n```bash\nms deploy my-org/chat-demo --repo-type studio\nms logs my-org/chat-demo --log-type runtime\nms stop my-org/chat-demo --repo-type studio\n```\n\n```python\napi.deploy_repo(\"my-org/chat-demo\", \"studio\")\napi.get_repo_logs(\"my-org/chat-demo\", log_type=\"runtime\")\napi.stop_repo(\"my-org/chat-demo\", \"studio\")\n```\n\n---\n\n## CLI Reference\n\nThe CLI is available as both `ms` and `modelscope`.\n\n**Global options** (placed before the subcommand):\n\n| Option | Description |\n|--------|-------------|\n| `--token TOKEN` | API token (overrides env and persisted token) |\n| `--endpoint URL` | API endpoint (default: `https://modelscope.cn`) |\n| `-v, --verbose` | Enable DEBUG logging |\n| `-V, --version` | Print version and exit |\n\n### `ms login`\n\nAuthenticate and persist your token locally.\n\n```bash\nms login                          # interactive prompt\nms login --token $MY_TOKEN        # non-interactive\n```\n\n| Option | Description |\n|--------|-------------|\n| `--token TOKEN` | API token; prompted interactively if omitted |\n\n### `ms whoami`\n\nShow the user associated with the current token.\n\n```bash\nms whoami\n```\n\n### `ms download`\n\nDownload a single file or a full repository snapshot.\n\n```bash\nms download Qwen/Qwen3-0.6B                                  # full snapshot\nms download Qwen/Qwen3-0.6B config.json                      # single file\nms download Qwen/Qwen3-0.6B --include \"*.safetensors\"         # filter by glob\nms download Qwen/Qwen3-0.6B --local-dir ./out --max-workers 8 # direct download\nms download my-org/my-data --repo-type dataset --revision v2   # dataset at tag\n```\n\n| Argument / Option | Required | Description |\n|-------------------|----------|-------------|\n| `repo_id` | yes | Repository identifier (`owner/name`) |\n| `files...` | no | Specific file paths; omit for full snapshot |\n| `--repo-type {model,dataset}` | no | Default: `model` |\n| `--revision REV` | no | Branch, tag, or commit hash (default: `master`) |\n| `--local-dir DIR` | no | Download directly here (bypasses cache layout) |\n| `--cache-dir DIR` | no | Override default cache directory |\n| `--include GLOB...` | no | Only download matching files; repeatable |\n| `--exclude GLOB...` | no | Skip matching files; repeatable |\n| `--max-workers N` | no | Parallel download threads (default: `4`) |\n| `--force` | no | Re-download even if cached |\n\n\u003cdetails\u003e\n\u003csummary\u003eAdvanced examples\u003c/summary\u003e\n\n```bash\n# Download multiple specific files at once\nms download Qwen/Qwen3-0.6B config.json tokenizer.json generation_config.json\n\n# Download only safetensors, skip GGUF and bin weights\nms download Qwen/Qwen3-0.6B --include \"*.safetensors\" --exclude \"*.bin\" \"*.gguf\"\n\n# Download a dataset at a specific tag into a local directory\nms download my-org/my-data --repo-type dataset --revision v2 --local-dir ./data\n\n# Use a custom cache directory and 8 parallel threads\nms download Qwen/Qwen3-0.6B --cache-dir /data/hub-cache --max-workers 8\n\n# Force re-download even if already cached\nms download Qwen/Qwen3-0.6B config.json --force\n\n# Download a Studio space\nms download my-org/chat-demo --repo-type studio\n\n# Download all skills from a collection (legacy flag)\nms download --collection my-org/skill-collection\n\n# Enable parallel range download for large files (env var)\nMODELSCOPE_DOWNLOAD_PARALLELS=4 ms download Qwen/Qwen3-0.6B\n\n# Use the modelscope.ai endpoint (global option, before subcommand)\nms --endpoint https://modelscope.ai download Qwen/Qwen3-0.6B\n```\n\n\u003c/details\u003e\n\n### `ms upload`\n\nUpload a file or folder to a repository.\n\n```bash\nms upload my-org/my-model ./weights.safetensors                       # single file\nms upload my-org/my-model ./output models/ --repo-type model          # folder → subdir\nms upload my-org/my-model . --include \"*.py\" --commit-message \"code\"  # filtered folder\n```\n\n| Argument / Option | Required | Description |\n|-------------------|----------|-------------|\n| `repo_id` | yes | Repository identifier |\n| `local_path` | no | Local file or folder (default: inferred from repo name) |\n| `path_in_repo` | no | Destination path inside the repo |\n| `--repo-type {model,dataset}` | no | Default: `model` |\n| `--revision REV` | no | Target branch (default: `master`) |\n| `--commit-message MSG` | no | Commit message |\n| `--commit-description DESC` | no | Extended commit description |\n| `--include GLOB...` | no | Include filter for folder mode; repeatable |\n| `--exclude GLOB...` | no | Exclude filter for folder mode; repeatable |\n| `--max-workers N` | no | Parallel upload threads |\n| `--use-cache / --no-cache` | no | Enable/disable resumable upload cache (default: on) |\n| `--disable-tqdm` | no | Disable progress bars |\n\n\u003cdetails\u003e\n\u003csummary\u003eAdvanced examples\u003c/summary\u003e\n\n```bash\n# Upload a single file with a custom commit message\nms upload my-org/my-model ./weights.safetensors --commit-message \"add fp16 weights\"\n\n# Upload a folder into a subdirectory of the repo\nms upload my-org/my-model ./output models/ --repo-type model\n\n# Upload only Python files from the current directory\nms upload my-org/my-model . --include \"*.py\" --commit-message \"update code\"\n\n# Upload only safetensors, skip checkpoints\nms upload my-org/my-model ./output --include \"*.safetensors\" --exclude \"*.ckpt\" \"*.bin\"\n\n# Upload to a dataset repo on a specific branch\nms upload my-org/my-data ./data --repo-type dataset --revision dev\n\n# Upload with extended commit description\nms upload my-org/my-model ./weights.safetensors \\\n  --commit-message \"v2 weights\" \\\n  --commit-description \"Retrained with extended dataset, 3 epochs, lr=2e-5\"\n\n# Resumable upload: interrupted uploads resume automatically via cache\nms upload my-org/my-model ./large-folder\n# If interrupted, just re-run the same command — already uploaded files are skipped\n\n# Disable upload cache (no resume, fresh upload every time)\nms upload my-org/my-model ./output --no-cache\n\n# Disable progress bars (useful for CI/CD pipelines)\nms upload my-org/my-model ./output --disable-tqdm\n```\n\n\u003c/details\u003e\n\n### `ms repo`\n\nRepository management (create, info, list, delete).\n\n```bash\nms repo create my-org/my-model --repo-type model --visibility private\nms repo create my-org/demo --repo-type studio --sdk-type gradio\nms repo info my-org/my-model --repo-type model\nms repo list --repo-type model --owner my-org --page-size 20\nms repo delete my-org/my-model --repo-type model --yes\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ccode\u003ems repo create\u003c/code\u003e options\u003c/summary\u003e\n\n| Argument / Option | Required | Description |\n|-------------------|----------|-------------|\n| `repo_id` | yes | Repository identifier |\n| `--repo-type` | yes | `model`, `dataset`, `studio`, `skill`, or `mcp` |\n| `--visibility` | no | `public`, `private`, or `internal` |\n| `--license` | no | SPDX license identifier (e.g. `apache-2.0`) |\n| `--chinese-name` | no | Display name in Chinese |\n| `--description` | no | Repository description |\n| `--exist-ok` | no | No error if repository already exists |\n| `--sdk-type` | no | Studio SDK: `gradio`, `streamlit`, `docker`, `static` |\n| `--sdk-version` | no | Studio SDK version |\n| `--base-image` | no | Studio base Docker image |\n| `--cover-image` | no | Studio cover image URL |\n| `--hardware` | no | Studio hardware spec |\n\n\u003c/details\u003e\n\n### `ms deploy` / `ms stop` / `ms logs` / `ms settings`\n\nManage Studio and MCP deployments.\n\n```bash\nms deploy my-org/chat-demo --repo-type studio\nms logs my-org/chat-demo --log-type runtime --keyword ERROR --page-size 50\nms settings my-org/chat-demo cpu=4 memory=8192\nms stop my-org/chat-demo --repo-type studio\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eOptions\u003c/summary\u003e\n\n| Command | Key Options |\n|---------|-------------|\n| `ms deploy \u003crepo_id\u003e` | `--repo-type {studio,mcp}` |\n| `ms stop \u003crepo_id\u003e` | `--repo-type {studio,mcp}` |\n| `ms logs \u003crepo_id\u003e` | `--log-type {runtime,build}`, `--keyword`, `--page`, `--page-size` |\n| `ms settings \u003crepo_id\u003e key=val...` | Key-value pairs passed to backend |\n\n\u003c/details\u003e\n\n### `ms secret`\n\nManage secrets for Studio spaces (studio only, `--repo-type` defaults to `studio`).\n\n```bash\nms secret add my-org/demo API_KEY sk-xxx\nms secret list my-org/demo\nms secret update my-org/demo API_KEY sk-new\nms secret delete my-org/demo API_KEY --yes\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eSubcommands\u003c/summary\u003e\n\n| Subcommand | Arguments | Description |\n|------------|-----------|-------------|\n| `add` | `repo_id key value` | Add a new secret |\n| `list` | `repo_id` | List all secret keys |\n| `update` | `repo_id key value` | Update a secret value |\n| `delete` | `repo_id key [--yes]` | Delete a secret |\n\nAll subcommands accept `--repo-type` (default: `studio`, currently the only supported type).\n\n\u003c/details\u003e\n\n### `ms mcp`\n\nManage MCP (Model Context Protocol) servers.\n\n```bash\nms mcp list --search weather --page-size 10\nms mcp info my-org/weather-mcp\nms mcp deploy my-org/weather-mcp\nms mcp undeploy my-org/weather-mcp\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eSubcommands\u003c/summary\u003e\n\n| Subcommand | Arguments | Key Options |\n|------------|-----------|-------------|\n| `list` | — | `--search`, `--page`, `--page-size` |\n| `info` | `server_id` | — |\n| `deploy` | `server_id` | — |\n| `undeploy` | `server_id` | — |\n\n\u003c/details\u003e\n\n### `ms cache`\n\nInspect and clean the local download cache.\n\n```bash\nms cache scan\nms cache scan --cache-dir /data/cache\nms cache clear --repo-type model --yes\nms cache clear --repo-id my-org/old-model --repo-type model --yes\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eOptions\u003c/summary\u003e\n\n| Subcommand | Key Options |\n|------------|-------------|\n| `scan` | `--cache-dir DIR` |\n| `clear` | `--repo-type`, `--repo-id`, `--cache-dir`, `--yes` |\n\n\u003c/details\u003e\n\n---\n\n## SDK API Overview\n\nAll operations go through a single entry point:\n\n```python\nfrom modelscope_hub import HubApi\n\n# Connect to modelscope.cn (default)\napi = HubApi(token=\"...\")\n\n# Or connect to modelscope.ai\napi = HubApi(token=\"...\", endpoint=\"https://modelscope.ai\")\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eFull method reference\u003c/strong\u003e\u003c/summary\u003e\n\n| Category | Method | Description |\n|----------|--------|-------------|\n| **Auth** | `login(token)` | Persist and verify token |\n| | `logout()` | Clear stored credentials |\n| | `whoami()` | Get current user info |\n| **Repo** | `create_repo(repo_id, repo_type, ...)` | Create a repository |\n| | `get_repo(repo_id, repo_type)` | Get repository metadata |\n| | `list_repos(repo_type, ...)` | Paginated listing |\n| | `delete_repo(repo_id, repo_type)` | Delete a repository |\n| | `repo_exists(repo_id, repo_type)` | Check existence |\n| **Files** | `upload_file(repo_id, repo_type, local, remote)` | Upload a single file |\n| | `upload_folder(repo_id, repo_type, folder, ...)` | Upload a directory |\n| | `download_file(repo_id, repo_type, file, ...)` | Download a single file (with retry, resume, offline mode) |\n| | `download_repo(repo_id, repo_type, ...)` | Download full snapshot (parallel, file lock, progress callbacks) |\n| | `list_repo_files(repo_id, repo_type)` | List files in a repo |\n| | `delete_files(repo_id, repo_type, paths)` | Remove files |\n| **Version** | `list_repo_revisions(repo_id, repo_type)` | List branches and tags |\n| | `create_repo_tag(repo_id, repo_type, tag)` | Create a tag |\n| **Deploy** | `deploy_repo(repo_id, repo_type)` | Deploy Studio or MCP |\n| | `stop_repo(repo_id, repo_type)` | Stop deployment |\n| | `get_repo_logs(repo_id, ...)` | Fetch logs |\n| | `update_repo_settings(repo_id, repo_type, ...)` | Update settings |\n| **Secrets** | `add_secret(repo_id, key, value)` | Add a secret |\n| | `list_secrets(repo_id)` | List secrets |\n| | `update_secret(repo_id, key, value)` | Update a secret |\n| | `delete_secret(repo_id, key)` | Delete a secret |\n| **MCP** | `list_mcp_servers(...)` | List available MCP servers |\n| | `get_mcp_server(server_id)` | Get server details |\n| | `deploy_mcp_server(server_id)` | Deploy an MCP server |\n| | `undeploy_mcp_server(server_id)` | Undeploy an MCP server |\n| **Cache** | `scan_cache(cache_dir)` | Inspect local cache |\n| | `clear_cache(cache_dir, ...)` | Free disk space |\n\n\u003c/details\u003e\n\n---\n\n## Ecosystem Integration\n\n`modelscope-hub` is the hub connectivity layer for the ModelScope ecosystem:\n\n```\n┌────────────────────────────────────────────────┐\n│              ModelScope Platform                │\n│   modelscope.cn  ·  modelscope.ai              │\n│                                                │\n│  Models · Datasets · Studios · Skills · MCP    │\n└───────────────────┬────────────────────────────┘\n                    │  OpenAPI / Legacy API\n                    ▼\n            ┌───────────────┐\n            │ modelscope-hub│  ← this library\n            │  SDK  +  CLI  │\n            └───┬───────┬───┘\n                │       │\n        ┌───────┘       └────────┐\n        ▼                        ▼\n  modelscope framework    your application\n  (training · eval)       (inference · deploy)\n```\n\n- **Browse \u0026 discover** — search 100K+ models and datasets via `list_repos` / `ms repo list`\n- **Download \u0026 cache** — pull model weights, tokenizer configs, or entire datasets into a managed cache or a local directory; supports offline mode via `local_files_only`\n- **Train \u0026 fine-tune** — use with the [modelscope](https://github.com/modelscope/modelscope) framework: train locally, then push results back\n- **Deploy** — launch a Studio space or MCP server directly from the CLI or SDK\n- **Automate** — integrate into CI/CD pipelines with environment-variable auth and `--yes` flags for non-interactive operation\n\n---\n\n## Configuration\n\n| Environment Variable | Purpose | Default |\n|---------------------|---------|---------|\n| `MODELSCOPE_API_TOKEN` | Default API token | — |\n| `MODELSCOPE_ENDPOINT` | API endpoint | `https://modelscope.cn` |\n| `MODELSCOPE_CACHE` | Override cache directory | `~/.modelscope/hub` |\n| `MODELSCOPE_DOWNLOAD_PARALLELS` | Parallel range-download parts for large files | `1` (disabled) |\n| `MODELSCOPE_PARALLEL_DOWNLOAD_THRESHOLD_MB` | File size threshold (MB) to trigger parallel range download | `500` |\n| `DOWNLOAD_RETRY_TIMES` | Per-file download retry count | `5` |\n| `DOWNLOAD_TIMEOUT` | Per-request download timeout (seconds) | `60` |\n| `MODELSCOPE_HUB_FILE_LOCK` | Enable file lock for multiprocess download safety | `true` |\n| `INTRA_CLOUD_ACCELERATION` | Enable Alibaba cloud intra-cloud download acceleration | `true` |\n\nToken is persisted locally after `ms login` and auto-loaded in subsequent sessions.\n\n---\n\n## Backward Compatibility\n\n`modelscope-hub` provides a compatibility layer for code written against the old `modelscope.hub` API surface. The old SDK can delegate directly to `modelscope_hub.compat`:\n\n```python\nfrom modelscope_hub.compat import snapshot_download, model_file_download\nfrom modelscope_hub.compat import LegacyHubApi as HubApi\n```\n\nAll legacy parameter names (`allow_file_pattern`, `ignore_file_pattern`, `cookies`, etc.) are accepted and mapped to the new implementation.\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/modelscope/modelscope_hub.git\ncd modelscope_hub\nmake install    # pip install -e \".[dev]\"\nmake test       # unit tests (no network)\nmake lint       # ruff check\nmake typecheck  # mypy\n```\n\nSee `make help` for all available targets.\n\n---\n\n## License\n\nApache 2.0 — see [LICENSE](LICENSE).\n\n---\n\n## Citation\n\n```bibtex\n@Misc{modelscope-hub,\n  title = {modelscope-hub: The official Python client to connect with ModelScope Hub.},\n  author = {The ModelScope Team},\n  howpublished = {\\url{https://github.com/modelscope/modelscope_hub}},\n  year = {2026}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelscope%2Fmodelscope_hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodelscope%2Fmodelscope_hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelscope%2Fmodelscope_hub/lists"}