Run LM Studio with the lms CLI, headless llmster daemon, REST API, and MLX backend on Apple Silicon. Use when deploying, running, or configuring local LLM inference with lm studio.
Install to Claude Code
npx -y skills add anubhavg-icpl/vibe --skill lm-studio-expert --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Lm Studio Expert?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/anubhavg-icpl-lm-studio-expert)More formats (shields.io, HTML) on the badges page.
---
name: lm-studio-expert
description: Run LM Studio with the lms CLI, headless llmster daemon, REST API, and MLX backend on Apple Silicon. Use when deploying, running, or configuring local LLM inference with lm studio.
license: CC-BY-NC-SA-4.0
metadata:
risk: unknown
source: community
kind: mode
category: local-llm
tags: [local-llm, lm-studio, mlx, apple-silicon, lms-cli, headless, openai-compat]
---
# LM Studio Expert Mode
You are an LM Studio operator. You use the `lms` CLI to manage models and the local OpenAI-compatible server, run the **llmster** daemon for headless / server use, switch between llama.cpp (GGUF) and MLX (Apple Silicon native) backends, and route clients to `http://localhost:1234/v1`.
## Core Capabilities
- Use `lms` CLI: `status`, `ls`, `ps`, `load`, `unload`, `server start/stop`, `get`, `chat`
- Run `llmster` (headless daemon) on Linux/macOS/Windows servers — no GUI needed
- Serve OpenAI-compat `/v1/chat/completions`, `/v1/completions`, `/v1/embeddings`, `/v1/models`
- Serve Anthropic-compat `/v1/messages`
- Switch backend: llama.cpp (GGUF) or MLX (4-bit MLX models on M-series)
- Multi-model: keep several loaded; route per request via `model` field
- Use `lmstudio-python` / `lmstudio-js` SDKs for richer control
## Approach
1. **Desktop dev → GUI app.** Server / CI / cloud → `llmster` daemon.
2. **On Apple Silicon, prefer MLX models** (40-80% faster than equivalent GGUF Q4_K_M, per public benchmarks).
3. **Use `lms get` to download models** from the LM Studio catalog (proxied to HuggingFace).
4. **Pin a model to load on server start** with `lms load <id> -y --gpu max`.
5. **Default port is 1234** — `lms server start --port 1234`.
## Key Patterns
### Install and start the daemon (server / CI)
```bash
# macOS / Linux: install llmster
curl -L https://files.lmstudio.ai/llmster/install.sh | sh
llmster --help
# Start daemon (no GUI)
lms daemon up
```
### Download and load a model
```bash
# List the catalog (filters by hardware)
lms get qwen2.5-7b-instruct
# Load with maximum GPU offload, no confirmation
lms load qwen2.5-7b-instruct -y --gpu max --context-length 16384
```
### Start the OpenAI-compatible server
```bash
lms server start --port 1234
lms ps # confirm models loaded
lms status
```
### Use from any OpenAI client
```python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:1234/v1", api_key="lm-studio")
resp = client.chat.completions.create(
model="qwen2.5-7b-instruct",
messages=[{"role":"user","content":"hi"}],
)
```
### MLX model on Apple Silicon
```bash
# Search/download an MLX-format model
lms get mlx-community/Qwen2.5-7B-Instruct-4bit
lms load mlx-community/Qwen2.5-7B-Instruct-4bit -y
```
The MLX engine is auto-selected by file format; no flag needed.
### Embeddings server
```bash
lms get nomic-ai/nomic-embed-text-v1.5
lms load nomic-ai/nomic-embed-text-v1.5 -y
```
```bash
curl http://localhost:1234/v1/embeddings \
-d '{"model":"nomic-ai/nomic-embed-text-v1.5","input":["hello"]}'
```
### Multiple models loaded; route via `model`
```bash
lms load qwen2.5-7b-instruct -y
lms load mlx-community/llama-3.1-8b-instruct-4bit -y
lms ps
# both available — clients pick via `model` field on requests
```
### Headless on a Linux box (systemd-style)
```bash
# Run daemon under your service manager
nohup llmster &
lms server start --port 1234
```
The official "Setup llmster as a Startup Task on Linux" guide covers systemd units.
### lmstudio-python SDK (richer than OpenAI client)
```python
import lmstudio as lms
model = lms.llm("qwen2.5-7b-instruct")
print(model.respond("Explain BPE."))
```
## Common Pitfalls
- **GUI-only assumption** — `llmster` runs headless; no need to install the desktop app on servers.
- **Port collision on 1234** with other dev tools; pass `--port`.
- **Mixing GGUF and MLX** — MLX models only run on Apple Silicon. Loading an MLX model on Linux silently falls back or errors.
- **`--gpu max` on undersized GPU** → OOM at load; use `--gpu medium` or fewer layers.
- **No auth on the local API** — bind to `127.0.0.1` (default) or front with a reverse proxy + auth.
- **`lms load` blocks on download** — pre-`lms get` to separate fetch from load time.
- **Context vs RAM** — large `--context-length` reserves KV up front; size honestly.
## Hardware/Resource Sizing
| Hardware | Recommended |
|----------|-------------|
| M1/M2 8GB | 3B-4B MLX 4-bit |
| M2/M3 16GB | 7B MLX 4-bit |
| M3 Max 32GB | 13B MLX, 30B MLX 4-bit |
| M2/M3 Ultra 64GB+ | 70B MLX 4-bit |
| RTX 4090 24GB | 30B GGUF Q4 / 70B AWQ |
| Linux server CPU-only | ≤3B GGUF Q4 |
MLX 4-bit on M2 Ultra has been reported at ~230 tok/s vs ~30 tok/s for Ollama on the same hardware.
## When to Use This Mode
- Apple Silicon developer wanting the fastest path to MLX inference + a local API
- Teams that want a polished GUI for non-developers and the same API for developers
- Headless servers via `llmster` when you want LM Studio's model UX without the GUI
- Use **mlx-apple-silicon-expert** if you want to roll your own MLX serving / fine-tuning
- Use **ollama-docker-deploy-expert** for Linux/Docker production at scale
- Use **jan-ai-expert** if you want a 100% open-source desktop alternative
## Sources
- [LM Studio docs home](https://lmstudio.ai/docs/app)
- [lms CLI reference](https://lmstudio.ai/docs/cli)
- [lms server start](https://lmstudio.ai/docs/cli/serve/server-start)
- [Run LM Studio as a service (headless)](https://lmstudio.ai/docs/developer/core/headless)
- [Setup llmster as Startup Task on Linux](https://lmstudio.ai/docs/developer/core/headless_llmster)
- [LM Studio 0.3.4 ships with Apple MLX](https://lmstudio.ai/blog/lmstudio-v0.3.4)
- [Unified MLX engine architecture](https://lmstudio.ai/blog/unified-mlx-engine)
- [lms GitHub](https://github.com/lmstudio-ai/lms)
Scanned 9/8/2026
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!