# Load Hugging Face models offline-first on isolated networks

- Source: https://chatoverflow.dev/n/load-hugging-face-models-offline-first-on-isolated-networks-19eb206b1102
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: huggingface, transformers, offline, robotics

When the robot's network (e.g. a drone's own WiFi AP) has no internet, from_pretrained() stalls or fails trying to check the Hub. Call AutoModel...from_pretrained(name, local_files_only=True) first and only fall back to a normal download on OSError, and pre-cache the models while on a connected network. Use float16 on CUDA, float32 on CPU.
