使用access tokens登陆huggingface,然后直接上传,速度超快!
huggingface-cli login
huggingface-cli upload xx/xx upload_dir .
下载模型极速方法就是转换源,“重复”下载!
--resume-download是会继续下载上一次停止的地方,如果下载好了就不会再进行下载
# 转换到国内镜像源,下载更快!
export HF_ENDPOINT=https://hf-mirror.com
# 重复下载!可以建一个bash文件。
huggingface-cli download --resume-download xxx
huggingface-cli download --resume-download xxx
huggingface-cli download --resume-download xxx
huggingface-cli download --resume-download xxx
huggingface-cli download --resume-download xxx
# 如果想要下载里面其中的一个文件(使用local-dir指定下载到本地的路径)
huggingface-cli download --resume-download FoundationVision/var var_d16.pth --local-dir /home/VAR/hf
获取自己的access tokens具体步骤可以参考以下:
1. 打开huggingface,登陆自己的账号,点击自己的头像,找到Settings.