huggingface批量下载模型文件
收藏回复举报
huggingface批量下载模型文件
发表于2024-05-15 13:07:04
0 查看

下载huggingface的仓库全部权重文件

配置和下载git-lfs

  • ubuntu: sudo apt-get install git-lfs

  • 其他:

    • 下载git-lfs Releases · git-lfs/git-lfs (github.com)

    • 配置:

      export PATH=$PATH://home/software/lfs/git-lfs-3.5.1/ # 其中目录为你文件夹的目录,如果是win系统,要配置环境变量。

使用git-lfs下载文件

以chatglm2为例

# 1、配置git
git config --global http.sslVerify "false"
git config --global advice.detachedHead false

# 2、配置上网代理
git config --global http.proxy socks5 127.0.0.1:1080 # 上网的ip
git config --global https.proxy socks5 127.0.0.1:1080 # 上网的ip
git config --global http.proxy 127.0.0.1:1080 # 上网的ip
git config --global https.proxy 127.0.0.1:1080 # 上网的ip

# 如果要取消
git config --global --unset http.proxy
git config --global --unset https.proxy

# 3、下载文件
git lfs install --skip-smudge
git clone https://huggingface.co/THUDM/chatglm2-6b ## 需要xx上网
cd chatglm2-6b
git lfs pull

true

我要发帖子