Replicate
Replicate logoReplicate · Feature trail

Torch Compile Caching

2 posts · Sep 2023 – Sep 2025

What this trail covers

Replicate has implemented caching for `torch.compile` artifacts to significantly reduce model boot times for PyTorch-based models. This optimization caches compiled code across model container lifecycles, leading to 2-3x faster cold starts for models like those in the FLUX family. The system keys cache files on model version and stores them near GPU nodes, updating the cache upon graceful container shutdown. This has been further extended to dramatically improve cold boot times for fine-tuned models.

All Replicate trails