New Tool Radar

Local Model Setup

How to Set LM Studio’s Model TTL and Auto-Eviction

Set a time-to-live on a loaded LM Studio model so it unloads itself after idle time and frees memory for the next model.

Schematic diagram with four steps: open the server settings, set the TTL idle minutes, let the model go idle, then confirm it unloads and reloads on demand.

A loaded model holds memory until you unload it, which is wasteful when you switch between models all day. LM Studio has a TTL (time-to-live) and auto-eviction setting: a loaded model unloads itself after being idle for the TTL you set, freeing memory for whatever comes next.

Set the TTL on the model or the server

In the LM Studio server settings, find the TTL and auto-eviction options and set the idle time after which a model unloads — for example ten minutes. The TTL is not an immediate unload command: it starts the clock when the model goes idle, and the model stays loaded until the clock runs out. Per-request TTL values sent through the API follow the same rule on the server side.

Server settings -> TTL and auto-evict -> set idle minutes, e.g. 10
# the model stays loaded until it has been idle that long,
# then LM Studio unloads it automatically

Do not set a short TTL on a model you call every few minutes: each reload costs the full load time again, and the docs note the TTL semantics differ from an immediate unload. A long TTL suits a model you use all day; a short one suits a model you only need once.

Try it: four checks

Check What you should see If you do not see it
Setting found The TTL and auto-evict options are in server settings Check the server settings panel
TTL set The value saves Restart the server if the setting needs it
Model unloads After the idle time, the model is no longer loaded Wait out the full TTL
Reload works The next request loads the model again That reload is expected behaviour

Expected result. We checked the LM Studio documentation, which describes TTL and auto-eviction and notes that a TTL is not an immediate unload command. We did not change the setting on this machine.

Limits

This guide covers the TTL setting only. The exact setting location can move between LM Studio versions. We did not test the setting ourselves.

Sources

See all