-
Notifications
You must be signed in to change notification settings - Fork 272
Add support for modelscope and update doc #1381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Xiaodong Ye <[email protected]>
Reviewer's GuideThis PR adds ModelScope as a supported model registry transport in RamaLama, introducing a new modelscope.py module, updating the model factory and CLI to recognize ModelScope URLs, and extending documentation and tests to cover ModelScope usage. The implementation adapts HuggingFace logic for ModelScope, including model pulling, authentication, SHA256 checksum retrieval, and cache handling, while ensuring seamless integration with existing transports. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @yeahdongcn - I've reviewed your changes - here's some feedback:
- Consider abstracting shared functionalities between
ModelScopeandHuggingfacemodel classes into a common base if they handle CLI/API interactions similarly. - The multi-step fallback logic in
ModelScope.pull()for model retrieval could be reviewed for potential simplification or clearer state management.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Why aren't people just using OCI registries to store models. The model registry creep is driving me crazy. We have a standard place to store internet content that works well with k8s. Anyways thanks @yeahdongcn |
|
@engelmi PTAL |
|
Please add some tests for this transport. Do you have a tiny model that this ramalama can pull? Any shortnames.conf file updates for models only available in modelscope? |
No problem. I just need a bit more time to get the CI happy. |
Signed-off-by: Xiaodong Ye <[email protected]>
Please try this one: ❯ ramalama pull ms://QuantFactory/SmolLM-135M-GGUF/SmolLM-135M.Q2_K.gguf
Downloading modelscope://SmolLM-135M.Q2_K.gguf:latest ...
Trying to pull modelscope://SmolLM-135M.Q2_K.gguf:latest...
23% |██████████████████ | 19.69 MB/ 84.12 MB 371.27 KB/s 2m 57s
I'm using |
Signed-off-by: Xiaodong Ye <[email protected]>
|
@sourcery-ai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @yeahdongcn - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 7 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Signed-off-by: Xiaodong Ye <[email protected]>
Signed-off-by: Xiaodong Ye <[email protected]>
Signed-off-by: Xiaodong Ye <[email protected]>
|
On a brief glance this looks fine, we should probably try and de-duplicate a little more between this and huggingface code, etc.. But can be in a follow on pull request. |
ggml-org/llama.cpp#13370
This PR adds support for ModelScope by introducing
ramalama/modelscope.py, which is adapted fromramalama/huggingface.py. It includes modifications for obtaining SHA256 hashes and determining the default CLI download location specific to ModelScope.Testing Done
ramalama loginramalama logout— expected failure sincemodelscopeCLI doesn’t support alogoutsubcommandramalama pullwith and withoutmodelscopeinstalledramalama runramalama lsmake unit-testsLogs:
Summary by Sourcery
Add support for ModelScope as a new model registry transport in RamaLama
New Features:
Enhancements:
Documentation:
Summary by Sourcery
Add ModelScope as a supported model registry transport, enabling model download, management, and authentication via ModelScope in RamaLama.
New Features:
Enhancements:
Documentation:
Tests: