安装git-lfs

参考→链接

此处为语雀卡片,点击链接查看

image

:::tips shenquanzhen@shendeMacBook-Pro ~ % brew install git-lfs
Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!
To rerun under ARM use:
arch -arm64 brew install …
To install under x86_64, install Homebrew into /usr/local.

shenquanzhen@shendeMacBook-Pro ~ % arch -arm64 brew install git-lfs
Running brew update --auto-update
==> Fetching git-lfs
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/git-lfs-3.3

################################################################## 100.0%

==> Pouring git-lfs-3.3.0.arm64_monterey.bottle.tar.gz
==> Caveats
Update your git config to finish installation:

Update global git config

$ git lfs install

Update system git config

$ git lfs install —system
==> Summary
🍺 /opt/homebrew/Cellar/git-lfs/3.3.0: 76 files, 12.5MB
==> Running brew cleanup git-lfs
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).

:::

继续安装

:::tips shenquanzhen@shendeMacBook-Pro ~ % git clone https://huggingface.co/lmsys/vicuna-13b-delta-v0

Cloning into ‘vicuna-13b-delta-v0’…

remote: Enumerating objects: 42, done.

remote: Counting objects: 100% (42/42), done.

remote: Compressing objects: 100% (41/41), done.

remote: Total 42 (delta 16), reused 0 (delta 0), pack-reused 0

Unpacking objects: 100% (42/42), 6.99 KiB | 264.00 KiB/s, done.

:::

这段代码展示了使用git clone命令从远程仓库克隆vicuna-13b-delta-v0库的过程。它包含以下主要步骤:


  1. 使用git clone 命令,指定要克隆的远程仓库URL。
  2. Cloning into ‘vicuna-13b-delta-v0’… 显示正在将远程仓库克隆到本地vicuna-13b-delta-v0文件夹。
  3. remote: Enumerating objects: 42, done. 显示远程仓库有42个objects(对象)。
  4. remote: Counting objects: 100% (42/42), done. 显示已经统计了100%的objects(对象),共42个。
  5. remote: Compressing objects: 100% (41/41), done. 显示已经压缩了100%的objects(对象),共41个。
  6. remote: Total 42 (delta 16), reused 0 (delta 0), pack-reused 0
    显示总共有42个objects(对象),(新增16个objects(对象)),没有重用任何objects(对象),也没有重用任何packs。
  7. Unpacking objects: 100% (42/42), 6.99 KiB | 264.00 KiB/s, done.
    显示正在解压100%的objects(对象),共42个,大小为6.99 KiB,速度为264.00 KiB/s,解压完成。
    所以,这段输出显示了git clone命令从远程仓库完整克隆一个库的过程。它执行以下主要步骤:
  8. 定位远程仓库URL
  9. 新建本地文件夹,准备克隆
  10. 统计远程仓库的objects(对象)总数
  11. 下载objects(对象)并计算进度
  12. 对objects(对象)执行压缩
  13. 输出总objects(对象)数,新增objects(对象)数和重用信息
  14. 解压缩下载的objects(对象)并显示进度直至完成

再安装

:::tips shenquanzhen@shendeMacBook-Pro ~ % pip install git+https://github.com/huggingface/transformers@v0.1.10

Collecting git+https://github.com/huggingface/transformers@v0.1.10

Cloning https://github.com/huggingface/transformers (to revision v0.1.10) to /private/var/folders/gp/cfgwbp3j4c320x3jx2rmg53c0000gn/T/pip-req-build-_8tqszz5

Running command git clone —filter=blob:none —quiet https://github.com/huggingface/transformers /private/var/folders/gp/cfgwbp3j4c320x3jx2rmg53c0000gn/T/pip-req-build-_8tqszz5

:::

>