create upload_modelscope.py
This commit is contained in:
parent
a22ec59be5
commit
affd90b177
10
xtuner_config/upload_modelscope.py
Normal file
10
xtuner_config/upload_modelscope.py
Normal file
@ -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
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user