Skip to content
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

Add instruction for downloading models from openmind hub #2577

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ print(response)
> By default, LMDeploy downloads model from HuggingFace. If you would like to use models from ModelScope, please install ModelScope by `pip install modelscope` and set the environment variable:
>
> `export LMDEPLOY_USE_MODELSCOPE=True`
>
> If you would like to use models from openMind Hub, please install openMind Hub by `pip install openmind_hub` and set the environment variable:
>
> `export LMDEPLOY_USE_OPENMIND_HUB=True`

For more information about inference pipeline, please refer to [here](docs/en/llm/pipeline.md).

Expand Down
4 changes: 4 additions & 0 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ print(response)
> デフォルトでは、LMDeployはHuggingFaceからモデルをダウンロードします。ModelScopeからモデルを使用する場合は、`pip install modelscope`コマンドでModelScopeをインストールし、環境変数を設定してください:
>
> `export LMDEPLOY_USE_MODELSCOPE=True`
>
> openMind Hubからモデルを使用する場合は、`pip install openmind_hub`コマンドでopenMind Hubをインストールし、環境変数を設定してください:
>
> `export LMDEPLOY_USE_OPENMIND_HUB=True`

推論パイプラインに関する詳細情報は[こちら](./docs/en/llm/pipeline.md)を参照してください。

Expand Down
4 changes: 4 additions & 0 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ print(response)
> LMDeploy 默认从 HuggingFace 上面下载模型,如果要从 ModelScope 上面下载模型,请通过命令 `pip install modelscope` 安装ModelScope,并设置环境变量:
>
> `export LMDEPLOY_USE_MODELSCOPE=True`
>
> 如果要从 openMind Hub 上面下载模型,请通过命令 `pip install openmind_hub` 安装openMind Hub,并设置环境变量:
>
> `export LMDEPLOY_USE_OPENMIND_HUB=True`

关于 pipeline 的更多推理参数说明,请参考[这里](docs/zh_cn/llm/pipeline.md)

Expand Down
2 changes: 1 addition & 1 deletion lmdeploy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def get_model(pretrained_model_name_or_path: str,
download_dir: str = None,
revision: str = None,
token: str = None):
"""Get model from huggingface or modelscope."""
"""Get model from huggingface, modelscope or openmind_hub."""
import os
if os.getenv('LMDEPLOY_USE_MODELSCOPE', 'False').lower() == 'true':
from modelscope import snapshot_download
Expand Down
Loading