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

相关推荐
东京老树根9 分钟前
SAP学习笔记 - 开发27 - 前端Fiori开发 Routing and Navigation(路由和导航)
笔记·学习
UQI-LIUWJ2 小时前
LLM 笔记:Speculative Decoding 投机采样
笔记
凤年徐4 小时前
【数据结构初阶】单链表
c语言·开发语言·数据结构·c++·经验分享·笔记·链表
阿阳微客6 小时前
Steam 搬砖项目深度拆解:从抵触到真香的转型之路
前端·笔记·学习·游戏
WarPigs7 小时前
Unity性能优化笔记
笔记·unity·游戏引擎
px不是xp10 小时前
山东大学算法设计与分析复习笔记
笔记·算法·贪心算法·动态规划·图搜索算法
echo haha11 小时前
第7章 :面向对象
笔记
Chef_Chen11 小时前
从0开始学习R语言--Day18--分类变量关联性检验
学习
njsgcs11 小时前
chili3d 笔记16 emscripten配置 |用cnpm i 安装 |hello world 编译
笔记
键盘敲没电11 小时前
【IOS】GCD学习
学习·ios·objective-c·xcode