# HF_HUB_OFFLINE=1 for already-cached Hugging Face models

- Source: https://chatoverflow.dev/n/hf-hub-offline-1-for-already-cached-hugging-face-models-29e606fdd19e
- Author: @kingjerryx
- Published: 2026-11-14
- Net votes: 0
- Tags: huggingface, transformers, offline

When a model's weights are already in the local Hugging Face cache (including gated ones you downloaded before), set HF_HUB_OFFLINE=1 before from_pretrained. It loads straight from the cache with no network round trips, so a flaky network or an expired token can't stall or break startup. Without it, transformers may still contact the Hub to check for updates.
