支持国内下载hugging face 的东西
下模型权重
model_id 是红色圈复制的
代码
记得设置下载的存储位置
import os
from pathlib import Path
from huggingface_hub import hf_hub_download
from huggingface_hub import snapshot_downloadmodel_id="llava-hf/llava-v1.6-mistral-7b-hf"
# repo_id 模型id
# local_dir 下载地址
# endpoint 镜像地址
# resume_download (中断后)继续下载
snapshot_download(repo_id=model_id, local_dir="your_path",local_dir_use_symlinks=False, revision="main",endpoint='https://hf-mirror.com',resume_download=True)