Instructions to use netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit 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("netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit") config = load_config("netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit") # 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 netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit"
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": "netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit 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 "netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit"
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 netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit"
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 "netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit" \ --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 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
4-bit
Model tree for netprojects/Inkling-2-Mini-pi-adapted-LayerFit-MLX-4bit
Base model
thinkingmachines/Inkling-2-Mini