Skip to content

[Feat] Feature: New Python-based Model Manager#820

Merged
JaredforReal merged 6 commits into
vllm-project:mainfrom
samzong:model-downloader-verifty-cache
Dec 14, 2025
Merged

[Feat] Feature: New Python-based Model Manager#820
JaredforReal merged 6 commits into
vllm-project:mainfrom
samzong:model-downloader-verifty-cache

Conversation

@samzong
Copy link
Copy Markdown
Collaborator

@samzong samzong commented Dec 12, 2025

Feature: New Python-based Model Manager

This PR introduces a new Python package model_manager to replace the previous Makefile-based model download logic. It converts projects from hard-coded shell scripts to configuration-driven Python applications.

🤔 Motivation (Context)

  • Maintainability: The previous models.mk was becoming unwieldy with hardcoded lists of models and fragile shell logic. Adding a new model required modifying multiple conditional blocks.
  • Reliability: Previous verification was minimal (sometimes just checking for a folder). The new system ensures files are actually readable and correct.
  • Scalability: We needed better support for different "profiles" (Minimal CI vs Full Dev vs LoRA only), which is now naturally handled by swapping config files.

🚀 Changes:

  • New model_manager Package src/model_manager.
  • Config Driven: Models are now defined in
    • config/models.yaml (full)
    • config/models.minimal.yaml (CI)
    • config/models.lora.yaml (Lora)
  • Atomic Caching: Uses a strict .downloaded marker + config check to ensure cached models are valid.
  • Cross-Platform: Removes dependency on shell-specific logic for file downloading and verification.
  • Refactored tools/make/models.mk Replaced complex if [ -f ... ] logic. But existing Makefile workflow is preserved.

FIX #xxxx (link existing issues this PR will resolve)
Part of #47

BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE


  • Make sure the code changes pass the pre-commit checks.
  • Sign-off your commit by using -s when doing git commit
  • Try to classify PRs for easy understanding of the type of changes, such as [Bugfix], [Feat], and [CI].
Detailed Checklist (Click to Expand)

Thank you for your contribution to semantic-router! Before submitting the pull request, please ensure the PR meets the following criteria. This helps us maintain the code quality and improve the efficiency of the review process.

PR Title and Classification

Please try to classify PRs for easy understanding of the type of changes. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

  • [Bugfix] for bug fixes.
  • [CI/Build] for build or continuous integration improvements.
  • [Doc] for documentation fixes and improvements.
  • [Feat] for new features in the cluster (e.g., autoscaling, disaggregated prefill, etc.).
  • [Router] for changes to the vllm_router (e.g., routing algorithm, router observability, etc.).
  • [Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.

Code Quality

The PR need to meet the following code quality standards:

  • Pass all linter checks. Please use pre-commit to format your code. See README.md for installation.
  • The code need to be well-documented to ensure future contributors can easily understand the code.
  • Please include sufficient tests to ensure the change is stay correct and robust. This includes both unit tests and integration tests.

DCO and Signed-off-by

When contributing changes to this project, you must agree to the DCO. Commits must include a Signed-off-by: header which certifies agreement with the terms of the DCO.

Using -s with git commit will automatically add this header.

What to Expect for the Reviews

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 12, 2025

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit ca62c08
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/693ee11f0a0eae0008aede10
😎 Deploy Preview https://deploy-preview-820--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…tion, configuration

Signed-off-by: samzong <samzong.lu@gmail.com>
…ize model configurations to YAML files.

Signed-off-by: samzong <samzong.lu@gmail.com>
@samzong samzong force-pushed the model-downloader-verifty-cache branch from 3b5d507 to d335bbd Compare December 12, 2025 05:54
@samzong samzong marked this pull request as ready for review December 12, 2025 06:03
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 12, 2025

👥 vLLM Semantic Team Notification

The following members have been identified for the changed files in this PR and have been automatically assigned:

📁 config

Owners: @rootfs, @Xunzhuo
Files changed:

  • config/models.lora.yaml
  • config/models.minimal.yaml
  • config/models.yaml

📁 src

Owners: @rootfs, @Xunzhuo, @wangchen615
Files changed:

  • src/model_manager/__init__.py
  • src/model_manager/__main__.py
  • src/model_manager/cache.py
  • src/model_manager/cli.py
  • src/model_manager/config.py
  • src/model_manager/downloader.py
  • src/model_manager/errors.py
  • src/model_manager/registry.py
  • src/model_manager/requirements.txt
  • src/model_manager/tests/__init__.py
  • src/model_manager/tests/conftest.py
  • src/model_manager/tests/test_cache.py
  • src/model_manager/tests/test_cli.py
  • src/model_manager/tests/test_downloader.py
  • src/model_manager/tests/test_registry.py
  • src/model_manager/tests/test_verifier.py
  • src/model_manager/verifier.py

📁 tools

Owners: @yuluo-yx, @rootfs, @Xunzhuo
Files changed:

  • tools/linter/codespell/.codespell.ignorewords
  • tools/make/models.mk

vLLM

🎉 Thanks for your contributions!

This comment was automatically generated based on the OWNER files in the repository.

@samzong samzong changed the title [Feat] initial model manager with model caching, downloading, verification, configuration [Feat] Feature: New Python-based Model Manager Dec 12, 2025
Signed-off-by: samzong <samzong.lu@gmail.com>
Comment thread config/models.minimal.yaml
Comment thread src/model_manager/downloader.py
Comment thread src/model_manager/tests/test_cache.py
@rootfs
Copy link
Copy Markdown
Collaborator

rootfs commented Dec 12, 2025

@samzong this is great! thank you for making this happen!

Signed-off-by: samzong <samzong.lu@gmail.com>
@samzong
Copy link
Copy Markdown
Collaborator Author

samzong commented Dec 14, 2025

@rootfs all changes is ready.

@JaredforReal
Copy link
Copy Markdown
Collaborator

JaredforReal commented Dec 14, 2025

@samzong LGTM, thanks! I am doing further work, including docs and concising config/ dir, and using model_manager dependencies (pip install -r src/model_manager/requirements.txt) instead of installing huggingface_hub[cli]] directly

@JaredforReal JaredforReal merged commit 8dcac5f into vllm-project:main Dec 14, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants