Local inference runtime
Self-hosting LM Studio: how much VRAM, and how to keep it running
It stopped being just a desktop chat window. The 0.4 line split the engine out into a headless daemon called llmster, so it runs fine on a machine with no display — the only question left is whether your card is big enough.
LM Studio · self-hosted
Most people still picture LM Studio as a GUI you double-click on a laptop. The 0.4 line changed that. The engine now ships separately as llmster, a headless daemon you can install on a Linux box, a cloud GPU, or a Colab runtime. Underneath, llama.cpp moved to 2.0.0, which brings continuous batching along with two new load-time options — Max Concurrent Predictions and Unified KV Cache — so parallel requests are actually batched instead of queued one behind the other. There is also a native stateful endpoint, /api/v1/chat, which hands back a response_id you pass as previous_response_id on the next turn, so you stop re-sending the whole transcript every request.
The software is rarely what stops you. VRAM is. The official requirements are deliberately modest: on Windows, at least 4GB of dedicated VRAM and 16GB of system RAM, with AVX2 required on the CPU; macOS 14.0 or newer on Apple Silicon only; Ubuntu 20.04 or newer on Linux. That floor only guarantees the app launches. Whether it runs well comes down to the size of the GGUF on disk — gpt-oss-20b in MXFP4 is 12.1GB, Qwen3-32B at Q4_K_M is 19.76GB, Llama-3.3-70B at Q4_K_M is 42.52GB, and gpt-oss-120b in MXFP4 is 63.4GB across two shards. KV cache sits on top of all of that. When it does not fit, llama.cpp quietly leaves the overflow layers on the CPU, throughput drops by an order of magnitude, and nothing in the UI tells you why it feels slow.
Which turns the whole thing into a purchasing question: is one evaluation run worth putting a 48GB or 80GB card in your machine? On NexGPU you rent one by the second instead — RTX 3090 24GB at $0.193/GPU-hr, RTX A6000 48GB at $0.817/GPU-hr, A100 PCIE 80GB at $0.824/GPU-hr, with no minimum, no setup fee and no quota request. Install llmster, tunnel port 1234 back over SSH, and every OpenAI client you already point at localhost keeps working untouched.
01 —
The four pieces of LM Studio 0.4
The desktop app is only one of them, and it is not the one you deploy
| Version | Parameters | VRAM | Context | Notes |
|---|---|---|---|---|
| LM Studio 0.4.21 (desktop) | Electron GUI, macOS / Windows / Linux | 4GB dedicated VRAM recommended as a floor | Set at load time, capped by the model | Split View, Developer Mode, and chat export to PDF and Markdown. The Linux build is an AppImage and needs a graphical session — which is exactly why it is the wrong thing to install on a cloud GPU. |
| llmster (headless daemon) | Server-resident, no GUI at all | No UI overhead; the card is entirely the model's | Supports Unified KV Cache allocation | The piece 0.4 carved out. One install.sh line, then lms daemon up, then a systemd unit to keep it alive across reboots. This is what a rented GPU box actually wants. |
| lms CLI (MIT licensed) | Open source at lmstudio-ai/lms, built on lmstudio.js | Uses no VRAM itself | --context-length sets it directly | lms get / load / unload / ps / server / log stream / runtime / daemon / link. All of it scriptable, which means all of it works in CI. |
| llama.cpp 2.0.0 runtime (GGUF) | CUDA / Vulkan / ROCm / CPU backends | GGUF file size is roughly your VRAM floor; KV cache is extra | Continuous batching, Max Concurrent Predictions tunable | The path you take on rented NVIDIA hardware. Multi-GPU Priority Order allocation and the limit-to-dedicated-VRAM toggle are CUDA-only for now; AMD support is still being filled in. |
| MLX runtime | Apple Silicon only | Unified memory; irrelevant to discrete GPUs | Follows the model | M-series Macs exclusively. It does nothing on an NVIDIA card, so pull the GGUF build rather than the MLX build — this is the single most common mistake people make on their first cloud deploy. |
02 —
Picking a card by weight size: four honest tiers
It only counts as running if the weights and the KV cache both fit
Single card running gpt-oss-20b (12.1GB MXFP4) for local evaluation
RTX 3090 24GB$0.193/GPU-hr
With 12.1GB fully offloaded there is still a dozen GB left for KV cache, so 32K context holds comfortably — and this is the cheapest VRAM per gigabyte on the entire price list.
Qwen3-32B Q4_K_M (19.76GB) with long context and concurrency
RTX 5090 32GB$0.723/GPU-hr
Squeezing 19.76GB into a 24GB card leaves nothing for KV cache; 32GB is what lets you raise context and Max Concurrent Predictions at the same time.
Llama-3.3-70B Q4_K_M (42.52GB) fully offloaded on one card
RTX A6000 48GB$0.817/GPU-hr
48GB catches 42.52GB of weights with room to spare, so you skip multi-GPU layer splitting and never risk spilling back into system RAM.
gpt-oss-120b (63.4GB MXFP4 across two shards) on a single card
A100 PCIE 80GB$0.824/GPU-hr
Only $0.007/hr more than the 48GB A6000, and the one option at this price point that swallows 63.4GB of weights while still leaving headroom for KV cache.
03 —
Turning a rented GPU into an LM Studio endpoint
Four steps, all command line, no display required
- 01
Start the instance and tunnel port 1234 home
Spin up an Ubuntu CLI instance with an NVIDIA card in the NexGPU console and pass -L when you SSH in. The LM Studio server listens on localhost:1234 by default, and tunnelling it back is far safer than opening the port to the internet. Your local base_url still says localhost, so nothing in your code changes.
ssh -L 1234:localhost:1234 root@<your-node>.nexgpu.net - 02
Install llmster and bring the daemon up
Do not install the desktop build — it is an Electron app that needs a graphical session and will not start on a headless box. llmster is the GUI-free engine that 0.4 split out. One script, and the binary lands at ~/.lmstudio/bin/lms; run lms --help to confirm before going further.
curl -fsSL https://lmstudio.ai/install.sh | bash && ~/.lmstudio/bin/lms daemon up - 03
Pull the model and offload every layer
--gpu=max tells llama.cpp to push all layers onto the card. This is the step that decides your throughput: a single layer left on the CPU costs you an order of magnitude, and nothing errors out to warn you. Check the offload ratio with lms ps rather than trusting how it feels.
lms get openai/gpt-oss-20b && lms load openai/gpt-oss-20b --gpu=max --context-length=32768 - 04
Start the server and point your existing client at it
Port 1234 serves three surfaces at once: the OpenAI-compatible /v1/chat/completions, /v1/completions, /v1/embeddings, /v1/responses and /v1/models; an Anthropic-style Messages API; and the native stateful /api/v1/chat, which takes an Authorization: Bearer token and threads conversations via previous_response_id. For boot persistence write a systemd unit with Type=oneshot and RemainAfterExit=yes, chaining lms daemon up then lms load --yes in ExecStartPre and lms daemon down in ExecStop.
lms server start && curl http://localhost:1234/v1/models
Two real invoices
Case one: evaluating gpt-oss-20b on an RTX 3090 24GB. The 12.1GB of weights offload fully into 24GB, and compute bills at $0.193/GPU-hr. Six hours a day for a week is 30 hours, so 30 x $0.193 = $5.79. Keeping the model on disk for a month costs 12.1 x $0.414 = $5.01. Pulling down 2GB of evaluation logs is 2 x $0.0081 = $0.02. Total roughly $10.82 — two orders of magnitude below buying a 24GB card. Case two: gpt-oss-120b on an A100 PCIE 80GB, where the price list hides a trap. The RTX A6000 48GB is $0.817/GPU-hr and the A100 PCIE 80GB is $0.824/GPU-hr, a difference of $0.007 an hour — but 48GB will not hold 63.4GB of weights, so that seven-tenths of a cent buys whether it runs at all, not how fast. Ten hours is 10 x $0.824 = $8.24. Storage is the line worth watching: parking 63.4GB for a month is 63.4 x $0.414 = $26.25, more than triple the compute, so destroying the volume and running lms get again next time is usually the cheaper habit. Compute billing stops the moment the instance stops; storage keeps billing until the volume is destroyed. Track them separately.
04 —
FAQ
How much VRAM does LM Studio actually need?
Can LM Studio run on a server with no graphical interface?
Is LM Studio free for commercial use, and is it open source?
How does LM Studio compare to Ollama and vLLM?
What is the safe way to reach LM Studio running on a remote GPU?
The model loaded fine — why is generation still slow?
Start building on NexGPU
Enterprise R&D team or solo developer — either way, your first job can be running in minutes.
Sign up to browse live network pricing. No payment method required.
