Bring It All In: Keep Hugging Face Models Next To Your Workloads
Reduce bandwidth suffocation, repeated long download restarts, and escape OOMs. Move your Hugging Face models in-cluster with kServe, LLM-D or Ray.

Kubernetes is the new model management plane, herding CRDs that have been built around inference. These CRDs are coordinating a constant flow of new deployments that are integrating the newest models from Hugging Face into their existing services. Hugging Face is the leading database for models which handles thousands of companies pulling from its servers daily. These pulls are tens, if not hundreds of gigabyte models which are pulled into a Kubernetes cluster a pod at a time. When hf download happens, and nothing goes wrong, it is great! However, the pods pulling these models can eat up all the bandwidth in the cluster, suffocating the other services running alongside them. Or, when a pod downloading a model gets evicted, the same model download is restarted. And, if you're trying to run Hugging Face models in an airgapped environment, it becomes even more interesting.
Introducing Cuddle
Today, we're giving you the hug that you've always wanted from Hugging Face. Spegel Enterprise Edition's (SEE) newest feature, Cuddle, works as a peer-to-peer in-cluster model registry. Cuddle because it is better than a hug, and it keeps the important things, your models, close to you, your nodes. Cuddle implements the Hugging Face API so that those requesting the models go straight to the SEE endpoint. SEE caches all the models and makes them available to all your nodes.
In airgapped environments SEE uses an archive on the host's disk and preseeds the nodes within the cluster.
Implementing Cuddle wasn't all warm and fuzzy. We came across some interesting challenges. Our goal was to stream the model artifact directly into an OCI image, expediting or matching the existing download times. We read through the Hugging Face API, hoping to leverage the Large File System endpoint (LFS, large files are greater than 10MB). This endpoint provided SHA sums which we hoped would allow us to convert 1:1 to OCI images. However, for files under 10MB there were no SHA sums given through any endpoint.
Additionally, Kubernetes OCI volumes only support container images, and it expects this in the format of a tar archive. This means we would have to download the file, create it into a tar archive, and then generate the SHA sum for it to be ingested as a container image. Ultimately, downloading the entire model, converting it to an OCI image, and serving it ended up being much more resource intensive and time consuming.
Cuddle Chunkin' Coming Soon
Next, we're focusing on chunking. Hugging Face has their own chunk-based upload and download protocol called xET. Models tend to share underlying packages, similar to container images. xET chunks large models into approximately 64MB layers and allows models to share the same data between each other. Luckily, this is where we shine, as distributing layers and coordinating image reconstruction is where SEE began.
Ready to SEE for yourself?
Watch the video below, have a peek at the docs, or view our GitHub repo for the demo.
Install Spegel Enterprise Edition (SEE) here. Enjoy the 30-day license for personal and testing purposes only.
FAQ
What is Cuddle?
Cuddle is an in-cluster peer-to-peer cache for Hugging Face. It caches models on a node and makes the cache accessible for all other nodes. It implements an HF-compatible API which does not require any client to be aware of its presence.
Who is this for?
If you're struggling with Hugging Face pull times being long, restarting, or being inconsistent. If you're experiencing downtime or issues with high resource consumption due to model deployments, or if you're running airgapped. Cuddles are for everyone.
How does this compare with an Artifactory mirror?
Artifactory doesn't run inside your cluster, meaning that it has to be managed elsewhere. Sometimes this means a NAT gateway, or other types of networking resources to ensure connectivity and security. These additional network hops can cause strain long term.