English Version
1. **[Breaking Change]** Standardized the model download path from the default `~/.cache/modelscope/hub/<group-id>/<model-id>` to `~/.cache/modelscope/hub/models/<group-id>/<model-id>`. Additionally, in the official Docker image, the `MODELSCOPE_CACHE` has changed from `/mnt/workspace/.cache/modelscope` to `/mnt/workspace/.cache/modelscope/hub`. To prevent duplicate model downloads, we will automatically migrate models from the previous path to the new path.
2. The command line supports multiple filtering criteria for uploading and downloading models. Additionally, model uploads are pre-validated on the library side to prevent errors during the upload process.
3. Added Ollama support for models such as DeepSeek, olmo2, command-r7b, and others.
4. Improved support for automatically loading Hugging Face (HF) models and Pipelines. Currently, you can import various Auto components from ModelScope into Transformers, as well as `PeftModel` components from PEFT and `Pipeline` components from Diffusers. Added monkey patching for `huggingface_hub` and the `from_pretrained`-like method from `transformers` and `peft` to facilitate developers in using ModelScope to download and upload models. The patch for Hugging Face components is not enabled by default; developers need to manually enable it by using:
python
from modelscope.utils.hf_util.patcher import patch_hub
patch_hub()
or a context version:
python
from modelscope.utils.hf_util.patcher import patch_context
with patch_context():
do something
5. **[Break Change]** Remove `easyrobust` from dependencies to upgrade the version of `timm`。If user want to use models related to `easyrobust`,please manullay install it by: `pip install easyrobust`
中文版本
1. **[Break Change]** 标准化了模型下载路径,从默认的`~/.cache/modelscope/hub/<group-id>/<model-id>`变为`~/.cache/modelscope/hub/**models**/<group-id>/<model-id>`,同时MODELSCOPE_CACHE在官方docker镜像中从`/mnt/workspace/.cache/modelscope`变为`/mnt/workspace/.cache/modelscope/hub`。为了防止模型重复下载,我们会自动将前版本路径的模型迁移到新的路径上
2. 命令行进行模型的上传/下载支持多重过滤条件。另外,模型上传在library侧进行提前校验,防止上传过程中出现错误
3. 增加了DeepSeek、olmo2、command-r7b等模型的ollama支持
4. 对HF的模型和Pipeline自动加载有了更好的支持。目前可以从`modelscope`中 `import transformers`的各类Auto组件,以及`peft`的PeftModel组件和`diffusers`的Pipeline组件。增加了对`huggingface_hub`和`transformers`和`peft`的`from_pretrained`等模型下载方法的monkey patch,方便开发者使用魔搭下载和上传模型。对`huggingface`组件的patch默认不会开启,开发者需要通过如下方式手动开启使用:
python
from modelscope.utils.hf_util.patcher import patch_hub
patch_hub()
or a context version:
python
from modelscope.utils.hf_util.patcher import patch_context
with patch_context():
do something
6. **[Break Change]** 移除了`easyrobust`依赖,以便于升级timm依赖。如果使用easyrobust相关的模型,请手动安装该依赖:`pip install easyrobust`
**Full Changelog**: https://github.com/modelscope/modelscope/compare/v1.22.3...v1.23.0
What's Changed
* standardize download directory for models/datasets by yingdachen in https://github.com/modelscope/modelscope/pull/1197
* feat: new ollama template by suluyana in https://github.com/modelscope/modelscope/pull/1199
* Add file size check in upload_folder by wangxingjun778 in https://github.com/modelscope/modelscope/pull/1198
* clean directory structure by yingdachen in https://github.com/modelscope/modelscope/pull/1201
* update upload progress by wangxingjun778 in https://github.com/modelscope/modelscope/pull/1203
* remove MODELSCOPE_SHOW_INDIVIDUAL_PROGRESS_THRESHOLD by wangxingjun778 in https://github.com/modelscope/modelscope/pull/1206
* Update upload func by wangxingjun778 in https://github.com/modelscope/modelscope/pull/1204
* Add more patches for hf by tastelikefeet in https://github.com/modelscope/modelscope/pull/1160
* clone and lint 1205 by tastelikefeet in https://github.com/modelscope/modelscope/pull/1209