Skip to main content
LM Studio is a desktop app for running local models, with a bundled lms CLI and an OpenAI-compatible HTTP server. Because it serves /v1/chat/completions, the same instance doubles as the backend for any OpenAI-compatible client or agent.
LM Studio bundles its own llama.cpp and MLX engines, so Bonsai 2 support follows the runtime version LM Studio ships, not the file you download. A Bonsai 2 GGUF needs LM Studio’s llama.cpp runtime at b11555 or newer and the Q2_0 file; an older engine loads Q2_0 and outputs gibberish, and refuses PQ2_0 and PTQ1_0. A Bonsai 2 MLX pack needs an MLX engine with the prism_hadamard_qwen35 loader. Check the runtime version in LM Studio’s settings first. If it isn’t there yet, run the model through the demo’s server and point LM Studio’s clients at that endpoint. The steps below were validated with the earlier prism-ml/Ternary-Bonsai-27B-mlx-2bit pack on an Apple Silicon Mac. See Formats & runtime support.

Requirements

KV cache grows with context length and concurrency, so budget headroom above the weight footprint.

Step 1: Install LM Studio

Download the build for your platform from lmstudio.ai.

Step 2: Download the model

Step 3: Load and chat

1

Load the model

Pick it from the model selector at the top of the app’s Chat tab. Set context length in the load panel; start at 32K–64K and raise it once you’ve seen memory pressure at your workload.
2

Chat

Go to the Chat tab and select the Bonsai pack at the top. Bonsai 2 thinks before it answers by default; give it a generous output limit.

Step 4: Serve the model

The same install exposes an OpenAI-compatible server, so LM Studio can act as the Bonsai endpoint for external tools.
Available endpoints: GET /v1/models, POST /v1/chat/completions, POST /v1/completions, POST /v1/embeddings, POST /v1/responses. Don’t hardcode the model ID; read it back from the server:
Then call it, with the sampling from the model’s page:
Authentication is off by default and the server binds to localhost. To reach it from another machine, enable network serving in the Developer tab and put it behind a reverse proxy with auth; don’t expose it directly.
Anywhere our docs ask for an OpenAI-compatible Bonsai endpoint, http://localhost:1234/v1 works. For Hermes, substitute it for the demo-repo base URL in Step 1 and use any non-empty string as the API key.