Where Does huggingface-cli download Save Models by Default

A quick note on the default Hugging Face Hub cache locations used by huggingface-cli download on Linux, macOS, and Windows.

If you download a model with the Hugging Face command-line tool, for example:

1
huggingface-cli download <repo-id>

the downloaded model files usually do not appear in the current directory. Instead, they are saved into Hugging Face’s default cache directory.

Default cache locations

huggingface-cli download follows the Hugging Face Hub cache mechanism. The default paths are:

System Default cache directory
Linux / macOS ~/.cache/huggingface/hub
Windows C:\Users\用户名\.cache\huggingface\hub

On Windows, if your username is knightli, the default path is roughly:

1
C:\Users\knightli\.cache\huggingface\hub

Why the model is not in the current directory

This is expected behavior. By default, huggingface-cli download stores repository files in the cache directory so they can be reused later without downloading them again.

Inside the cache directory, repositories are usually stored in a structure like this:

1
models--组织名--模型名

For example, a model repository may be cached as:

1
models--unsloth--gemma-4-E4B-it-GGUF

The actual model files are usually under the snapshots subdirectory inside that cache folder.

How to download to a specific directory

If you want the model files to appear in a directory you choose, add --local-dir to huggingface-cli download:

1
huggingface-cli download <repo-id> --local-dir D:\models\<model-name>

This is more convenient when working with local inference tools such as llama.cpp, Ollama, or LM Studio, because the model files are easier to find later.

Summary

  • Default cache directory: ~/.cache/huggingface/hub
  • Default Windows directory: C:\Users\用户名\.cache\huggingface\hub
  • Use --local-dir if you want to save files to a specific location
  • If you are only looking for a .gguf file, first check the snapshots subdirectory under the corresponding cached model repository
记录并分享
Built with Hugo
Theme Stack designed by Jimmy