使用huggingface提供的下载方法

git lfs install
git clone https://huggingface.co/meta-llama/Llama-2-7b-hf

下载huggingface托管的llama 2文件时,遇到错误如下:

Error downloading object: Responsible-Use-Guide.pdf (525dc34): Smudge error: Error downloading Responsible-Use-Guide.pdf (525dc349d71fe257fce4098c146446df6fef4247174f351381e4c3214af126f0): batch response: Post "https://huggingface.co/meta-llama/Llama-2-7b-hf.git/info/lfs/objects/batch": read tcp 10.xxx.xxx.xxx:65308->18.164.174.55:443: wsarecv: An existing connection was forcibly closed by the remote host.

Errors logged to 'path\Llama-2-7b-hf\.git\lfs\logs\20230907T193738.9222655.log'.
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: Responsible-Use-Guide.pdf: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

遍查原因,是因为没有proxy,使用这个命令

git clone -c http.proxy="http://127.0.0.1:1080x" https://huggingface.co/meta-llama/Llama-2-7b-hf

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