English | Simplified Chinese
hf-mirror-fetch
is a command line tool designed to simplify the process of downloading machine learning models and related files from the Hugging Face model mirror site. This tool is particularly useful in environments where access to the Hugging Face main site is limited or the connection is slow.
Make sure you have Python 3.6 or higher installed. You can install hf-mirror-fetch
with the following command:
pip install hf-mirror-fetch
Using hf-mirror-fetch
to download a model is very simple, you only need to provide the URL of the model page. Here are usage examples:
hfmf -u https://huggingface.co/openchat/openchat_3.5/tree/main
hfmf -u https://huggingface.co/openchat/openchat_3.5
hfmf -u openchat/openchat_3.5
-u
, --url
: URL of the model page on hf-mirror.com or huggingface.co.-f
, --tgt_folder
: (optional) The destination folder to save the downloaded file. If not specified, a folder will be created with the model name.--update
: (optional) Update existing files, excluding weight files. Contributions of any kind are welcome, whether feature suggestions, code improvements, or documentation updates. Please submit your contributions through GitHub's Issue or Pull Request.
This project is licensed under the MIT license. For more information, view the LICENSE file.