Instructions to use barozp/Inkling-2-Mini-MLX-3bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use barozp/Inkling-2-Mini-MLX-3bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("barozp/Inkling-2-Mini-MLX-3bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use barozp/Inkling-2-Mini-MLX-3bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "barozp/Inkling-2-Mini-MLX-3bit"
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": "barozp/Inkling-2-Mini-MLX-3bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use barozp/Inkling-2-Mini-MLX-3bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "barozp/Inkling-2-Mini-MLX-3bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "barozp/Inkling-2-Mini-MLX-3bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "barozp/Inkling-2-Mini-MLX-3bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use barozp/Inkling-2-Mini-MLX-3bit 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 "barozp/Inkling-2-Mini-MLX-3bit"
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 barozp/Inkling-2-Mini-MLX-3bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use barozp/Inkling-2-Mini-MLX-3bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "barozp/Inkling-2-Mini-MLX-3bit"
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 "barozp/Inkling-2-Mini-MLX-3bit" \ --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-MLX-3bit
MLX mixed-precision 3-bit conversion of thinkingmachines/Inkling-2-Mini — Thinking Machines Lab's open-weights MoE for coding, agents and images — for Apple Silicon. Sibling formats:
- MTPLX pack with the DSpark draft head (speculative decoding): barozp/Inkling-2-Mini-MTPLX-3bit
- uncensored build, same recipe: barozp/Inkling-2-Mini-Uncensored-MLX-3bit
Converted straight from the official checkpoint as shipped (NVFP4/MXFP8 experts, BF16 elsewhere) — no BF16 copy on disk, no GGUF in the chain.
Why this release exists
Inkling 2 Mini ships already compressed: its routed experts (77% of the weights) are NVFP4 in layers 0-19 and MXFP8 in layers 20-23, ~20 GB in total. The existing 4-bit MLX builds leave those experts untouched and shrink only attention, embedding and head — which lands at 16-17 GB and leaves little room for context on a 24 GB Mac.
Going to 3 bits means re-quantizing the experts themselves, and a plain --q-bits 3 hurts this model: in our runs mlx-lm's stock mixed_3_4 recipe reached a KL divergence of 0.065 against the source. This release is the winner of a recipe search built around the model's structure:
- the 12 loop-core layers (6-17) run three times per token, so their errors count three times — their expert gate/up projections get 4 bits
- expert down projections in layers 0-19 stay in the original NVFP4, byte for byte — zero added error
- attention stays at 8 bits; embedding 5-bit, output head 6-bit
- every ≤4-bit expert matrix is quantized with GPTQ + act-order on a chat / code / Turkish / general calibration mix
Result: 14.65 GB, statistically tied with the 20 GB source on standard benchmarks.
Quality benchmarks
Measured with lm-evaluation-harness 0.4.13 task definitions: 0-shot, loglikelihood (multiple-choice), chat template OFF. MMLU first 50 questions per subject (2,847), ARC-Challenge full (1,172), Winogrande full (1,267), HellaSwag first 1,000. Every model sees exactly the same questions, so the delta column is the meaningful signal.
| Task | Metric | Source (20 GB) | this repo (14.65 GB) | Delta | ± stderr |
|---|---|---|---|---|---|
| mmlu | acc | 0.7954 | 0.7940 | -0.0014 | 0.0072 |
| arc_challenge | acc_norm | 0.6971 | 0.6911 | -0.0060 | 0.0135 |
| winogrande | acc | 0.7253 | 0.7245 | -0.0008 | 0.0126 |
| hellaswag | acc_norm | 0.6620 | 0.6560 | -0.0060 | 0.0150 |
| average | 0.7200 | 0.7164 | -0.0036 |
Every delta sits inside one standard error. Same protocol, for context: mlx-community/Inkling-2-Mini-4bit (17.3 GB) scored 0.7905 / 0.6937 / 0.7143 / 0.6560, average 0.7136 — this 3-bit build is 2.65 GB smaller and on par.
Fidelity vs the source
Teacher forcing: the same tokens through both models, KL divergence of the next-token distributions (reference = the official checkpoint as shipped). 24,576 raw-text tokens (wikitext-2 + Python) and 12 chat-template conversations (UltraChat test_gen, 12,288 tokens).
| Metric | Value |
|---|---|
| Mean KL divergence, raw text (prose + code) | 0.0125 |
| Mean KL divergence, chat-template conversations | 0.0729 |
| Top-1 agreement, raw text / chat | 96.36% / 91.17% |
| Perplexity, source / this repo | 3.595 / 3.623 |
| Needle retrieval, 7,931-token prompt | 3/3 |
| Needle retrieval, 31,543-token prompt | 3/3 |
How the recipe was picked (raw-text KLD on the same 24K tokens, lower is better):
| Recipe | Size | KLD raw | KLD chat |
|---|---|---|---|
| loopmix2 (no GPTQ) | 13.89 GB | 0.0211 | — |
| loopmix2 + GPTQ | 13.89 GB | 0.0165 | 0.0942 |
| loopmix3 + GPTQ act-order, chat/code/TR calibration | 13.89 GB | 0.0167 | 0.0929 |
| loopmix3c + GPTQ (this repo) | 14.65 GB | 0.0125 | 0.0729 |
Speed on Apple Silicon
Apple M5 Pro, 24 GB unified memory, macOS 27.2.1, other apps closed; mlx 0.32.4 + mlx-lm PR #2086, greedy decoding, --prefill-step-size 512.
| Prompt | Prompt tokens | New tokens | Generation tok/s |
|---|---|---|---|
| Python function (code) | 37 | 256 | 37.8 |
| Why the sky is blue (explanation) | 25 | 256 | 38.3 |
| Turkish question | 39 | 256 | 38.4 |
| JavaScript tips (list) | 29 | 256 | 38.4 |
| mean | 38.2 | ||
| Long prompt — prefill 956 tok/s | 3,779 | 64 | 36.5 |
Loads in 4 s; 14.6 GB after load, 14.8 GB peak on short prompts, 16.6 GB with the 3,779-token prompt. On 24 GB Macs keep --prefill-step-size 512: with mlx-lm's default of 2048 the same prompt ran out of Metal memory in our test.
Recipe
| 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, untouched |
| Expert down projections, layers 20-23 | 4-bit, group 64, GPTQ |
| Attention projections (q, k, v, r, gate, o, sink) and short-conv projections | 8-bit, group 64 |
| Token embedding / output head | 5-bit / 6-bit, group 64 |
| Vision tower, routers, loop controllers, norms | source precision |
Average 4.26 bits per quantized weight.
Conversion notes
- Source:
thinkingmachines/Inkling-2-Mini@ed40e7da625f, loaded as shipped; experts dequantized one at a time in memory, never written as BF16 - GPTQ: 28 expert matrices, act-order with static groups, damp 0.01, 256 × 2048 calibration tokens — UltraChat chat-template 50%, Python stdlib 20%, Turkish Wikipedia 15%, mlx-lm calibration_v5 15%; experts in a layer share one Hessian
- Tooling:
mlx0.32.4 (cuda12) ·mlx-lmfrom ml-explore/mlx-lm#2086 @0c4c9919·lm-eval0.4.13 - Environment: Google Colab A100 80GB, MLX CUDA backend, 22 November 2026
- Output: 3 safetensors shards, vision tower inside the weights, tokenizer + chat template + processor config
Quick start
Inkling 2 Mini support in mlx-lm is not merged yet — install the PR branch:
# install (mlx-lm with Inkling 2 support, PR #2086)
pip install -U 'mlx-lm @ git+https://github.com/jundot/mlx-lm.git@0c4c99192230f1943dd468d297f0b8a64ae7b7c2'
# text-only chat
python -m mlx_lm.generate \
--model barozp/Inkling-2-Mini-MLX-3bit \
--prompt "Explain the Monty Hall problem briefly." \
--max-tokens 512 \
--prefill-step-size 512
# OpenAI-compatible local server
python -m mlx_lm.server \
--model barozp/Inkling-2-Mini-MLX-3bit \
--prefill-step-size 512
At 14.65 GB it fits 24 GB unified-memory Macs with room left for context; --prefill-step-size 512 keeps long-prompt prefill inside that budget. mlx-lm's PR kernels are Metal-only, so run it on Apple Silicon for speed.
Where it runs
Checked on 23 November 2026. Inkling 2 Mini support is not in a mlx-lm release yet, and the apps that already run Inkling ship their own model code with their own weight layout:
| Runtime | Loads this repo | Notes |
|---|---|---|
mlx-lm with PR #2086 (generate, chat, server) |
yes | every number on this card was measured here |
| LM Studio, MLX runtime 1.14.0 | no | Model type inkling2_loop not supported |
| oMLX 0.8.3 | no | expects its own Inkling 2 layout; use an oQ pack such as mlx-community/Inkling-2-Mini-oQ3e-mtp |
| MTPLX 2.13 | no | expects the MTPLX layout; use barozp/Inkling-2-Mini-MTPLX-3bit |
Apps built on mlx-lm should be able to load it once PR #2086 is merged and they update. If the merged version changes the weight layout, a re-conversion will be needed.
Local chat server
mlx_lm.server gives an OpenAI-compatible API. The settings we use on a 24 GB Mac:
python -m mlx_lm.server \
--model barozp/Inkling-2-Mini-MLX-3bit \
--prefill-step-size 512 \
--decode-concurrency 1 --prompt-concurrency 1 \
--prompt-cache-size 2 --prompt-cache-bytes 2GB \
--max-tokens 4096 --temp 1.0
curl http://127.0.0.1:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
"messages": [{"role": "user", "content": "Explain the Monty Hall problem briefly."}],
"max_tokens": 1024,
"chat_template_kwargs": {"reasoning_effort": "low"}
}'
- Thinking level: the chat template reads
reasoning_effort:none,minimal,low,medium,high(the default) orxhigh. Pass it per request inchat_template_kwargs. Even atnonethe model writes a short thinking block. - Output format: the server streams Inkling's message tokens as plain text:
<|message_model|><|content_thinking|>…<|end_message|><|message_model|><|content_text|>…<|end_message|>. A chat front end has to split the thinking part from the answer and send only the answer back in the conversation history.
Memory and context
- KV cache: 20 of the 24 layers attend over a 1,024-token sliding window. The 4 global-attention layers keep every token, and two of them sit in the loop core, so they run three times per token. By the architecture that is about 32 KB per token plus at most ~170 MB for the sliding windows: ~1.2 GB at 32K tokens, ~2.3 GB at 64K.
- Context limit: mlx-lm sets no cap, and the model supports up to 1M tokens. On a 24 GB Mac the weights leave about 3 GB under macOS's default GPU working-set limit (17.8 GB) for the KV cache and prefill, so ~32K tokens is the comfortable range. Retrieval at 31.5K tokens was verified on CUDA; the longest prompt we ran on the Mac was 3.8K tokens.
- Other apps: close memory-heavy apps before loading. With a browser and other apps holding about 10 GB, loading the model pushed about 8 GB of their memory into swap, and generation dropped from 38 to 25-29 tok/s.
MTP note
The source ships a DSpark draft head (mtp.safetensors, 3 layers, 0.64 GB). mlx-lm does not use it, so it is not in this repo. For speculative decoding use barozp/Inkling-2-Mini-MTPLX-3bit — same quantized weights plus the draft head, for MTPLX 2.13+.
On the same M5 Pro the MTPLX pack averaged 36.5 tok/s with DSpark on (47.6 on code, 25.6 with drafting off) against 38.2 here: for general chat this repo is as fast, drafting pays off on code.
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.
Source chain
thinkingmachines/Inkling-2-Mini (official release, NVFP4/MXFP8 experts) → this repo (MLX mixed 3-bit, GPTQ)
Related repos:
- barozp/Inkling-2-Mini-MTPLX-3bit — same weights + DSpark draft head, MTPLX
- barozp/Inkling-2-Mini-Uncensored-MLX-3bit — uncensored, MLX 3-bit
- barozp/Inkling-2-Mini-Uncensored-MTPLX-3bit — uncensored, MTPLX + DSpark
- Downloads last month
- 76
3-bit
Model tree for barozp/Inkling-2-Mini-MLX-3bit
Base model
thinkingmachines/Inkling-2-Mini