Inkling 2 Mini pi-adapted for Apple Silicon (MLX, LayerFit 4-bit)

harness-hub/Inkling-2-Mini-pi-adapted (revision 14b5b5a) is a LoRA adapter for thinkingmachines/Inkling-2-Mini, trained by Harness Hub with reinforcement learning (TRL's AsyncGRPO) to drive the pi coding agent at reasoning effort high. It solves more agentic coding tasks and gets there with about 40% fewer output tokens and a third fewer tool calls.

This repository has the adapter merged into the weights and converted to MLX, with Inkling's vision encoder and DSpark speculative-decoding draft (mtp.safetensors) included, so it runs on a Mac with no adapter loading.

It is our LayerFit™ build netprojects/Inkling-2-Mini-LayerFit-MLX-4bit with the adapter merged in: every tensor is byte-for-byte that build's, except the 96 attention projections the adapter changes, which were re-quantized from the exactly merged bf16 weights at the same bits that LayerFit chose for them. Size: 16.5 GB plus the 0.64 GB draft.

Builds

Build Size Your Mac Same next token as the 4/8-bit build KL vs the 4/8-bit build
netprojects/Inkling-2-Mini-pi-adapted-MLX-4-8bit 19.5 GB + 0.64 GB draft 64 GB and up reference (exact merge) –
netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit (this build) 16.5 GB + 0.64 GB draft 32 GB and up 99.2% 0.0013
netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-3bit 14.1 GB + 0.64 GB draft 32 GB 98.5% 0.0055
netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-2.5bit 10.8 GB + 0.64 GB draft 24 GB 97.4% 0.0200
netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-2bit 9.5 GB + 0.64 GB draft 24 GB 97.0% 0.0298

Closeness is measured on 12 texts (code, shell sessions, tool calls, prose in English, Greek and German; 256 tokens each), teacher-forced, KL over the reference's top 64 tokens.

LayerFit: same size, closer to the original

LayerFit is how NetProjects builds its small quants: it measures each part of each layer on its own, then searches for the recipe that stays closest to the original model at a fixed size, and spends the bits where they matter. The result is a normal MLX build that loads in stock MLX-VLM. Merging the adapter keeps that closeness:

Same texts Same next token KL
Inkling-2-Mini-LayerFit-MLX-4bit vs the stock 4/8-bit build 99.3% 0.0014
This build vs the pi-adapted 4/8-bit build 99.2% 0.0013

Harness Hub's results

From the adapter's card, measured with the bf16 model and the adapter served by vLLM (their harness and settings):

Benchmark (Harness Hub's figures: pi 1.7.0, reasoning high, vLLM, adapter vs base, paired) Inkling 2 Mini pi-adapted Difference
Terminal-Bench 2.1, avg@3, 1 h 44.2% 56.9% +12.7 ± 6.4
Terminal-Bench 2.1, pass@3, 1 h 56.2% 70.8% +14.6 ± 8.0
SWE-bench Pro (hard 51), 1 attempt, 2 h 66.7% 70.6% +3.9 ± 14.5
Output tokens on tasks both solve, Terminal-Bench 2.1 15.8k 9.8k −38%
Output tokens on tasks both solve, SWE-bench Pro 39.2k 23.6k −40%
Tool calls on tasks both solve, SWE-bench Pro 72 48 −33%

Harness Hub notes that the intervals are wide on these task counts and that the efficiency gains are the most consistent part.

Install

Inkling 2 Mini runs in MLX-VLM (from main). For OpenAI tool_calls from the server, use inkling2-mlx (MLX-VLM plus Inkling's tool-call parser):

pip install "git+https://github.com/internet-projects/inkling2-mlx@v0.2.8" torch torchvision

Use

OpenAI-compatible server with tool calls and the thinking returned separately:

mlx_vlm.server --model netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit --port 8000

Use with pi

Start the server, then point pi at it with the OpenAI chat-completions API (the adapter was trained and evaluated with openai-completions, not the Responses API). Keep the default reasoning effort high; the adapter was not trained for none.

{
  "providers": {
    "local": {
      "baseUrl": "http://localhost:8000/v1",
      "api": "openai-completions",
      "models": [{ "id": "netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit" }]
    }
  }
}

In Python:

from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template

model, processor = load("netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit")
prompt = apply_chat_template(processor, model.config, "Write a bash one-liner that counts lines in all .py files.")
print(generate(model, processor, prompt, max_tokens=4096).text)

With the DSpark draft: add --draft-model netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit --draft-kind dflash --draft-block-size 4 to the server (best on code edits and rewrites).

What was checked

On a MacBook Pro M5 Max (128 GB), 30 November 2026, with inkling2-mlx v0.2.8.

  • Re-quantization: only the 96 merged attention projections were re-quantized (96 at a8g64); every other tensor is byte-identical to the LayerFit build.
  • Tool calling: an agent prompt with tools produced a well-formed call, returned by the server as OpenAI tool_calls.
  • Coding: the short Python tasks passed their asserts. Vision: the test image was described correctly.
  • Memory: peak 23.1 GB with an 8K-token prompt.

License and credits

Apache-2.0, as Inkling 2 Mini and the adapter. Use of the model is also governed by Thinking Machines' Model Acceptable Use Policy. LICENSE is the Apache-2.0 text and NOTICE describes the merge and conversion. Inkling 2 Mini is by Thinking Machines Lab; the pi adapter is by Harness Hub; please cite their work.

Published by NetProjects (Internet Projects Ltd). LayerFit™ is a NetProjects trademark. Not affiliated with Thinking Machines or Hugging Face.

More MLX builds from NetProjects: huggingface.co/netprojects · netprojects.com

Downloads last month
195
Safetensors
Model size
26B params
Tensor type
U32
·
BF16
·
F32
·
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit

Collections including netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit