Model or dataset
youssofal/MTPLX avatar
youssofal/MTPLX

MTPLX's fastest published number was measured three releases ago

The fastest way to run Qwen 3.8 Flash Next and Qwen 3.8 27B on a Mac: 125 tok/s in OpenCode on an M5 Max. Native MTP speculative decoding on Apple Silicon, exact at any temperature. OpenAI and Anthropic compatible local server.

2,759 stars215 forksPythonApache-2.0

At a glance

What is it?
MTPLX is a Mac app and command line that runs local models on Apple Silicon using the model's own multi-token prediction heads for speculative decoding. Its headline speed came from release 2.11.3 while 2.12.2 is what installs, its benchmark table spans six releases, and the exactness check it describes was run for text on one release and never repeated for images.
Who is it for?
MTPLX suits someone on Apple Silicon who wants a local model served over OpenAI and Anthropic shaped endpoints and is willing to hold an exact dependency pin to keep generated text stable. Before adopting it, read the benchmark table's parentheticals rather than its best row, because the fastest figure was measured on release 2.11.3, the table mixes versions from 2.2.0 upward, and the recommended model changes with the chip generation.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • youssofal/MTPLX2,759 ★ · +360
Star history
Repository2026-09-212026-11-22
youssofal/MTPLX2.4k2.8k

360 Stars in the last 62 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The fastest row in the table was measured on an older release

The claim in the repository description is 125 tok/s in OpenCode on an M5 Max, and there is a matching row in the table at 125.8 tok/s. Read that row's conditions: one OpenCode request, 1,301 tokens generated, an 18,539-token prompt with 18,364 tokens of it served from cache, MTP depth 3, and MTPLX 2.11.3, dated 16 September 2026. The version being distributed now is 2.12.2, tagged on 2026-10-03. So the headline number describes a build three releases behind the one that installs, and the page does not carry an equivalent row for 2.12.x. The comparison is visible in the same table: the Optimized Speed row for the same model reads 63.5 tok/s on 2.12.0 with a parenthetical of 56.1 tok/s on 2.11.3, which is the pattern to expect when a release changes decode behaviour. The gap between the two rows is also explained by their conditions, since one is a short cached OpenCode turn at depth 3 and the other is a 65,502-token prompt read at 1,094 tok/s with the first token arriving after 60.1 seconds instead of 85.5.

One table, six releases, four models and one machine

Every number was measured on one machine, described as a MacBook Pro M5 Max with 128 GB, fans verified at maximum, sampled at the model's own settings, with conditions and raw logs on a separate benchmarks page. Within that single machine the table still spans six releases. The rows cite 2.12.0, 2.11.3, 2.11.2, 2.10.0, 2.7.0 and 2.2.0, across four models: Qwen 3.8 Flash Next appears four times, Qwen 3.8 27B twice, and Qwen 3.6 27B and Qwen 3.5 4B once each. The largest figure in the whole table, 227.8 tok/s, belongs to the 4B model on release 2.2.0 at MTP depth 3, described as 1.71x over 133.6 tok/s of plain decode. The Qwen 3.6 27B row is the one that carries a ratio and a receipt, 81.74 tok/s as 2.69x over 30.37 tok/s of plain decode, with a link to raw logs from 2 July 2026. Read as a set rather than a ranking, the table is a change log for the decoder with speeds attached, not a comparison between models.

The output equivalence check covers text, one release and one metric

The page argues that decoding is exact rather than approximated, and it is specific about what was compared. For 2.11.3, a thousand four-token samples from the fast path were compared with a thousand from the plain path at temperature 1, top-p 0.95 and top-k 20, matched by token id, and the measurements matched within the plain path's own noise on both Flash Next and the 27B Quality pack. Two limits sit next to that claim. The comparison is scoped to 2.11.3, and the page says numerical equivalence of the execution paths is checked separately. Then there is the sentence that matters most: from 2.12.0 image requests also use the compiled verifier, and that sampled comparison has not yet been repeated for images. So the current release runs vision through the same verified path that has never been sampled against the plain one. The acceptance rule is attributed to the Leviathan and Chen rejection sampling theorem, and the page also notes there is no second draft model occupying memory and no greedy shortcut.

The mlx dependency is pinned to a patch because output stops being identical

The dependency comment in the packaging file is the most revealing block in the repository, and it explains a pin that would otherwise look excessive. The floor was raised to 0.32 in 2.5.2 because fresh installs already resolved 0.32.0 while existing virtual environments sat on 0.31.2 forever, since the app bootstrapper's upgrade flag follows pip's only-if-needed strategy. The floor was raised again to 0.32.2 in 2.9.3 after a clean shipped-wheel A and B on an M5 Max measured 0.32.0 to 0.32.2 at 29 percent faster decode and 41 percent faster prefill at an 88.4k prompt, and 31 percent at 16k. Then, on 2026-09-29, it was pinned to exactly 0.32.2: 0.32.3 decodes at the same speed but its output is not bit-identical to 0.32.2 on Flash Next, so pip and Homebrew now install what the app bundles. A dependency patch release is allowed to change which tokens the model emits, and that is the stated reason for freezing it.

Pillow is a base dependency because a module imports it at load

