Inkling on Mac
I ported Inkling 2 Mini to my Mac and published two builds. The port is correct. On the same prompts it is about 3× slower to answer than Flash, the local model I use now, and it is weaker at tool use: 31 of 97 on ToolAlpaca against 41 of 97. Quality is otherwise about even.
Everything here ran on an Apple M3 Max, 128 GB MacBook Pro. The model is thinkingmachines/Inkling-2-Mini, Apache-2.0, and the credit for it belongs to its authors. My two builds are unofficial conversions:
- Inkling-2-Mini-MLX-4bit, 15,423,640,827 B (14.36 GiB) for the whole repo.
- Inkling-2-Mini-IQ4_NL-GGUF, 15,113,866,427 B (14.08 GiB), of which the GGUF file is 15,113,858,496 B.
The patches behind my speed numbers are not in either repo. That covers the compiled decode and the Inkling tool-call parser. My speculative-decoding script is also local. The MLX repo loads in an unpatched checkout of mlx-lm pull request #2086 (tree 0c4c991), and it runs slower there. One short unpatched run gave 37.0 tok/s, and a rerun gave 30.5. Those are two single runs and I would not call either a benchmark. The change log at the end lists the main attempts, including the ones that failed.
Is the port right?
I checked it three ways: against an independent implementation, against my own native-precision MLX build, and against llama.cpp. The independent implementation is the nativ-community mlx-vlm patch, loaded on the same official weights.
My native MLX build against mlx-vlm: mean last-position KL 0.00094 over 8 prompts, top-1 agreement 7 of 8 at the last position and 120 of 124 across all positions, and perplexity 6.8922 against 6.8890 (6.8922 / 6.8890 = 1.0005). The one last-position miss is a near tie, 0.05 apart in log probability.
The 4-bit build has a perplexity of 7.0230, which is 1.019× native (7.0230 / 6.8922). Its last-position KL against native is 0.01736, with top-1 at 8 of 8 and 116 of 124.
llama.cpp is a third implementation with its own loop graph. My IQ4_NL GGUF gets perplexity 6.9611 (6.9611 / 6.8922 = 1.010× native). Its KL against MLX native is 0.00770, with top-1 at 7 of 8 and 117 of 124. That KL is smaller than the gap between my own 4-bit and native. A wrong loop lands far away: two passes give a perplexity of 12.12.
The native perplexity runs used a native conversion that I deleted later. The official weights give the same logits as that copy (KL 0.0000).
How fast is it?
Speeds come from the Flint same-prompt harness (mlx_lm.benchmark, seeded random ids, 128 generated tokens, 1 warmup and 5 trials, mean ± sample sd). I used the same harness in Flint on an M3 Max.
After my compiled-decode patch, the 4-bit build decodes at 45.60 ± 0.15 tok/s at 4096 tokens of context and 47.60 ± 0.41 at zero. Native precision decodes at 36.36 ± 0.62 at 4096. Peak memory at 4096 is 20.18 GB for 4-bit and 24.34 GB for native. Prefill at 4096 is 752.5 ± 57.5 tok/s for 4-bit. That prefill figure was measured before the patch, and I kept it in the table because the patch did not touch the prefill path.
The IQ4_NL GGUF on llama.cpp is slower: llama-bench gives 318.25 ± 35.89 prefill and 29.30 ± 0.18 decode. MLX 4-bit decode is 45.60 / 29.30 = 1.56× that, and its prefill is 752.5 / 318.25 = 2.36×. The prefill ratio mixes a pre-patch MLX figure with a post-patch decode figure and has an sd of about 11%, so treat it as rough.
Turning the loop count down does not work
The model loops its middle layers three times. Two passes give 1.39× the decode speed and one pass gives 2.06×, but perplexity goes from 6.89 to 12.12 (×1.76) at two passes and to 16.10 (×2.34) at one. The model was trained at 3 passes only. These are native-build numbers from before my compiled-decode patch. The 4-bit build gives 1.373× and 2.360×.
Against Flash, on the same prompts
I ran both models on the same Mac, the same day, with the same client, each served directly. Inkling is the 4-bit build at reasoning_effort "low". Flash has thinking off. Inkling reasons before every answer, even at "none".
Flash ran with MTP and PLD speculative decoding and a 4-bit KV cache. Inkling ran plain decode. So the speed rows compare a model with speculative decoding against one without.
- Brain set: both passed 9 of 12. The warm median answer took 1.92 s for Inkling and 0.64 s for Flash (1.92 / 0.64 = 3.0×). On "What is 17*23?" it was 1.10 s against 0.10 s. That is 11×, and I keep it apart from the 3.0× median. Client-side decode was 42.0 against 54.4 tok/s.
- ToolAlpaca: 31 of 97 against 41 of 97. Other Inkling arms in the same run scored 32 (4-bit, effort "none"), 36 (native, "none") and 34 (native, "low").
- Categorize, 92 transactions: Inkling 76.5 (runs of 79 and 74) against Flash 74.5 (runs of 74 and 75). The source reports overlapping 95% confidence intervals and a gap that is not significant. Inkling needed
max_tokens4000 and Flash ran at 1000, so this row is not token for token like-for-like. I do not lead with the best single Inkling arm. It is the best of the arms I ran against one Flash configuration. The mean over all 8 arms I ran is 77.1 and over the 4-bit arms is 76.0, and both mix builds or efforts.
Some Inkling decode runs sat at about 19 tok/s while other jobs shared the GPU. I report the clean 42.0 and treat the slow runs as noise. That choice is mine.
Speculative decoding for Inkling
The model ships a draft head. I wrote a script that uses it (DSpark, k=3). On a quiet machine my script's sequential k=3 bench ran at 63.45 tok/s, against 48.0 tok/s for plain decode from the mlx_lm.benchmark harness, 1.32×. Paired runs gave a clean mean of 1.36×, and noisy runs gave 1.12× to 1.25×. It is not in mlx_lm.server, so server and app latency in this post is plain decode. The exact-verify mode matched plain greedy decoding on 19 of 19 prompts. The fast block-verify mode matched on 4 of 19 (native, k=3) and 6 of 19 (4-bit, k=7), and every difference sat at a bf16 near-tie. The machine drifted during these runs, which is why I compare paired, interleaved runs. I wrote about that in Interleave your benchmark runs on a Mac. The general limit of this trick is in Speculative decode doesn't multiply GPUs.
What I'd tell you
If you want Inkling on a Mac, the MLX 4-bit build is the one I would use, and it needs mlx-lm pull request #2086. Do not expect Flash speed. Do not turn the loop count down for speed either, because the model was trained at 3 passes. I did not test the vision path, and I tested no context beyond 4096 tokens. I have no 8-bit build.
A different 4-bit conversion exists as mlx-community/Inkling-2-Mini-4bit (about 17.3 GB, a different recipe). I did not compare against it.
Change log
- Hardware: Apple M3 Max, 128 GB MacBook Pro.
- Model: thinkingmachines/Inkling-2-Mini (Apache-2.0). MLX path: mlx-lm pull request #2086 (tree
0c4c991) plus local patches, mlx 0.32.4. llama.cpp46eb174(PR #32694 merged). Builds: MLX 4-bit (affine, group size 64, 4.668 bits per weight), MLX native precision, and an IQ4_NL GGUF. - Prompts: wikitext-2 perplexity over 65,504 scored tokens (32 windows of 2048). Speed: seeded random token ids through
mlx_lm.benchmark. App comparison: brain set (12 items), ToolAlpaca (97 items), and 92-transaction categorize. I did not record prompt text for these sets in my notes. - Settings: 3 loop passes unless stated. Speed runs use 128 generated tokens, 1 warmup and 5 trials. App evals ran at temperature 0 for brain, probe and ToolAlpaca, and 0.1 for categorize. Flash with thinking off against Inkling at
reasoning_effort"low" (the other efforts are noted where they matter).
Problem: Decode is slower than I want
Change: Fewer loop passes (the loop dial)
- Status: failed
- Rationale: The model loops its core layers, so running 2 or 1 passes instead of 3 should cut layer applications and raise decode speed. I wanted to know the quality cost.
- Predicted: Decode roughly linear in layer applications (48, 36, 24), about 31, 43 and 70 tok/s for native from an earlier single-run smoke test.
- Observed: Native decode at 4096: 30.51 (3 passes), 42.34 (2 passes, 42.34 / 30.51 = 1.388×) and 62.97 (1 pass, 62.97 / 30.51 = 2.064×). Perplexity: 6.89 at 3 passes, 12.12 at 2 passes (×1.76) and 16.10 at 1 pass (×2.34). The model was trained at 3 passes only, so the dial is not usable. A real dial would need the research checkpoint with variable loops, which I have not downloaded. These ratios are before the compiled-decode patch.
Change: Compiled per-layer decode segments and a shared decode mask
- Status: kept
- Rationale: Decode is bound by the number of dependent GPU kernels, so I compiled the elementwise chains of each layer visit with
mx.compileand computed the decode mask once per step. - Predicted: 10-25% from fewer kernels.
- Observed: Native decode at 4096 went from 30.51 to 36.36 tok/s (1.192×). The 4-bit build went from 36.25 to 45.60 (1.258×). Logits were bit-identical to the original code (max absolute difference 0.0 over 4 prompts and 24 greedy steps), and perplexity stayed at 6.8922 for native and 7.0230 for 4-bit.
Change: Batched q/k/v message gates
- Status: reverted
- Rationale: Profiling put the message gates at about 13 ms of 26 ms per token, so I stacked the q, k and v gate weights into one chain.
- Predicted: 3 ms per token faster.
- Observed: Logits were bit-identical but speed did not move: 34.87 against 34.60 tok/s and 34.50 against 35.03 over 5 trials each, max tok/s (0.99× and 1.02×). MLX already overlapped the three gates, and the cost is the length of the dependent kernel chain. Removed.
Change: Depthwise short convolution as a fused multiply-sum
- Status: reverted
- Rationale: Replace the depthwise Conv1d at decode length 1 with a multiply and sum.
- Predicted: No prediction was logged.
- Observed: 36.98 and 37.87 tok/s with the conv against 36.81 and 37.11 with the change (6 trials, max tok/s; about 0.99×). No gain, reverted.
Change: MLX environment knobs
- Status: inconclusive
- Rationale: Try
MAX_OPS_PER_BUFFER,METAL_FAST_SYNCHandBFS_MAX_WIDTHas cheap speed levers. - Predicted: No prediction was logged.
- Observed: Best against base (decode 512/64, 4 trials, max tok/s; base runs 35.38, 37.47, 37.84) was 38.11 / 37.6 = 1.01×, inside the noise of about ±1.2 tok/s. One setting made it worse (
BFS_MAX_WIDTH1: 33.84). Nothing set.
Change: DSpark speculative decoding with the shipped draft head (k=3)
- Status: kept
- Rationale: The model ships a draft head, so speculative decoding could raise decode speed without a second model.
- Predicted: 3-4 accepted tokens per step, 1.5-2× speedup, token-identical output.
- Observed: On a quiet machine, 63.45 tok/s is my script's sequential k=3 bench and 48.0 tok/s is plain decode from the
mlx_lm.benchmarkharness, 1.32× (paired clean mean 1.36×, noisy runs 1.12-1.25×). Mean accepted tokens per step were 2.73 (native, k=3, before the small-S compile). Exact-verify output matched plain greedy on 19 of 19 prompts, fast block-verify on 4 of 19 (native, k=3) and 6 of 19 (4-bit, k=7). Kept as a script (spec_generate.pyin my tree). It is not inmlx_lm.serverand not in the Hub repos. Do not use that script's plain-only path as a baseline: it gave 34 tok/s against 48 for the same model elsewhere, and I never found the cause.
Problem: I needed an 8-bit or GGUF reference
Change: Q8_0 GGUF conversion from the official weights
- Status: failed
- Rationale: llama.cpp needs a GGUF as an independent reference for the port, and Q8_0 was the first target.
- Predicted: No prediction was logged for the disk use.
- Observed: I started the conversion on 2026-11-20 and killed it at 10:40 PM PT. A 27.8 GB Q8_0 would have left about 8 GB free, under my 30 GB floor. My disk check read 70 GiB free, but it went stale while the MLX builds were writing, and the real figure was 36 GiB by 10:40 PM. The expert dequantization also ran at about 7 MB/s of writes. The partial file (about 1.5 GB) was deleted later on my OK. There is no 8-bit build.
Change: IQ4_NL GGUF, built straight from the official weights
- Status: kept
- Rationale: IQ4_NL fits the disk budget. The converter dequantizes each expert tensor and streams it into the real ggml quantizer, so there is no Q8_0 or BF16 intermediate file.
- Predicted: A file of about 15-16 GiB, close to the 17.6 GB ggml-org file.
- Observed: 15,113,858,496 B (14.08 GiB), under the prediction. Perplexity 6.9611 against 6.8922 for native (1.010×), last-position KL 0.00770, per-position top-1 117 of 124. Decode 29.30 tok/s on llama-bench. The gap to the ggml-org file is unverified. I used no imatrix.
Tags: MLX macOS Local inference Benchmarks Quantization Evaluation Tool use Speculative decoding