Skip to content

HF environment variables

Dowon edited this page May 21, 2024 · 2 revisions

By setting environment variables in for the huggingface python library, you can use only the local cache, or change the huggingface endpoint.

https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables

HF_HUB_OFFLINE

set HF_HUB_OFFLINE=1, It will only use local cache files.

HF_ENDPOINT

set HF_ENDPOINT=some url, Network to that endpoint.

(Not in the official documentation)

You can use https://hf-mirror.com.

Clone this wiki locally