当前位置:   article > 正文

大模型笔记之-如何从huggingface克隆源码及模型文件

huggingface克隆

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档


前言

本文将介绍怎么使用git clone的命令 获取huggingface的文件

1.找到项目的Files

在这里插入图片描述

2.打开Clone repository

在这里插入图片描述在这里插入图片描述

3.Copy命令

git lfs install
git clone https://huggingface.co/spaces/lewisliuX123/wechatgpt3
  • 1
  • 2

4.问题记录

		该报错为找不到服务器主机地址
  • 1
D:\>git lfs install
Git LFS initialized.

D:\>git clone https://huggingface.co/spaces/lewisliuX123/wechatglm_demo
Cloning into 'wechatglm_demo'...
fatal: unable to access 'https://huggingface.co/spaces/lewisliuX123/wechatglm_demo/': Failed to connect to huggingface.co port 443 after 21098 ms: Couldn't connect to server

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
		解决思路:设置git代理地址
  • 1

在这里插入图片描述

# 设置代理地址和端口
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy https://127.0.0.1:7890
  • 1
  • 2
  • 3

5.解决

D:\>git config --global http.proxy http://127.0.0.1:7890

D:\>git clone https://huggingface.co/spaces/lewisliuX123/wechatglm_demo
Cloning into 'wechatglm_demo'...
remote: Enumerating objects: 212, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 212 (delta 3), reused 0 (delta 0), pack-reused 201
Receiving objects: 100% (212/212), 860.51 KiB | 450.00 KiB/s, done.
Resolving deltas: 100% (95/95), done.
Updating files: 100% (35/35), done.

D:\>git clone https://huggingface.co/spaces/lewisliuX123/wechatgpt3
Cloning into 'wechatgpt3'...
remote: Enumerating objects: 216, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 216 (delta 0), reused 0 (delta 0), pack-reused 215
Receiving objects: 100% (216/216), 858.59 KiB | 759.00 KiB/s, done.
Resolving deltas: 100% (101/101), done.

D:\>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
  

闽ICP备14008679号