Run this model with HF Jobs
Run LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ 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("LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ") config = load_config("LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ") # 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 LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ"
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": "LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ 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 "LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ"
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 LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ"
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 "LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ" \ --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 — Custom 3.10 BPW Mixed-Precision + DWQ (MLX)
A custom 10.23 GB (9.53 GiB · 3.102 BPW) MLX quantization of thinkingmachines/Inkling-2-Mini (26.4B total / 3.4B active, 3× looped MoE, multimodal text + vision), designed specifically to run comfortably with long usable context on 16 GB Apple Silicon Macs while preserving Inkling 2 Mini's core strengths (agentic tool calling, reasoning, general chat/writing, and vision).
Highlights
- Nearly 2× smaller than the native 19.57 GB (
NVFP4/MXFP8) checkpoint — 9.53 GiB on disk & in RAM. - Full vision support preserved (
vision_towerkept untouched inbfloat16). - Architecture-aware mixed precision guided by 128-sample KL-divergence sensitivity profiling on the unpacked native checkpoint + a 4-way pre-DWQ shootout.
- Custom Distilled Weight Quantization (DWQ) healed on 2,048 samples (~1.57M tokens,
seq <= 1024) across a 50% broad general/coding/math (tulu-3-sft-mixture), 25% native-templated tool calling (hermes-function-calling-v1), and 25% writing/chat (ultrachat_200k) blend — cutting held-out KL-divergence by 50.1% overall and 60.3% on tool calling.
Mixed-Precision Recipe (3.102 BPW · pure group_size=64)
| Component | Precision | Rationale |
|---|---|---|
vision_tower (318M) |
bfloat16 (untouched) |
Preserves native multimodal image understanding (636 MB) |
*_message_gate, moe_routers, block_attn_residuals, norms, sconv |
fp32 / bf16 (untouched) |
Critical cross-pass loop & routing stability (~117 MB) |
self_attn.sink_proj & sconv.weight_proj |
bfloat16 (untouched) |
~1,000× more sensitive per param than MoE experts (<4 MB) |
self_attn.{v,k,r,o}_proj (all 24 layers) |
8-bit / g64 |
Highest-sensitivity attention projections |
self_attn.{q,gate}_proj & lm_head |
6-bit / g64 |
Clean attention & output logits |
embed_tokens |
4-bit / g64 |
11× lower gradient energy than lm_head |
Top 10 sensitive MoE down_proj (L9, L12, L14–L18, L21–L23) |
3-bit / g64 |
Late 3× loop exit & native MXFP8 tail choke points |
Top 2 sensitive MoE gate_up_proj (L17, L22) |
3-bit / g64 |
Full-attention loop exit (L17) & peak MXFP8 layer (L22) |
| Remaining 36 MoE expert tensors | 2-bit / g64 |
Pure g64 maximizes DWQ-healable scales & biases |
Held-Out Evaluation (128 Unseen Sequences, <= 1024 tokens)
Measured as KL-divergence against the native 19.57 GB thinkingmachines/Inkling-2-Mini checkpoint (lower is better):
| Model | Size | Overall KL ↓ | Tool Calling KL ↓ | Writing/Chat KL ↓ | General/Code/Math KL ↓ |
|---|---|---|---|---|---|
Native Teacher (NVFP4/MXFP8) |
19.57 GB (18.22 GiB) | 0.0000 |
0.0000 |
0.0000 |
0.0000 |
| Pre-DWQ Mixed-Precision (Recipe A) | 10.23 GB (9.53 GiB) | 0.3677 |
0.5618 |
0.3109 |
0.2836 |
| Post-DWQ Custom (This Model) | 10.23 GB (9.53 GiB) | 0.1835 (-50.1%) |
0.2232 (-60.3%) |
0.1791 (-42.4%) |
0.1614 (-43.1%) |
Token Agreement vs. Native 19.57 GB Teacher (100,208 Unseen Tokens)
| Model | Overall Top-1 ↑ | Tool Top-1 ↑ | Chat Top-1 ↑ | General/Code Top-1 ↑ | Overall Top-5 ↑ | High-Conf (≥80%) Top-1 ↑ |
|---|---|---|---|---|---|---|
| Pre-DWQ (Recipe A) | 83.46% |
82.77% |
80.92% |
85.59% |
96.43% |
97.76% |
| Post-DWQ Custom | 87.29% |
87.49% |
85.00% |
88.70% |
98.20% |
98.89% |
Memory Footprint (16 GB MacBook Friendly)
Thanks to Inkling 2 Mini's 5:1 sliding-window-to-full-attention ratio (only 4 full-attention layers), KV cache grows very slowly:
| Context Length | Active Memory | KV Cache Overhead |
|---|---|---|
| Weights only | 10.23 GB (9.53 GiB) |
— |
| 128 tokens | 10.31 GB (9.60 GiB) |
+0.08 GB |
| 4,096 tokens | 10.55 GB (9.83 GiB) |
+0.32 GB |
| 8,192 tokens | 10.69 GB (9.96 GiB) |
+0.46 GB |
| 16,384 tokens | 10.95 GB (10.20 GiB) |
+0.72 GB |
16 GB Mac tip: Use
--prefill-step-size 256(or512) during long-prompt prefill to keep transient scratchpad memory low.
Usage with mlx-lm
Inkling 2 Mini support is in mlx-lm PR #2086 (or newer mlx-lm releases once merged):
pip install -U "git+https://github.com/ml-explore/mlx-lm.git@refs/pull/2086/head"
Text generation
mlx_lm.generate \
--model LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ \
--prompt "Explain why looped transformers are great for local Apple Silicon." \
--prefill-step-size 256
Multimodal (vision + text)
mlx_lm.generate \
--model LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ \
--image screenshot.png \
--prompt "Summarize the key details from this notification."
- Downloads last month
- 265
2-bit
Model tree for LocallyInferred/Inkling-2-Mini-MLX-3.1bpw-DWQ
Base model
thinkingmachines/Inkling-2-Mini