LM Studio as a Local Agent Runtime — Models, VRAM Headroom, Tool Calling

By LLM Hardware team · Methodology ·

Key facts

App
Proprietary desktop. Homepage leads with the Bionic agent. MLX and llama.cpp.
Glimmer
Named by Meta in August 2026 as a planned partner.
Pad
2 to 6 GB above formula plus cache. Meta's Muse Glimmer figure in LM Studio sits 5.2 GB above.
Checked
2026-10-13

Checked 2026-10-13. Author: LLM Hardware team. Amazon prices are not stored or shown on this site.

Citeable facts

Key fact: LM Studio is a desktop app for running local models. The 2 October 2026 homepage leads with Bionic, its agent, and says the runtime uses MLX and llama.cpp. It is not an open-source project.

How we got it: lmstudio.ai. Treat “open source” claims about the app itself as wrong. The models you download have their own licenses.

Checked:

Key fact: Meta's 10 August 2026 Muse Glimmer post named LM Studio as a partner path. As of 30 October 2026 LM Studio's catalog lists meta/muse-glimmer with a minimum system memory of 26GB.

How we got it: research.meta.ai Muse Glimmer post; lmstudio.ai/models/meta/muse-glimmer. Read 2026-10-30. Listed, not run by this site.

Checked:

Key fact: Leave 2 to 6 GB above the site formula and KV cache for LM Studio and Bionic. One published figure sits inside that range: Meta gives about 24.1 GiB (25.9 GB) for Muse Glimmer Q4_K_M in LM Studio at a 16K context, 5.2 GB above the formula plus cache.

How we got it: Meta deploy page (dev.meta.ai/docs/muse-glimmer/deploy.md), read 2026-10-30. Formula: 29.6B x 0.5 x 1.2 + 2 = 19.8 GB; 16,384 x 53,248 bytes of f16 cache = 0.87 GB (52 layers, 2 KV heads, head_dim 128, config.json). The range itself is not an LM Studio or Apple specification.

Checked:

Key fact: lms server start binds LM Studio's OpenAI-compatible server to 127.0.0.1 by default. lms load --context-length sets the context, and lms load --estimate-only prints a memory estimate without loading the model.

How we got it: lmstudio.ai/docs/cli/server-start and lmstudio.ai/docs/cli/load, read 2026-10-30.

Checked:

Key fact: On a Mac mini M5 Pro 24 GB, Qwen3-14B at Q4 with a 16,384-token context leaves 6.4 GB for LM Studio; Qwen3.8-27B at the same context leaves 0.7 GB.

How we got it: 14.8B and 27B (model cards) x 0.5 x 1.2 + 2 = 10.9 and 18.2 GB; f16 cache 16,384 x 163,840 and 65,536 bytes (config.json) = 2.7 and 1.1 GB; 20 GB usable after a 4 GB macOS reserve.

Checked:

Methodology explains the VRAM formula, the bytes per weight at each quantization, and the full source list.

LM Studio is a desktop application for downloading and running local models, with a local server other tools can call. On 2 October 2026 the homepage led with Bionic, which it calls LM Studio’s agent for open models: documents, code, and computer control, speech transcribed on device, runtime powered by MLX and llama.cpp. The same page mentions cloud services with a zero-data-retention claim and names large open models. This guide does not repeat those model names as hardware recommendations unless they are in our parameter list. The app is proprietary. Say “local desktop,” not “open source.” The weights you load are a separate license, often Apache-2.0 or something narrower. Read the card.

Server first, agent second

The useful trick, even if you never open Bionic, is the local HTTP server. Open WebUI, Continue, Aider, and OpenHands can all target an OpenAI-compatible base URL. You pick the GGUF in LM Studio. They send chat requests. That split keeps the agent UI replaceable when a project stalls. The LM Studio versus Ollama page is the choice between a desktop browser of models and a service you run headless. For an always-on box with no monitor, Ollama is the better fit. For a person who wants to see the model list, LM Studio.

Meta’s Muse Glimmer post, 10 August 2026, listed LM Studio among the apps that would be able to run Glimmer “in the coming days,” next to Ollama and Unsloth. As of 30 October 2026 LM Studio's catalog lists it as meta/muse-glimmer, with a minimum system memory of 26GB. Glimmer’s own memory table is on the Glimmer hardware page.

Setup steps: server, base URL, context length

From LM Studio's CLI and developer docs, read on 30 October 2026. The lms command ships with LM Studio; open the app once before you use it.

1. Find the model key and check LM Studio's memory estimate before loading. lms ls lists your downloaded models. --estimate-only prints a memory estimate and exits without loading.

lms ls
lms load --estimate-only MODEL_KEY

