huggingface

"huggingface"

Posted by zwt on November 3, 2023

国内镜像下载

huggingfacec

1
2
3
export HF_ENDPOINT=https://hf-mirror.com
from huggingface_hub import snapshot_download
snapshot_download(repo_id='defog/sqlcoder2',repo_type='model',local_dir='.',resume_download=True)

魔搭

1
model_dir = snapshot_download("baichuan-inc/Baichuan2-7B-Chat", revision='v1.0.4',cache_dir="/home/modelscope_modules")