huggingface的镜像站hf-mirror.com使用方法
通过镜像站hf-mirror.com自动下载model

1、设置环境变量

# windows dos
set HF_ENDPOINT=https://hf-mirror.com

# linux bash
export HF_ENDPOINT=https://hf-mirror.com

# linux csh
setenv HF_ENDPOINT https://hf-mirror.com

2、下载模型

与huggingface-cli兼容,直接下载。

# 断点续传,如果local dir不存在会自动创建
huggingface-cli download --resume-download gpt2 --local-dir gpt2
感谢阅读,更多文章点击这里:【专栏:web开发笔记】
留言(0)
还没有留言,来说两句吧。
留言需要 登录 或 注册(注册后需通过邮箱验证)。
相关文章