Keep warm or turn off
Each model on a worker has two settings: how long it stays in memory, and whether the worker serves it at all. Open the worker in the console and expand the model under Models & context. Owners and operators can change them.
Keep a model warm
The first request to a model that isn't loaded has to wait while it loads, from a second to half a minute. This is a cold start. Residency decides how long a model stays loaded:
| Residency | What it does |
|---|---|
| Auto (default) | Loads when a request needs it, and unloads after the worker's idle time, 15 minutes unless you change it. |
| Custom | Like Auto, with its own idle time, from 1 minute to 24 hours. |
| Always-on | Loads straight away and stays loaded, even after a restart. No cold starts. |
- Set the models you call most to Always-on. You can keep as many on as fit in the worker's memory.
- A model you choose when you rent a GPU starts Always-on.
- To change the idle time for the whole worker, or stop models unloading, open the worker's Settings and find Auto-unload idle models.
- To free a model's memory now, choose Unload now. Requests already running on it finish first.
- The Usage page marks requests that had a cold start, and shows how long the model took to load. Frequent cold starts on one model are a sign to make it Always-on.
When memory runs out
An Always-on model never gives up its memory. A request for another model
that won't fit beside it gets a 507 straight away, and the
console marks that model No room beside Always-on.
Switch an Always-on model back to Auto, or give your largest models their
own workers.
Turn a model off
Switch Serving off to stop one worker answering requests for a model, without uninstalling it. Requests go to your other workers that have it. The model stays installed, so turning it back on is instant.
- Requests already running finish first.
- Turning it off unloads the model and switches Always-on back to Auto. Turning it back on doesn't restore Always-on.
- Off on every worker, the model leaves your models list and requests for it get a 404 that says serving is off.
- With several quantisations of a model installed, it turns off only the one you chose. A request without a quantisation in the name then uses the one still serving. See Naming a model.
- It doesn't free disk space. Uninstall the model when you're done with it for good.