Hugging Face downloads now work on huggingface_hub 1.22 and later

Cloudsmith now serves Hugging Face's Tree API, so hf download and snapshot_download work through Cloudsmith on huggingface_hub 1.22 and later.

Hugging Face clients download a model in two steps: they list the files in the repository, then fetch each one. From version 1.22, the client gets that list only from the Tree API. Cloudsmith serves the endpoint for both models and datasets.

If a model hasn't been cached in your repository, or hasn't been indexed yet, Cloudsmith fetches its file list from the Hugging Face upstream in real time. The download goes ahead as normal, and the model is indexed for later requests.

Note: On huggingface_hub 1.20 and later, set HF_HUB_DISABLE_XET=1 until Cloudsmith supports Hugging Face’s Xet storage.

Keep up to date with our monthly product bulletin