【学习笔记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镜像站使用及常见报错

相关推荐
摇滚侠19 分钟前
Vue 项目实战《尚医通》,获取当前账户就诊人信息并展示出来,笔记42
前端·javascript·vue.js·笔记·html5
重启编程之路1 小时前
python 基础学习socket -TCP编程
网络·python·学习·tcp/ip
石像鬼₧魂石1 小时前
Kali Linux 中对某(靶机)监控设备进行漏洞验证的完整流程(卧室监控学习)
linux·运维·学习
d111111111d2 小时前
STM32通信协议学习--I2C通信(了解)
笔记·stm32·单片机·嵌入式硬件·学习
盼哥PyAI实验室2 小时前
学会给网页穿衣服——学习 CSS 语言
前端·css·学习
我的xiaodoujiao2 小时前
使用 Python 语言 从 0 到 1 搭建完整 Web UI自动化测试学习系列 25--数据驱动--参数化处理 Excel 文件 2
前端·python·学习·测试工具·ui·pytest
Rousson3 小时前
硬件学习笔记--89 MCU主频对Uart波特率影响及采样点
笔记·单片机·学习
Fantasydg3 小时前
AJAX JSON学习
前端·学习·ajax
2301_801821714 小时前
标签分类调研
笔记
越努力越幸运5084 小时前
AJAX 学习第一天:axios、HTTP 基础、serialize 插件
学习·http·ajax