2. Load the model with the context you want. --context-length sets how many tokens of context the model keeps, and --gpu max offloads every layer to the GPU. Size the context with the table further down this page.

lms load MODEL_KEY --context-length 16384 --gpu max

3. Start the OpenAI-compatible server. It binds to 127.0.0.1 by default, so only this computer can reach it. Without --port the server reuses the last port it used, so set the port LM Studio's own examples use:

lms server start --port 1234
lms server status

4. Set the base URL in your agent and check the model list. Clients on the same computer use http://127.0.0.1:1234/v1. From a Docker container on the same computer, OpenHands' local-LLM page uses http://host.docker.internal:1234/v1. The ID in the /v1/models list is the model name your agent sends. LM Studio's OpenAI-compatibility page shows no API key setting; if a client insists on one, any placeholder fills the field.

curl http://127.0.0.1:1234/v1/models

Headroom above the formula

Our VRAM formula, params × bytes × 1.2 + 2, already includes a short-context allowance and 2 GB. LM Studio is a GUI plus a server plus, if you turn Bionic on, an agent loop. This guide adds another 2 to 6 GB to the plan so the app and a modest KV cache are not treated as free. Neither LM Studio nor Apple publishes that range. One vendor figure sits inside it: Meta's deploy page puts Muse Glimmer's Q4_K_M build at about 24.1 GiB (25.9 GB) in LM Studio at one request and a 16K context, 5.2 GB above the site formula plus a 16K f16 cache (20.6 GB) for the same model. LM Studio can also print its own estimate before loading, with lms load --estimate-only. If the formula says 18.2 GB for Qwen3.8-27B at Q4, a 24 GB machine is the first safe size, not a 20 GB card.

Model at Q4 Formula Machine after the pad
K2-Horizon-7B 6.2 GB 8–12 GB. The pad fits.
Qwen3.8-27B 18.2 GB 24 GB, and do not also load a second model.
K2-32B or Muse Glimmer Q4 21.2 GB or 20 GB 24 GB is the weights. 36 GB is the weights plus Bionic plus cache.
Same 30B at Q8 38 GB 64 GB unified. A 36 GB Studio does not have the pad left. Calculator.

Worked example: three catalog machines

Weights by the site formula on each model card's parameter count, plus f16 KV cache from config.json: 163,840 bytes per token for Qwen3-14B and 65,536 for Qwen3.8-27B, whose 48 linear-attention layers keep a fixed-size state instead of a per-token cache. Mac rows subtract 4 GB for macOS.

Machine Model and context Total Left for LM Studio and Bionic
Mac mini M5 Pro 24 GB (about 20 GB usable) Qwen3-14B at Q4, 16,384 tokens 10.9 + 2.7 = 13.6 GB 6.4 GB, the whole 2 to 6 GB pad
Mac mini M5 Pro 24 GB Qwen3.8-27B at Q4, 16,384 tokens 18.2 + 1.1 = 19.3 GB 0.7 GB, short of the pad
RTX 3090 24 GB Qwen3.8-27B at Q4, 16,384 tokens 19.3 GB 4.7 GB of VRAM
Mac Studio M5 Max 36 GB (about 32 GB usable) Qwen3.8-27B at Q4, 32,768 tokens 18.2 + 2.1 = 20.3 GB 11.7 GB
Mac Studio M5 Max 36 GB Muse Glimmer Q4_K_M, 16K, Meta's LM Studio figure 25.9 GB 6.1 GB

Compared with Ollama

Neither the Ollama FAQ nor LM Studio's docs cited here give a fixed overhead figure, and the KV-cache arithmetic is the same in both. What differs is the default context. Ollama's FAQ gives 4,096 tokens unless you set OLLAMA_CONTEXT_LENGTH, and says required RAM scales with OLLAMA_NUM_PARALLEL times OLLAMA_CONTEXT_LENGTH. LM Studio takes the context length you set when you load the model. To see what each one uses on your machine, run lms load --estimate-only before loading in LM Studio, and ollama ps after loading in Ollama, which lists the loaded size and whether the model sits 100% on the GPU. For Muse Glimmer, Ollama's library lists the q4_K_M tag at 18GB and Meta gives 25.9 GB for LM Studio at 16K; one is a download size and the other a running footprint, so compare the two apps on your own machine.

Tool calling only works if the model and the runtime both support the schema you send. A 7B that “has tools” in a model card can still emit broken JSON. Step up in size before you blame the app. This guide lists no tok/s figure for Bionic.

Tool calling: which models, and a JSON check you can run

