I always found the "Hugging Face" name strange for a website that hosts models for AI, and in this age of "Intelligence" and "Automation", makes it so un-intuitive to download models that I'm having to write a blog post about it while having a grumpy face 😠. More importantly, why in the world couldn't they provide a torrent to download massive files? "Hugging" face really is a misnomer.
![]() |
| Git clone for downloading models |
HuggingFace has this and this page that inadequately explains how to download files, but it should not have had to be so complex. All they needed to do was provide a bright green "Download" button which when clicked would have a few checkboxes that allow the user to download whatever they want, and there should have been a torrent option too.
Before downloading you may need to install Xet and LFS.
It's not compulsory to install Xet because it is backward-compatible with Git LFS through a server-side bridge (meaning git-lfs still works without breaking, but there's no chunk-level efficiency like what Xet provides), but it helps because Git LFS tracks changes at the entire-file level. If you tweak a tiny piece of metadata or append a few rows to a 10 GB dataset, LFS forces you to re-upload and re-download the entire 10 GB file. But Xet splits large files into tiny content-defined chunks and de-duplicates data at the byte level, so when doing a git clone or git push locally, Xet intercepts those large files on your machine, breaks them into chunks, checks which chunks already exist remotely, and only transfers the exact bytes that changed.
On Linux you can't simply do `git lfs install` or `git xet install` since it's not bundled with standard Git. Instead run these:
Install Xet (approx 20MB download)
sudo apt update
sudo apt install -y curl unzip
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/huggingface/xet-core/refs/heads/main/git_xet/install.sh | sh
git xet install; git xet --version; git lfs install
The installation of Xet installs LFS too, but if you want to install it separately:
sudo apt install -y git-lfs; git lfs install
Download the model you want
Now simply search for the model you want on HuggingFace. For example if it is this: https://huggingface.co/PaddlePaddle/PP-OCRv5_mobile_det_onnx/tree/main
You need to remove the "tree/main" part of the URL and you can simply clone it like this:
- git clone https://huggingface.co/PaddlePaddle/PP-OCRv5_mobile_det_onnx/
- git clone https://huggingface.co/PaddlePaddle/PP-OCRv5_mobile_rec_onnx
The files that matter
These are smaller models for using on the smartphone. Bigger models could have a different format, especially when meant for running with Python.
- Model weights like inference.onnx or model.onnx are the core neural network file required by browser runtimes like ONNX Runtime Web.
- Configuration & dictionary files (inference.yml and character dictionary .txt). Browser SDKs use inference.yml for image preprocessing dimensions. The recognition (rec) model also requires a character dictionary file (often bundled inside inference.yml in v5 or provided as ppocr_keys_v1.txt) to map output numbers back to readable text.
- License files.
Files that can be skipped: `.gitattributes`, `README.md`, `config.json` (unless your chosen JS wrapper explicitly asks for `config.json`).
I'll update this blog post with more content as I come across more info.
