方法一:在镜像网页中逐个下载放入相应文件夹
方法二:在服务器中使用镜像网站下载
将:
# Make sure you have git-lfs installed (https://git-lfs.com)
git lfs install
# git clone
git clone https://huggingface.co/openai/whisper-large-v3-turbo
将huggingface.co
改为hf-mirror.com
,即:
# Make sure you have git-lfs installed (https://git-lfs.com)
git lfs install
# git clone
git clone https://hf-mirror.com/openai/whisper-large-v3-turbo
方法三:使用huggingface-cli
下载模型
-
安装依赖
pip install -U huggingface_hub hf_transfer
-
设置镜像站
export HF_ENDPOINT=https://hf-mirror.com
-
开启hf_transfer加速下载
export HF_HUB_ENABLE_HF_TRANSFER=1
-
下载命令
huggingface-cli download --resume-download 模型名称 --local-dir 本地目录
-
以"openai-community/gpt2-medium"为例:
huggingface-cli download --resume-download openai-community/gpt2-medium