【学习笔记12】无vpn如何从huggingface下载权重?

方法一:在镜像网页中逐个下载放入相应文件夹

镜像网站:https://hf-mirror.com/

方法二:在服务器中使用镜像网站下载

将:

复制代码
# 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下载模型

  1. 安装依赖

    pip install -U huggingface_hub hf_transfer

  2. 设置镜像站

    export HF_ENDPOINT=https://hf-mirror.com

  3. 开启hf_transfer加速下载

    export HF_HUB_ENABLE_HF_TRANSFER=1

  4. 下载命令

    huggingface-cli download --resume-download 模型名称 --local-dir 本地目录

  • 以"openai-community/gpt2-medium"为例:

    huggingface-cli download --resume-download openai-community/gpt2-medium

参考

Huggingface镜像站使用及常见报错

相关推荐
kfepiza21 分钟前
Debian的`/etc/network/interfaces`的`allow-hotplug`和`auto`对比讲解 笔记250704
linux·服务器·网络·笔记·debian
爱莉希雅&&&1 小时前
技术面试题,HR面试题
开发语言·学习·面试
Chef_Chen2 小时前
从0开始学习计算机视觉--Day08--卷积神经网络
学习·计算机视觉·cnn
weixin_446260852 小时前
Isaac Lab:让机器人学习更简单的开源框架
学习·机器人
I'm写代码3 小时前
el-tree树形结构笔记
javascript·vue.js·笔记
我真不会起名字啊4 小时前
OpenSceneGraph(OSG)开发学习
学习
永日456704 小时前
学习日记-spring-day42-7.7
java·学习·spring
Andy杨5 小时前
20250707-4-Kubernetes 集群部署、配置和验证-K8s基本资源概念初_笔记
笔记·容器·kubernetes
UQI-LIUWJ7 小时前
李宏毅LLM笔记: AI Agent
人工智能·笔记
ouliten7 小时前
cuda编程笔记(6)--流
笔记