--- license: apache-2.0 base_model: thinkingmachines/Inkling-2-Mini base_model_relation: quantized library_name: mlx pipeline_tag: image-text-to-text tags: - mlx - mtplx - inkling - inkling2 - moe - looped-transformer - vision - quantized - mixed-precision - gptq - 3-bit - speculative-decoding - mtp - dspark --- # Inkling-2-Mini-MTPLX-3bit MTPLX 3-bit pack of **[thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini)** with the model's own **DSpark draft head** included — for speculative decoding on Apple Silicon via [MTPLX](https://github.com/youssofal/mtplx) 2.13 or later. Sibling: [barozp/Inkling-2-Mini-MLX-3bit](https://huggingface.co/barozp/Inkling-2-Mini-MLX-3bit) — the same quantized weights for plain mlx-lm (no draft head). The quantized weights are the GPTQ codes of the MLX-3bit release carried over bit for bit — no dequantize-requantize step between the two repos. The one difference: the 32 attention-sink and short-conv weight projections, 8-bit in the MLX release, come straight from the source in BF16 here. ## Why this release exists Inkling 2 Mini ships with DSpark, a 3-layer block drafter (`mtp.safetensors`, 0.64 GB) that proposes up to seven tokens which the full model checks in one pass, so the output keeps the model's own distribution. MTPLX 2.13 runs it on Apple Silicon, but its official packs start at 16.0 GB. This pack puts the draft head next to our mixed 3-bit trunk: **15.24 GB on disk**, below the 16.0 GB Bare Speed pack, with attention kept at 8 bits — sized for 24 GB unified-memory Macs. ## Speed on Apple Silicon Apple M5 Pro, 24 GB unified memory, macOS 27.2.1, other apps closed; MTPLX 2.13.0 with its default `serve` profile and 512-token prefill chunks, greedy decoding, DSpark depth 3, 256 new tokens per prompt, prompt-copy drafting off. AR is the same pack with drafting off. | Prompt | AR tok/s | DSpark tok/s | vs AR | Tokens per verify round | Drafts accepted | |---|---:|---:|---:|---:|---:| | Python function (code) | 25.3 | **47.6** | 1.88x | 3.31 | 178/230 | | Why the sky is blue (explanation) | 25.7 | 34.6 | 1.35x | 2.37 | 148/323 | | Turkish question | 25.8 | 30.6 | 1.19x | 2.10 | 134/365 | | JavaScript tips (list) | 25.4 | 33.2 | 1.31x | 2.31 | 145/330 | | **mean** | **25.6** | **36.5** | **1.43x** | **2.52** | **605/1248 (48.5%)** | Peak memory 17.1 GB on these prompts and 18.1 GB with a 3,779-token prompt (prompt + 64 new tokens in 20.4 s). The pack loads in about 50 s. Against the [MLX-3bit](https://huggingface.co/barozp/Inkling-2-Mini-MLX-3bit) sibling in mlx-lm on the same Mac (38.2 tok/s on the same prompts, prefill 956 tok/s): MTPLX's one-token path is slower on this 3-bit pack (25.6 tok/s), DSpark beats mlx-lm by 25% on code and comes close on general chat. Prefill is several times slower: the 3,779-token prompt plus 64 tokens took 20.4 s here against about 6 s in mlx-lm. **24 GB Macs:** serve with `--prefill-chunk-tokens 512`. If you call MTPLX's runtime from Python without the `serve` profile, the whole prompt is prefilled in one pass: a 3,779-token prompt then peaked at 24.5 GB and swapped. ## Draft head acceptance on CUDA Measured before the Mac run through MTPLX 2.13's portable MLX path on a CUDA GPU (Google Colab A100 80GB): greedy decoding, depth 3, 200 new tokens per prompt, prompt-copy drafting off. Depth 0 is plain AR on the same path. | Prompt | AR tok/s | D3 tok/s | vs AR | Tokens per verify round | Drafts accepted | |---|---:|---:|---:|---:|---:| | Python function (code) | 3.30 | 5.11 | 1.55x | 3.03 | 134/197 | | Why the sky is blue (explanation) | 3.35 | 5.60 | 1.67x | 2.63 | 124/228 | | Turkish question | 3.41 | 4.76 | 1.40x | 2.12 | 105/280 | | JavaScript tips (list) | 3.35 | 4.83 | 1.44x | 2.15 | 107/276 | | **mean** | **3.35** | **5.08** | **1.51x** | **2.48** | **470/981 (47.9%)** | Same harness on the official source weights: **2.29** tokens per verify round (441/1066 drafts accepted, 41.4%) — the 3-bit trunk keeps the draft head's acceptance intact. The portable path runs without MTPLX's Metal kernels, so the CUDA tok/s say nothing about a Mac; tokens per verify round carried over almost exactly (2.48 on CUDA, 2.52 on the M5 Pro). ## Quality benchmarks Measured on the [MLX-3bit](https://huggingface.co/barozp/Inkling-2-Mini-MLX-3bit) sibling, which carries the same quantized codes. `lm-evaluation-harness` 0.4.13 task definitions, 0-shot, loglikelihood (multiple-choice), chat template OFF; same questions for every model, so the **delta column is the meaningful signal**. Speculative decoding does not change the output distribution, so the draft head has no effect on these numbers. | Task | Metric | Source (20 GB) | this trunk | Delta | ± stderr | |---|---|---:|---:|---:|---:| | mmlu (2,847 q) | acc | 0.7954 | 0.7940 | -0.0014 | 0.0072 | | arc_challenge (1,172 q) | acc_norm | 0.6971 | 0.6911 | -0.0060 | 0.0135 | | winogrande (1,267 q) | acc | 0.7253 | 0.7245 | -0.0008 | 0.0126 | | hellaswag (1,000 q) | acc_norm | 0.6620 | 0.6560 | -0.0060 | 0.0150 | | **average** | | **0.7200** | **0.7164** | **-0.0036** | | Fidelity vs the source (teacher forcing, mlx-lm): KL divergence 0.0125 on raw text and 0.0729 on chat-template conversations, top-1 agreement 96.36% / 91.17%, needle retrieval 3/3 at 7,931 and 31,543 tokens. ## Available Inkling 2 Mini builds | Repo | Format | Size (on disk) | Use case | |---|---|---:|---| | **this repo** | MTPLX pack + DSpark | 15.24 GB | speculative decoding, 24 GB Macs | | [barozp/Inkling-2-Mini-MLX-3bit](https://huggingface.co/barozp/Inkling-2-Mini-MLX-3bit) | MLX (mlx-lm PR #2086) | 14.65 GB | plain mlx-lm, no draft | **Which one to pick:** - Code-heavy work, MTPLX user → **this repo** (47.6 tok/s on code on an M5 Pro, ~2.5 tokens per verify round) - General chat, long prompts, mlx-lm / your own MLX code → MLX-3bit (38.2 tok/s, prefill 956 tok/s) - Want the refusal-removed variant → [Uncensored-MTPLX-3bit](https://huggingface.co/barozp/Inkling-2-Mini-Uncensored-MTPLX-3bit) ## Pack contents | Part | Format | |---|---| | Expert gate/up projections, layers 0-5 and 18-23 | 3-bit, group 64, GPTQ act-order | | Expert gate/up projections, loop core 6-17 | 4-bit, group 128, GPTQ act-order | | Expert down projections, layers 0-19 | original NVFP4, byte for byte | | Expert down projections, layers 20-23 | 4-bit, group 64, GPTQ | | Attention projections (q, k, v, r, gate, o) | 8-bit, group 64 | | Attention sink and short-conv weight projections | source BF16 | | Token embedding / output head | 5-bit / 6-bit, group 64 | | Vision tower (422 tensors), routers, loop controllers, norms | source precision | | `mtp.safetensors` — DSpark draft head, 54 tensors | BF16, byte-identical to the source | ## Conversion notes - **Source:** `thinkingmachines/Inkling-2-Mini` @ `ed40e7da625f`; trunk codes from [barozp/Inkling-2-Mini-MLX-3bit](https://huggingface.co/barozp/Inkling-2-Mini-MLX-3bit) - **Layout:** MTPLX 2.13 Inkling pack — original checkpoint tensor names, MLX affine codes with `.mtplx_scales` / `.mtplx_biases`, per-matrix bits in `config.json` → `mtplx_inkling_precision` (174 matrices); `hf_quant_config.json` from the source sets the experts' trained activation formats - **Draft head:** `mtp.safetensors` copied unchanged, sha256 `7c3b6513…a1d2` (the hash MTPLX 2.13 pins for the official drafter) - **Output:** 3 safetensors shards (14.58 GB) + `mtp.safetensors` (0.64 GB) + tokenizer, chat template, processor config, `mtplx-pack.json` - **Verified:** loads with MTPLX 2.13's Inkling loader with drafting on; generation, short answer checks and acceptance checked on an Apple M5 Pro and on CUDA (tables above) - **Kernels:** the 3-bit affine experts run on MLX's quantized gather kernels; MTPLX's fused expert kernels target the native NVFP4/MXFP8 layout - **Built:** 22 November 2026, Google Colab A100 80GB ## Vision The full vision tower is inside the pack (422 BF16 tensors), and MTPLX 2.13 reads images for Inkling 2 Mini. Image input was not part of the tests above. ## MTPLX usage Keep the pack in a folder of its own name: ```bash # install (2.13 or later) pip install -U mtplx # download the pack hf download barozp/Inkling-2-Mini-MTPLX-3bit \ --local-dir ~/.mtplx/models/barozp-Inkling-2-Mini-MTPLX-3bit # OpenAI-compatible local server (depth is chosen automatically each round) # --prefill-chunk-tokens 512 keeps long prompts inside a 24 GB Mac's memory mtplx serve --model ~/.mtplx/models/barozp-Inkling-2-Mini-MTPLX-3bit \ --prefill-chunk-tokens 512 # then: curl http://localhost:/v1/chat/completions ... # plain one-token-at-a-time baseline mtplx serve --model ~/.mtplx/models/barozp-Inkling-2-Mini-MTPLX-3bit --no-mtp ``` MTPLX runs Inkling 2 Mini at temperature 1.0 over its whole distribution, as the model's generation settings say; a client that sends its own sampler keeps it. ## About the source model Inkling 2 Mini (Thinking Machines Lab, 20 November 2026, Apache 2.0): 26.4B total / 3.4B active parameters, 128 routed experts with top-8 routing, 24 layers of which 6-17 form a loop run three times per token, sliding-window and global attention, native image input, context up to 1M tokens per its model card. Experts ship as NVFP4 (layers 0-19) and MXFP8 (layers 20-23). ## Source chain [thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini) (official release + DSpark drafter) → [barozp/Inkling-2-Mini-MLX-3bit](https://huggingface.co/barozp/Inkling-2-Mini-MLX-3bit) (MLX mixed 3-bit, GPTQ) → **this repo** (MTPLX pack + DSpark draft head) Related repos: - [barozp/Inkling-2-Mini-MLX-3bit](https://huggingface.co/barozp/Inkling-2-Mini-MLX-3bit) — same weights, plain MLX - [barozp/Inkling-2-Mini-Uncensored-MTPLX-3bit](https://huggingface.co/barozp/Inkling-2-Mini-Uncensored-MTPLX-3bit) — uncensored, MTPLX + DSpark - [barozp/Inkling-2-Mini-Uncensored-MLX-3bit](https://huggingface.co/barozp/Inkling-2-Mini-Uncensored-MLX-3bit) — uncensored, MLX 3-bit