Instructions to use sermonis-ai/Inkling-2-Mini-oQ4e-mtp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use sermonis-ai/Inkling-2-Mini-oQ4e-mtp with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("sermonis-ai/Inkling-2-Mini-oQ4e-mtp") config = load_config("sermonis-ai/Inkling-2-Mini-oQ4e-mtp") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use sermonis-ai/Inkling-2-Mini-oQ4e-mtp with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "sermonis-ai/Inkling-2-Mini-oQ4e-mtp"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "sermonis-ai/Inkling-2-Mini-oQ4e-mtp" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use sermonis-ai/Inkling-2-Mini-oQ4e-mtp with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "sermonis-ai/Inkling-2-Mini-oQ4e-mtp"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default sermonis-ai/Inkling-2-Mini-oQ4e-mtp
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use sermonis-ai/Inkling-2-Mini-oQ4e-mtp with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "sermonis-ai/Inkling-2-Mini-oQ4e-mtp"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "sermonis-ai/Inkling-2-Mini-oQ4e-mtp" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Inkling-2-Mini-oQ4e-mtp
Mixed-precision MLX build of thinkingmachines/Inkling-2-Mini,
quantized with oMLX oQ4e. It includes the vision encoder and the upstream-trained
DSpark draft (mtp.safetensors), copied byte-identically from the release.
Minimum runtime: oMLX 0.8.3. On 0.8.2 the MTP path is not greedy-exact and FP16 activations return non-finite logits; both are fixed in 0.8.3 (#5531, #5523).
Summary
- 26.4B total / 3.4B active parameters, 24 stored layers with the middle 12 applied three times per token (48 layer applications), 128 routed experts (top-8), 1M-token context, natively multimodal.
- oQ4e mixed precision: 4.890 effective bits per weight, 16.212 GB of main shards and 0.636 GB of DSpark draft (16.847 GB total).
- Tested on oMLX 0.8.3 (Cellar
HEAD-1cd5aaa) with Python 3.11 on an Apple M2 Max (96 GiB).
Quantization
| Storage format | Logical weights | Share | Effective bits/weight |
|---|---|---|---|
| NVFP4, group 16 (experts, layers 0–19) | 20.384B | 77.25% | 4.50 |
| Affine 4-bit, group 64 (experts, layers 20–23) | 4.077B | 15.45% | 4.50 |
| Affine 8-bit, group 64 (attention projections, embed, head) | 1.572B | 5.96% | 8.50 |
| BF16 (vision encoder) | 0.320B | 1.21% | 16.00 |
| FP32 (router, loop controllers, attention-residual queries, NVFP4 scales) | 0.036B | 0.14% | 32.00 |
| Total | 26.389B | 100% | 4.890 |
Main checkpoint: 1,098 tensors — 780 BF16, 106 U32 (packed NVFP4), 172 F32, 40 U8. Encoder: 422 tensors, BF16, unquantized.
Quantizer arguments:
oq_level=4, group_size=64, text_only=False, preserve_mtp=True, enhanced=True,
imatrix_num_samples=128, imatrix_seq_length=512, dtype=bfloat16
DSpark MTP head
The release ships a trained 3-layer DSpark drafter in mtp.safetensors
(635,801,416 bytes, 54 tensors, block_size=8, markov_rank=256,
markov_head_type="rnn_hidden", context taps [5, 23, 41, 48]). It is copied
byte-identically (SHA-256 7c3b6513…) and is never quantized.
On oMLX 0.8.3 the drafter attaches as a DFlash-style block drafter and greedy output is token-identical to decoding without it — verified 5/5 prompts for adaptive depth 7, fixed depth 3, and under FP16 activations.
Measured on an M2 Max, 5 coding prompts × 512 tokens, greedy, decode-only:
| Arm | Decode tok/s | Prefill tok/s | Exactness |
|---|---|---|---|
| MTP off, BF16 activations | 34.80 | 78.6 | baseline |
| MTP adaptive depth 7, BF16 | 35.02 | 82.8 | 5/5 identical |
| MTP fixed depth 3, BF16 | 29.80 | 86.9 | 5/5 identical |
| MTP off, FP16 activations | 36.67 | 84.6 | baseline |
| MTP adaptive depth 7, FP16 | 31.78 | 76.6 | 5/5 identical |
Recommendation: mtp_enabled: false with activation_fp16_enabled: true —
the fastest measured configuration. MTP is exact on 0.8.3 but at parity with
no-spec on generation-heavy prompts; the copy-heavy path added in #5528 was not
exercised. If MTP is enabled, use the adaptive controller at the model-default
depth with BF16 activations: do not use fixed depth 3, and do not combine MTP
with FP16 activations (31.78 vs 35.02).
Measured tests
| ID | Test | Result |
|---|---|---|
| T1 | Download integrity | PASS — source shard SHA-256 verified; 1244 source tensors |
| T2 | Detection | PASS — inkling2_loop, 422 vision, 3 draft layers, block 8 |
| T3 | Size estimate | PASS — 16.14 GB, 4.890 bpw |
| T4 | Quantize | PASS — draft SHA-256 identical to source |
| T5 | Structure | PASS — 1,098 main tensors; 422 vision BF16; 101 quant modules; no embedded language_model.mtp.* |
| T6 | Patched load | PASS — 48 layer applications; vision 318,256,128 params; drafter block 8, depth 7, taps [5,23,41,48]; finite logits |
| T7 | Text smoke | PASS — coherent, EOS-terminated at greedy and shipping config |
| T8 | Tool call | PASS — get_weather({"city":"Paris"}) |
| T9 | Vision | PASS — reads the number 42 from a generated image |
| T10 | Repetition | PASS — max 20-gram repeat = 1 |
| T11 | MTP | PASS on 0.8.3 — exact 5/5; at parity with no-spec; ship with MTP off |
| T12 | PPL / KL | PASS — PPL Δ 0.93%, mean KL 0.00342 nats vs the source NVFP4 run (oMLX 0.8.3) |
| T13 | Reference diff | Structural match — 0 quantization-entry differences vs mlx-community/Inkling-2-Mini-oQ4e-mtp; text differs because the builds are independently calibrated |
Serving
omlx serve --model-dir <dir-containing-this-model>
Recommended per-model settings (oMLX 0.8.3 or later):
{
"mtp_enabled": false,
"activation_fp16_enabled": true,
"enable_thinking": false,
"temperature": 0.2,
"top_p": 0.95,
"top_k": 20
}
activation_fp16_enabled recasts the bf16 language leaves to float16 after load;
the vision tower stays BF16. To experiment with MTP, set mtp_enabled: true and
leave the depth at the model default (adaptive). The chat template always emits
a thinking-effort instruction; reasoning_effort: "off" or "none" yields a
short thinking span before the answer.
FP16 build
A standalone dtype="float16" oQ4e build was gated on oMLX 0.8.3: structure and
load pass, smoke passes, PPL Δ -0.18%, mean KL 0.00221, and MTP is exact 5/5.
However, its no-spec decode is 34.53 tok/s versus 36.67 for this BF16 build with
activation_fp16_enabled: true, and MTP on the FP16 build is 30.53 tok/s. It is
therefore not published; use this build with FP16 activations enabled.
Caveats
- The 1M-token context is nominal; KV memory grows with context and with the 48 loop applications.
- Vision is BF16 here; the FP16 activation recast applies to language leaves.
- Quality figures come from four held-out snippets; they are a guardrail, not a benchmark suite.
- MTP throughput is at parity on generation-heavy prompts; copy-heavy workloads may differ.
Attribution
- Thinking Machines Lab for Inkling-2-Mini and the trained DSpark drafter.
- jundot / oMLX for the Inkling-2 MLX runtime, the oQ quantizer, and the DSpark integration, including the 0.8.3 exactness and FP16 fixes.
- Apple MLX, mlx-lm and mlx-vlm.
- Hugging Face for model hosting and tooling.
- oMLX's oQe calibration profile for the imatrix statistics.
This conversion is not affiliated with or endorsed by Thinking Machines Lab.
- Downloads last month
- 171
4-bit
Model tree for sermonis-ai/Inkling-2-Mini-oQ4e-mtp
Base model
thinkingmachines/Inkling-2-Mini