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

相关推荐
冷崖2 小时前
MySQL异步连接池的学习(五)
学习·mysql
知识分享小能手2 小时前
Vue3 学习教程,从入门到精通,Axios 在 Vue 3 中的使用指南(37)
前端·javascript·vue.js·学习·typescript·vue·vue3
所愿ღ3 小时前
JavaWeb-Servlet基础
笔记·servlet
岑梓铭4 小时前
考研408《计算机组成原理》复习笔记,第五章(2)——CPU指令执行过程
笔记·考研·408·计算机组成原理·计组
焄塰7 小时前
Ansible 管理变量和事实
学习·centos·ansible
oe10198 小时前
读From GPT-2 to gpt-oss: Analyzing the Architectural Advances(续)
笔记·gpt·学习
Include everything11 小时前
Rust学习笔记(三)|所有权机制 Ownership
笔记·学习·rust
杜子不疼.12 小时前
《Python学习之文件操作:从入门到精通》
数据库·python·学习
★YUI★12 小时前
学习游戏制作记录(玩家掉落系统,删除物品功能和独特物品)8.17
java·学习·游戏·unity·c#
livemetee13 小时前
Flink2.0学习笔记:Flink服务器搭建与flink作业提交
大数据·笔记·学习·flink