MTPLX/Docs/Quickstart

Install MTPLX and serve a local LLM.

MTPLX is a free, open source Mac app and CLI that runs local LLMs on Apple Silicon with native MTP speculative decoding. Three ways to install, one command to serve. When the server is up, any client that speaks the OpenAI or Anthropic API can use the model on 127.0.0.1:8000.

Install, run mtplx start, send one request. Everything below works from a fresh Mac with nothing else installed. Created by Youssof Altoukhi, who brought native MTP to the Mac in April 2026.

Requirements

Apple Silicon (M1 or newer) and macOS 14 or later. 16 GB of memory runs the Qwen 3.5 4B and 9B models comfortably. Qwen 3.8 27B Optimized Speed, the recommended pack for coding, needs 32 GB or more. On M1 and M2 the app and CLI pick its FP16 build automatically: same weights, native precision for those chips. Both check your Mac before recommending anything.

Install

Three paths. The app is the easiest way in; the CLI paths give you the same server and the same models.

The Mac app. Download the DMG from mtplx.com/download and drag it to Applications. The app checks your hardware, recommends a model that fits your memory, downloads it, sets up its own Python engine (no Homebrew needed), installs fan control, puts mtplx on your PATH, and measures your machine to pick the fastest decoding depth.

Homebrew.

brew install youssofal/mtplx/mtplx

pip.

python3 -m pip install -U mtplx

Check the install before loading anything. doctor runs on any machine and reports a missing MLX runtime as a dependency issue rather than a traceback.

mtplx doctor --summary

Start the server

mtplx start

mtplx start is interactive: pick a model, a mode and a surface, then chat. It serves an OpenAI-compatible API on 127.0.0.1:8000 plus an Anthropic-compatible /v1/messages. The app's play button does the same thing. The app and the CLI share one server, so mtplx start attaches to a model the app already has loaded instead of loading a second copy.

For the API server alone, with no chat surface, and to stop it cleanly:

mtplx serve --port 8000
mtplx stop

What onboarding does

On first run, MTPLX checks the chip and memory and recommends a model from the catalog that fits. You choose a mode: Auto (recommended; the engine resolves the profile per model), Sustained, Sustained Max, or Burst. Turbo is the default profile for the quantized 27B and 9B flagships and the Flash-Next packs, Sustained for everything else. Turbo shipped as the default in 2.0.0 (6 Jul 2026): verify-specialized quantized-matmul kernels plus a compiled verify step.

Auto-tune. The right draft depth depends on your specific Mac: chip, memory bandwidth, thermals. So onboarding runs the model itself on your machine at each depth, with fans pinned for clean timing, and keeps plain autoregressive decoding as the baseline. If an MTP depth beats it, that depth is saved. If nothing beats the baseline, nothing is saved and the app says so. You can rerun it any time:

mtplx tune --model <model-or-path> --retune

Fan control. The app installs it during onboarding; from the CLI it is one command with one sudo prompt. Fan-backed modes restore your fans to automatic if MTPLX dies for any reason, including kill -9 and closing the terminal.

mtplx max --install

Chat surfaces

The surface is what sits on top of the server. Pick one at the prompt or name it on the command line:

mtplx start cli          # terminal chat
mtplx start web          # browser chat
mtplx start dashboard    # live decode speed, acceptance by depth, cache state
mtplx start opencode     # launch OpenCode against the local server
mtplx start pi           # launch Pi
mtplx start hermes       # launch Hermes

Inside the terminal chat, /mtp off, /mtp on and /mtp status switch between MTP and plain decoding without reloading the model.

Plain decoding

The same loaded model can decode one token at a time, with no speculation. That is the baseline MTPLX measures itself against, and the simplest way to see what native MTP adds on your own Mac.

mtplx start --no-mtp
mtplx start cli --no-mtp

For MTP-equipped models the MTP runtime stays loaded, so switching back costs nothing. A single request can also ask for plain decoding by setting generation_mode to "ar"; the response reports mtp_depth: 0 and the server keeps the MTP weights for the next request.

First request

With the server up, send a streaming chat completion. The server has one chat model loaded and answers with it whatever chat model name the request carries; the examples use mtplx. /v1/models lists the served id, for example mtplx-qwen38-27b-optimized-speed.

curl http://127.0.0.1:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"mtplx","messages":[{"role":"user","content":"hi"}],"stream":true}'

Every response reports usage.cached_tokens, the number of prompt tokens served from the session cache instead of being prefilled again. /health reports the load state, profile, MTP depth and warmup status, and /metrics returns a JSON snapshot of the last 32 turns. The full endpoint list is on the API page.

curl http://127.0.0.1:8000/health
curl http://127.0.0.1:8000/v1/models

Where models live

Models download into ~/.mtplx/models. Set MTPLX_MODEL_DIR to put them somewhere else. The official catalog is on Hugging Face under Youssofal; the app and the CLI recommend from it based on your hardware.

mtplx models                                          # what is cached, sizes, validation
mtplx pull Youssofal/Qwen3.8-27B-MTPLX-Optimized-Speed  # download a model safely
mtplx inspect Youssofal/Qwen3.8-27B-MTPLX-Optimized-Speed --json   # compatibility report before anything runs

Disk sizes for the Qwen 3.8 27B packs: Optimized Speed 20.4 GB (peak memory 23.6 GB), Bare Speed 16.0 GB (peak 17.0 GB), Optimized Quality 29.4 GB (peak 32.7 GB, 36 GB+ RAM). Qwen 3.8 Flash-Next Optimized Speed is 115.1 GB including its 32 GB n-gram table and is meant for 96 GB+ Macs. Pack details are on the models pages.

Memory. The memory governor (2.10.0, 29 Aug 2026) sizes the context window to what your Mac can hold and prints the plan in the serve banner: engine budget, weights, resolved context window and session bank. A 48 GB Mac serving the 27B Speed pack resolves 196,608 tokens instead of the nominal 262,144. A request that cannot fit is refused up front with HTTP 507 (2.10.2, 1 Sep 2026) instead of dying mid-stream.

Next steps

Point a coding agent at the server: Claude Code through the Anthropic route, OpenCode, Pi and Cline through the OpenAI route, or Open WebUI for a browser chat. Deeper reference lives in the repository: server, profiles, troubleshooting.