To free the memory used by an idle LM Studio model on your Mac, inspect the loaded instances with lms ps and unload the exact instance you no longer need. Verify that it disappears from the loaded list and remains in the downloaded library. If you routinely forget to unload it, set an idle time limit when you next load it.
This guide starts with a model already working in LM Studio and at least one completed chat. Use the model identifier reported for the running instance. Keep other apps open if you want to observe how the change affects your normal working setup. Avoid comparing single memory readings as if they were a measure of the model alone. LM Studio’s loaded-model command · Apple’s Activity Monitor memory guide.
Identify the model you can stop using
If LM Studio is serving a client, let the current reply finish. Close or pause the client requests you intend to stop. Another app can keep using the same model after you close a chat window. A check made while the model is still serving a request has a different starting point from an idle check.
Use the Terminal to list which models LM Studio currently has in memory. You might see more than one model or more than one loaded instance of a package. Read the running instance identifier. If you are unsure which instance belongs to a client, compare the ID with that client’s test configuration before you unload anything.
lms ps
lms ls
The first output is about currently loaded instances. The second lists downloaded files. A package can appear in both places. Record the model key from the downloaded list and the instance identifier from the running list so you can check them separately afterwards. LM Studio’s downloaded-model command.
Take a moment to note which chat or client should still work. For a small practice test, you can use a single model and one synthetic prompt. Ask it to reply Tray 19. Wait for the completed reply, leave the conversation available, and record the loaded instance. This gives you a known model to unload and a short check you can repeat after loading it again.
Check the Mac’s memory state before unloading
Open Activity Monitor and select Memory. Look at Memory Pressure and note what your Mac is doing at that point. If a browser, editor, or file import is active, leave those conditions in your notes. The chart combines activity across the Mac. Apple describes how free memory, caching, and swap contribute to pressure. A swap figure can reflect activity that occurred before you started this check.
Think about the outcome you need. If the Mac is slow while another app is open, switching back to that app after unloading can give you an observable result. Record whether it becomes responsive. If Memory Pressure was already low, the chart may tell you less about the effect of unloading one model. The loaded-instance check still tells you exactly whether LM Studio kept the model in memory.
Avoid making several changes before the first observation. Closing every app or loading another model at the same time can hide which change helped. For a useful comparison, keep the background apps stable, note the date and running instance, and make one unload request.
Unload only the target instance
In Terminal, replace the placeholder with the loaded identifier. Check it again immediately before running this command if you recently switched models.
lms unload "REPLACE_WITH_LOADED_IDENTIFIER"
lms ps
lms ls
The intended instance should disappear from the loaded list. Other loaded instances should remain, and the model package should still be present in the downloaded library. An unload operation frees the inference instance. Keeping the package on disk lets you load it again without downloading the weights. LM Studio’s load and unload command reference.
Go back to Activity Monitor and compare the state after the operation. Look at pressure and the responsiveness of the other app. A cached-memory value and a swap figure can remain after work ends. Treat those as system indicators alongside the specific proof that the model is no longer loaded. If the Mac remains slow with the model unloaded, check other active processes or workloads in Activity Monitor.
If the identifier reappears after you unload it, check which local clients are still making requests. LM Studio’s just-in-time loading can load a model when a request arrives. Ask a client to stop making requests first, then unload again and check the loaded list after a short pause. This helps identify the difference between a model that never unloaded and a model that promptly reloaded in response to another request. LM Studio’s idle TTL, just-in-time loading, and auto-eviction guidance.
Configure an idle timer for the next load
An idle time limit is useful when you switch among several local tools and can tolerate reloading a model after a break. Use a timer long enough for your usual gaps between requests. Keep manual unloading available when you know you want the memory immediately. You can set a timer when you load through the CLI. This example uses ten minutes and an explicit instance name.
lms load "REPLACE_WITH_DOWNLOADED_MODEL_KEY" --identifier "practice-idle" --ttl 600
lms ps
Check that the newly loaded model appears with the intended identifier. Use the model again if you want to see how the timer behaves after a completed request. Leave it idle and check the instance list after the chosen interval. Record whether any client sent an intervening request. A request arriving while you wait can make the instance active again and affect the observed time.
An API client can also choose idle settings according to the supported server request controls. Keep one control path in mind for a trial. When another integration is making requests, look at the server’s documented settings rather than assuming one command controls every later load. If you need the model to remain available for a current workflow, keep the timer aligned with that workflow’s pauses.
Reopen the model and verify your working state
When you actually need the model again, load the same downloaded package with the context settings you normally use. Wait for the loaded instance to appear. Ask for Tray 19 in a fresh short chat or use another explicit code and check the returned text. Compare the loaded identifier and the working client again if you use a custom name. This confirms that you freed the instance while retaining a runnable local model.
Keep a simple note with the target identifier, whether any clients were still using it, and what changed in Activity Monitor. If the Mac feels slow after another session, first check whether the same model is running and whether another process is under pressure. That gives you a concrete starting point even when the system memory figures differ from the earlier session.
Work through an unload that appears to have failed
Suppose you finish Tray 19, unload the instance, and discover the same identifier is back a minute later. Save two loaded-list observations, one immediately after the unload and one after the wait. If the first list is clear and the second has the instance, look for a new request between the two observations. A chat client may have a pending request or you may have tested the API before making the second check. Close the one client involved before repeating the experiment. Then compare the same two snapshots again.
A model can also fail to disappear because you passed a label from the wrong list. In that case, check the command’s output and compare its identifier with the running list. Copy the loaded ID exactly, preserving any prefix or suffix. Another instance of the same model can remain in memory under a different ID. Record which instance should still be active. That prevents unloading a model used by a separate editor or browser chat just because the names look similar.
For a controlled idle-timer check, load a small model you already know works and choose a short timer you can observe without changing other settings. Send one harmless prompt, wait for it to finish, and record the clock. Stop requests to that instance. Read the loaded list near the expiry you expected, then check again after another short interval if it is still listed. On the next request, note whether the runtime needs to reload the model. The check is about instance state and the pause before your own next task, without claiming a universal reload time.
If freeing one instance improves editor responsiveness but your next request needs a longer warm-up, keep both effects in the decision. For a task you run regularly during a short window, a longer idle timer can keep the model convenient. For a brief task before other heavy work, manual unloading gives you more control. Choose one behavior for the way you actually use the Mac and retest it with the same small prompt.
When you return to a larger model, leave enough room for its intended work and the other apps you need. Record its own context settings and memory observation. The result for a small idle practice model establishes that the control works. It does not establish how much headroom you will have while a different model is answering. Use Activity Monitor and the model’s own loaded state again if the workload changes.
If the response is part of an application that retries automatically, pause retries for the duration of the unload check. One failed request followed by an automatic retry can change the state before you see it. Record the first new request after the pause and confirm what model identifier it actually uses. You can then compare the library entry with the loaded instance without mistaking retry activity for a setting that failed.