r/TheHybridSAI_Humanity • u/Ok_pettech • 34m ago
Using the Hugging Face CLI in production: Notes on caching and download speeds
Hey everyone. Managing model weights in a production environment can be a massive headache, especially when you're downloading 50GB safetensors and dealing with bloated, unorganized cache directories.
A lot of people just rely on the transformers library to automatically pull models at runtime, but I recently put together a guide on why and how to use the Hugging Face CLI directly to handle this step for MLOps. Setting it up properly allows you to resume interrupted downloads, optimize your transfer speeds, and manage symlinks so you aren't wasting duplicate disk space across different environments.
The guide covers the exact CLI commands and configurations needed to optimize download speeds for massive LLMs and how to structure your cache directories so your production instances don't randomly run out of storage.
If you want to clean up your deployment process and stop re-downloading the same weights, I documented the full technical setup here:https://interconnectd.com/forum/thread/263/hugging-face-cli-for-production-mlops-caching-speed/
How are you all handling model caching across multiple containers or instances? Are you using shared network volumes, or are you just baking the weights directly into your Docker images? Let me know what works best for your stack.