Most of the dependency list is ordinary for a local inference server: fastapi at 0.136 or newer and huggingface-hub at 0.36 or newer, with a Python floor of 3.11 and a setuptools build backend requiring 69 or newer plus wheel. The entry with a story attached is Pillow, and the comment gives both the reason and the ticket number. Vision is advertised on the base install, through app attachments and image_url support on the server, and `mtplx.vision.processing` imports PIL at module load, so Pillow has to be a base dependency rather than something tucked into a server extra, cited as issue 103. That is a specific kind of coupling: an image library is pulled in by anyone who installs the package, because one module decides what it needs before any feature check runs. The metadata also declares both LICENSE and NOTICE as license files under Apache-2.0, and names a single author.

The recommended model depends on which chip generation you have

There is one recommendation policy for M3, M4 and M5 machines and a separate one for the oldest two. On M3 through M5 the ladder is: Qwen 3.5 4B Optimized Speed below 16 GB, Ternary Bonsai 2 27B from 16 GB, Qwen 3.8 27B Optimized Speed from 32 GB, and Qwen 3.8 Flash Next Optimized Speed from 256 GB, with Flash Next Optimized Quality placed second. M1 and M2 keep their FP16 recommendations, and installed models plus explicit selections stay available. Within the Flash Next family the thresholds are 96 GB for Bare Speed and 128 GB for Optimized Speed, and two builds, Ternary Bonsai 2 27B and Flash Next Optimized Quality, require 2.12.0 or later. The recommended build for coding is Qwen 3.8 27B Optimized Speed, a 4-bit dynamic quant, with Bare Speed described as the quickest burst chat speeds at lower quality and Optimized Quality as an 8-bit dynamic quant with the highest fidelity of the three.

The app installs fan control and its own Python engine

The recommended install path is a DMG, and what it does is worth reading before you run it. The app checks your hardware, recommends a model that actually fits your memory, downloads it, sets up its own Python engine so Homebrew is not needed, installs fan control, puts `mtplx` on your PATH, and then measures your machine to pick the fastest decoding depth. Six actions, two of which change machine configuration outside the application directory, and the measurement step is what justifies the fan control: the benchmark table was taken with fans verified at maximum. The command line path avoids all of it, being

bash
brew install youssofal/mtplx/mtplx
mtplx start

or `python3 -m pip install mtplx`, with a stated requirement of Apple Silicon from M1 and macOS 14 or newer. The examples folder then shows both client shapes, an OpenAI Python client, an Anthropic Python client, plain requests, curl against chat completions and curl against messages, which is what the compatibility claim in the description rests on. The root of the repository tells a similar story about process: release notes exist as files for the 0.2 series only, while the version is 2.12.2, and alongside INSTALL.md, TROUBLESHOOTING.md and HISTORY.md sit directories named `notes/`, `mistakes/`, `benchmarks/`, `native_extensions/`, `vllm_metal/` and one spelled `dist-pifix/`.

Editorial conclusion

MTPLX suits someone on Apple Silicon who wants a local model served over OpenAI and Anthropic shaped endpoints and is willing to hold an exact dependency pin to keep generated text stable. Before adopting it, read the benchmark table's parentheticals rather than its best row, because the fastest figure was measured on release 2.11.3, the table mixes versions from 2.2.0 upward, and the recommended model changes with the chip generation. Check the output equivalence claim for the modality you need, since the sampled comparison against the plain path was done for text on one release and has not been repeated for images. And decide whether the app installing fan control and its own Python engine on your machine is acceptable, because that is part of what the downloadable path does.

Frequently asked questions

What is Mtplx?

It is a native Mac app and command line that runs local language models on Apple Silicon using the model's own multi-token prediction heads for speculative decoding, with an OpenAI and Anthropic compatible local server. It is published under the Apache-2.0 license, the current version is 2.12.2, and it needs Python 3.11 or newer.

How do I install MTPLX?

With Homebrew, `brew install youssofal/mtplx/mtplx` then `mtplx start`, or with `python3 -m pip install mtplx`. The downloadable app instead downloads a model, sets up its own Python engine, installs fan control, puts `mtplx` on your PATH and measures the machine. Requirements are Apple Silicon from M1 and macOS 14 or newer.

Does MTPLX change what the model would have said?

The page says tokens are committed through exact rejection sampling with residual correction at the model's native temperature. For release 2.11.3 a thousand four-token samples from the fast path matched a thousand from the plain path by token id within the plain path's own noise. For image requests, which use the compiled verifier from 2.12.0, that comparison has not been repeated.

What are the Qwen 3.8 Flash Next builds?

There are three. Optimized Speed is dynamic 4-bit with the sparse-attention projections at 8-bit, a 115.1 GB download and about 83 GB resident. Bare Speed is flat 4-bit, 106.3 GB and about 74 GB resident. Optimized Quality is an 8-bit group-64 body and MTP head with BF16 structural tensors, a 169.96 GB download needing about 128.5 GiB, and it has not yet been run on a 256 GB Mac with its speed unmeasured.

What does it cost in memory to run Qwen 3.8 Flash Next?

The model carries a 51 billion parameter n-gram table that streams from SSD on every Mac, so only the weights stay resident. The context window is 262,144 tokens and prompts up to 261,120 tokens decode, and image input is supported. The optimized speed build needs about 83 GB resident and the bare speed build about 74 GB.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. youssofal/MTPLX on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/youssofal-mtplx.svg)](https://hysenlabs.com/projects/youssofal-mtplx)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/youssofal-mtplx.svg)](https://hysenlabs.com/projects/youssofal-mtplx)

Was this useful?