A CLI tool to download Hugging Face models and datasets from mirror sites.
Project description
hf_mirror_hub
一个从 Hugging Face 镜像站点快速下载模型和数据集的命令行工具。
特性
- 使用 Hugging Face 镜像站点加速下载
- 支持
hf-transfer加速下载 - 支持指定保存目录
- 支持使用 Hugging Face Hub 访问令牌
- 自动转换软链接为实际文件
安装
从 PyPI 安装 (推荐)
pip install hf-mirror-hub
从源码安装
git clone https://github.com/neverbiasu/hf-mirror-hub.git
cd hf-mirror-hub
conda create -n hf-mirror-hub python=3.8 # 非必需,也可以用 venv 或者直接安装
conda activate hf-mirror-hub
pip install -e .
使用说明
基本用法 (下载模型)
hf-mirror-hub --model <model_name>
完整参数
hf-mirror-hub --model <model_name> --save_dir <save_path> --token <your_token> [--no-hf-transfer]
参数说明
--model,-M: 可选,模型名称 (例如:deepseek-ai/DeepSeek-R1-Distill-Qwen-32B)--save_dir,-S: 可选,保存目录路径 (默认为data)--token,-T: 可选,Hugging Face 访问令牌 (用于访问私有模型或数据集)--no-hf-transfer: 可选,禁用hf-transfer加速
贡献
如果您认为仓库有什么可以修改或者优化的地方,可以提issues说明或fork本仓库更改后提PR。
许可证
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hf_mirror_hub-0.0.2.tar.gz
(3.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hf_mirror_hub-0.0.2.tar.gz.
File metadata
- Download URL: hf_mirror_hub-0.0.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c41e3852b2aef14ce29017b9d8b8e8fed7300e2c6df1d596d045f6702652a73c
|
|
| MD5 |
07da901e97b646c02a59247c16e77511
|
|
| BLAKE2b-256 |
cefcfaacf65ff4a29dec8d1d37c3c6fc994a55dd510ee6330bc47b16056ecbe5
|
File details
Details for the file hf_mirror_hub-0.0.2-py3-none-any.whl.
File metadata
- Download URL: hf_mirror_hub-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52fdc9cce8e73a17456f885394af0462db231c3c4ba44116785cfda447bdc2e0
|
|
| MD5 |
c2fbe99bf27cb7b1e05c7062534e2811
|
|
| BLAKE2b-256 |
e3fb6001eb7d1a8402e5ef443729dc76419bc456ffe593a27403785fb3b1e21a
|