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

相关推荐
妄汐霜1 小时前
小白学习笔记(spring框架的aop和tx)
笔记·学习
sheeta19983 小时前
LeetCode 每日一题笔记 日期:2025.03.24 题目:2906.构造乘积矩阵
笔记·leetcode·矩阵
椎4953 小时前
JSONUtil工具包大致学习使用
学习
leiming64 小时前
CAN 通信协议学习讲义(带图文 + C 语言代码)
c语言·开发语言·学习
Heartache boy4 小时前
野火STM32_HAL库版课程笔记-ADC多通道采集热敏、光敏、反射传感器(轮询)
笔记·stm32·单片机
yoothey4 小时前
Java字节流与字符流核心笔记(问答+考点复盘)
java·开发语言·笔记
星空5 小时前
RAG学习第一节
学习
知识分享小能手5 小时前
MongoDB入门学习教程,从入门到精通,MongoDB入门指南 —— 知识点详解(2)
数据库·学习·mongodb
老师好,我是刘同学5 小时前
force与deposit在SystemVerilog中的区别详解
笔记
炽烈小老头5 小时前
【 每天学习一点算法 2026/03/24】寻找峰值
学习·算法