How to download Huggingface models on Windows
This page provides a comprehensive guide on how to download HuggingFace models on a Windows system using HFDownloader, a powerful, compact tool designed for seamless downloading of files from HuggingFace repositories. With HFDownloader, you can easily retrieve AI models, datasets, and scripts for your projects.
Download HFDownloader
Download the executable: HFDownload.exe
Download the executable as a zip: HFDownload.zip
Download the source:HFDownloader-src.zip
What is HFDownloader?
HFDownloader is a simple and compact, but powerful tool for downloading files from HuggingFace repositories conveniently. It is a single executable file, it does not require any installation procedure. It has no dependencies.
The hfdownloader.exe executable can be run from the command line, and the files to be downloaded can be passed as a command line parameter. The specified files are processed by HFDownloader and downloaded from HuggingFace.co. The downloaded files are then verified to ensure they are intact.
What is a HuggingFace repository?
A HuggingFace repository is a collection of pre-trained models, datasets, and training scripts. These repositories enable researchers and developers to share, collaborate, and fine-tune models for tasks like text generation, translation, and image processing. Hugging Face repositories are structured similarly to GitHub, supporting version control, discussions, and community contributions.
How to use HFDownloader in Windows (Quick Steps)
- Download HFDownload.exe
- Open command line
- Download a repository from huggingface.co
- Enable to download files
- Downloading process
- Download finished
- Downloaded files in C:\AIModels folder
How to use HFDownloader in Windows (Video tutorial)
In this video, you will learn how to use HFDownloader on a Windows system to effortlessly download models and files from Huggingface. This step-by-step guide will show you how to use it correctly, and start downloading files efficiently.
Step 1 - Download HFDownload.exe
First step, download HFDownloader from this link (Figure 1).
Step 2 - Open command line
Open the command line, inside the folder where you downloaded the file (Figure 2).
Step 3 - Download a repository from huggingface.co
You can download the files with the following command. First the name of the downloaded file, then the link to the model you want to download (Figure 3).
.\HFDownload.exe https://huggingface.co/vivek-dodia/Deepseek-R1-8B-MK-Distilled
Step 4 - Enable to download files
Before starting the download, the command line will tell you how many files it will download, how much space it needs, how much free space you have and will have, and then ask you if you want to continue. To continue, type a "Y" (Figure 4).
Step 5 - Downloading process
You can see the download status. The files that are being downloaded and those that are already downloaded (Figure 5).
Step 6 - Download finished
After all files have been downloaded, you will receive the following message "HFDownloader ran successfully." (Figure 6).
Step 7 - Downloaded files in C:\AIModels folder
Open the folder where you have placed the HFDownload.exe file and you will see that a folder has been created with the downloaded files inside (Figure 7).
Github
This project is available on Github with full source code under MIT license. Please take a look at the Github project:
https://github.com/ozekiweb/HFDownloaderFeatures
- Download HuggingFace Repositories: Download HuggingFace repositories to your local machine. Select a whole repository, just some files or folders.
- Verify Files: HFDownloader automatically verifies the downloaded files if a checksum can be found on HuggingFace.
- Reliable: HFDownloader ensures stable downloads, and works great in low-bandwidth and unstable network environments.
- Multi-Threaded: Multiple download and verification processes can run simultaneously, making the whole task faster.
- Detailed Interface: Follow the progress and events of HFDownloader on the console.
- Authentication: Use your HuggingFace Access Token with HFDownload to download files from gated repositories.
- Interactive: Confirm, or change the file selection on the console before starting the download process.
- Force Mode: Force HFDownloader to redownload the specified files.
- Fast Deployment: Ready to use, self-contained executable file is available to download.
- Open Source: This tool is fully open sourced, enabling users to build, inspect, and modify the source code according to their needs.
How to download a HuggingFace repository
Command line parameters
Parameter | Description | Default Value |
<url> | Specifies the URL of the HuggingFace repository or file to be downloaded | - |
-f | Specifies if the download should be forced | False |
-t <t> | Specifies the HuggingFace Access Token | - |
-n <n> | Specifies how many threads can be used by the downloading process | 5 |
-o <o> | Specifies where the files should be downloaded | C:\AIModels |
-s <s> | Specifies where the files should be downloaded | Unlimited |
-r <r> | Specifies where the files should be downloaded | 20 |
-? | Show help and usage information | - |
-v | Show version information | - |
Usage examples
Download full repository:
hfdownload.exe https://huggingface.co/nvidia/Llama-3.1-Nemotron-70B-Instruct-HF/
Download single file from repository to custom location:
hfdownload.exe /nvidia/Llama-3.1-Nemotron-70B-Instruct-HF/tokenizer.json -o C:/AIModels
Force download full repository with custom configuration:
hfdownload.exe /nvidia/Llama-3.1-Nemotron-70B-Instruct-HF/tokenizer.json -f -n 5 -o C:/AIModels -s 500Mb -r 20
What is force download?
Conclusion
More information
- How to create API keys for Ozeki AI, Chat GPT and Deepseek
- Example HTTP API request using Postman for Ozeki Chat GPT API
- Example HTTP API request using Curl for Ozeki Chat GPT API
- HTTP tester tools
- AI prompt
- AI code generation VS code plugin
- A tool to download AI models from Huggingface
- Python
- Linux Oobabooga