git 下载AI模型
·
方式一:使用 git-lfs
步骤1:安装 git-lfs
brew install git-lfs
git lfs install
步骤2:
git config --global --unset http.proxy
git config --global --unset https.proxy
步骤3克隆仓库:
git clone https://huggingface.co/THUDM/chatglm3-6b
或者 ~/.zshrc
export https_proxy
export http_proxy
source ~/.zshrc
断点续传下载 新增 download_chatglm3.py 文件
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="THUDM/chatglm3-6b", # 模型仓库
local_dir="chatglm3-6b", # 保存目录(与上次 clone 相同)
resume_download=True, # ✅ 开启断点续传
local_dir_use_symlinks=False # macOS 推荐关闭符号链接
)
执行代码
python download_chatglm3.py
更多推荐


所有评论(0)