Switch language한국어
Back to the list

You baked the model into the image. One env var can silently un-bake it

TL;DR AI

Key summary

2 min read
  1. Baking Hugging Face model weights into the container image during build can reduce serverless GPU cold-start time.

  2. If HF_HOME points to a different path at runtime, the loader may miss the baked cache and quietly download the weights again.

  3. This can happen without an error, wiping out the startup gains and adding hidden network fetches.

  4. The fix is to align build-time and runtime cache settings, avoid volumes when you want fully baked assets, and watch logs for unexpected downloads.

Read the original