From affd90b177626079e63d8d1acb3f86c42117dfd3 Mon Sep 17 00:00:00 2001 From: HongCheng Date: Sat, 23 Mar 2024 15:45:11 +0900 Subject: [PATCH] create upload_modelscope.py --- xtuner_config/upload_modelscope.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 xtuner_config/upload_modelscope.py diff --git a/xtuner_config/upload_modelscope.py b/xtuner_config/upload_modelscope.py new file mode 100644 index 0000000..a7b43fd --- /dev/null +++ b/xtuner_config/upload_modelscope.py @@ -0,0 +1,10 @@ +from modelscope.hub.api import HubApi + +YOUR_ACCESS_TOKEN = '请从ModelScope个人中心->访问令牌获取' + +api = HubApi() +api.login(YOUR_ACCESS_TOKEN) +api.push_model( + model_id="yourname/your_model_id", + model_dir="my_model_dir" # 本地模型目录,要求目录中必须包含configuration.json +) \ No newline at end of file