当前位置:   article > 正文

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

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
  • 1
  • 2

(2)Macos

brew update
brew install git-lfs
  • 1
  • 2

(3)Windows

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

2.2 安装huggingface_hub

pip install huggingface_hub
  • 1

3 服务器登录huggingface

(1)方法一

终端输入命令

huggingface-cli login
  • 1

输入token后回车确认

(2)方法二

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

4 下载

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

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

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号