0


服务器配置Huggingface并git clone模型和文件

服务器配置Huggingface并git clone模型和文件

参考:https://huggingface.co/welcome

1 注册hugging face

官网注册,并获取token【https://huggingface.co/settings/tokens】,用于登录

2 安装

2.1 安装lfs

https://stackoverflow.com/questions/48734119/git-lfs-is-not-a-git-command-unclear

(1)unbuntu 服务器

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs

(2)Macos

brew update
brew install git-lfs

(3)Windows

下载程序安装:https://github.com/git-lfs/git-lfs/releases

2.2 安装huggingface_hub

pip install huggingface_hub

3 服务器登录huggingface

(1)方法一

终端输入命令

huggingface-cli login

输入token后回车确认

(2)方法二

python -c "from huggingface_hub.hf_api import HfFolder; HfFolder.save_token('MY_HUGGINGFACE_TOKEN_HERE')"

4 下载

git clone https://huggingface.co/username/repo_name

如果以上办法行不通,就从往网站上一个一个的下载文件。

标签: 服务器 git 运维

本文转载自: https://blog.csdn.net/weixin_43935696/article/details/137177715
版权归原作者 Better Bench 所有, 如有侵权,请联系我们删除。

“服务器配置Huggingface并git clone模型和文件”的评论:

还没有评论