LM Studio's tool-use page splits models in two. "Native" support means the model's chat template supports tools and LM Studio supports its tool-call format; those models show a hammer badge in the app. Everything else gets "default" support, and the page warns that smaller models and models not trained for tool use may output badly formatted tool calls. When LM Studio cannot parse a call, it returns the text in the ordinary content field instead of tool_calls.

This site does not test tool calling. The picks below come from LM Studio's native list and the model makers' own pages, matched to memory by the site formula:

Memory Model named for tool use Q4 size Source of the tool-use claim
8 to 12 GB Qwen2.5-7B-Instruct or Llama 3.1 8B Instruct 6.6 GB and 6.8 GB by the formula Both are on LM Studio's native tool-use list
24 GB (Mac mini M5 Pro, RTX 3090) A Qwen model with the hammer badge, such as Qwen3-14B 10.9 GB by the formula LM Studio lists the Qwen family as native; check the badge on the exact file
36 GB (Mac Studio M5 Max) Muse Glimmer about 25.9 GB in LM Studio at 16K, per Meta LM Studio's model page: "Trained for tool use"

To check whether a model returns valid tool calls on your machine, save this request as tool-request.json. It follows the shape of LM Studio's own tool-use example; put your model key from lms ls in place of MODEL_KEY.

{
  "model": "MODEL_KEY",
  "messages": [{"role": "user", "content": "What is the weather in Paris?"}],
  "tools": [{
    "type": "function",
    "function": {
      "name": "get_weather",
      "description": "Get the current weather for a city",
      "parameters": {
        "type": "object",
        "properties": {"city": {"type": "string"}},
        "required": ["city"]
      }
    }
  }]
}

Send it to the server and save the reply:

curl -s http://127.0.0.1:1234/v1/chat/completions -H "Content-Type: application/json" -d @tool-request.json > reply.json

Save this as check_tool_call.py and run python3 check_tool_call.py after each request:

import json

msg = json.load(open("reply.json"))["choices"][0]["message"]
calls = msg.get("tool_calls") or []
if not calls:
    print("FAIL: no tool_calls. Text returned:", msg.get("content"))
for call in calls:
    args = json.loads(call["function"]["arguments"])
    print("PASS:", call["function"]["name"], args)

json.loads stops with an error if the arguments are not valid JSON, and the FAIL line catches a call LM Studio could not parse. Run the request ten or twenty times at your agent's real context length before you trust a model with tools, and step up a size if it fails.

The desktop this app assumes

LM Studio wants a machine you sit at.

The Mac mini M5 Pro 24 GB runs Qwen3-14B with a 16K context and the full 2 to 6 GB pad, and a 27B only with no pad left. The Mac Studio M5 Max 36 GB holds Qwen3.8-27B at 32K with 11.7 GB to spare, or Muse Glimmer at Meta's LM Studio figure with 6.1 GB. On Windows, the RTX 3090 24 GB holds Qwen3.8-27B at 16K with 4.7 GB of VRAM left; the listing is the Founders Edition of an Ampere-generation card, so check the seller and condition. The RTX 4090 this page linked before was listed as unavailable at our last catalog check, so it has no link here.

Mac mini M5 Pro 24 GB on Amazon

ASIN B0HGGHNQY6. Amazon Associates link. The live price is on that page, not locked in here.

Mac Studio M5 Max 36 GB on Amazon

ASIN B0HGKSQMX6. Amazon Associates link. The live price is on that page, not locked in here.

RTX 3090 Founders Edition 24 GB on Amazon

ASIN B08HR6ZBYJ. Amazon Associates link. The live price is on that page, not locked in here.

Sources

Questions

How do I turn on LM Studio's local server?

Run lms server start --port 1234. It binds to 127.0.0.1 by default, so only that computer can reach it. Clients then use the base URL http://127.0.0.1:1234/v1, and lms server status shows whether it is running. The lms command ships with LM Studio; open the app once first.

How do I set the context length?

At load time, for example lms load MODEL_KEY --context-length 16384, using a key from lms ls. lms load --estimate-only MODEL_KEY prints LM Studio's memory estimate without loading the model.

Which models handle tool calls in LM Studio?

LM Studio lists native tool-use support for the Qwen, Llama 3.1 and 3.2, and Mistral families, marked with a hammer badge in the app. Other models get default support, and LM Studio warns that smaller models may produce badly formatted calls. This site does not test tool calling; the check on this page parses the reply's tool_calls with json.loads.

Does LM Studio use more memory than Ollama?

Neither publishes a fixed overhead, and the weights and KV cache follow the same arithmetic. Ollama defaults to a 4,096-token context; LM Studio uses the context you set at load. Compare lms load --estimate-only with ollama ps on your own machine.

A correction or a hardware question goes to the contact page.