Instructions to use pipenetwork/Inkling-Small-MLX-REAP25-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use pipenetwork/Inkling-Small-MLX-REAP25-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("pipenetwork/Inkling-Small-MLX-REAP25-4bit") config = load_config("pipenetwork/Inkling-Small-MLX-REAP25-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 pipenetwork/Inkling-Small-MLX-REAP25-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 "pipenetwork/Inkling-Small-MLX-REAP25-4bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "pipenetwork/Inkling-Small-MLX-REAP25-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use pipenetwork/Inkling-Small-MLX-REAP25-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 "pipenetwork/Inkling-Small-MLX-REAP25-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 pipenetwork/Inkling-Small-MLX-REAP25-4bit
Run Hermes
hermes
- OpenClaw new
How to use pipenetwork/Inkling-Small-MLX-REAP25-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 "pipenetwork/Inkling-Small-MLX-REAP25-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 "pipenetwork/Inkling-Small-MLX-REAP25-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-Small-MLX-REAP25-4bit
Built with Inkling (Thinking Machines Lab).
A REAP-pruned, 4-bit MLX build of thinkingmachines/Inkling-Small: each MoE layer keeps its 192 highest-saliency routed experts (of 256), a 25% expert prune. No measurable loss — the build to take for a 128 gb mac.
Code / loader: github.com/PipeNetwork/inkling-mlx
What is REAP pruning?
REAP (Router-weighted Expert Activation Pruning, Cerebras, arXiv:2510.13999)
ranks each routed expert by saliency = mean over the tokens that route to it of
router_gate_weight × ‖expert_output‖₂ — its actual contribution to the residual
stream. The lowest-saliency experts are dropped; the router simply renormalizes over
the survivors (no weight surgery). The 2 shared "sink" experts, attention, and
embeddings are untouched. Inkling routes very uniformly (routing entropy 0.908; only ~0.15 cold experts per layer once audio is included in the calibration), so it
is only lightly prunable — reflected below.
Calibrated on text, images and audio (this matters)
Inkling-Small is multimodal, and expert saliency was profiled over a mixed corpus of text (code + 15 languages + reasoning), 200 real images, and 180 speech clips run through the full vision and audio paths. On this model that is not optional: 47.7 experts per layer are >50% audio-driven and 22.3 are >50% image-driven — about 27% of all experts serve primarily non-text input, and adding audio to the calibration dropped the cold-expert count from 0.65 to 0.15 per layer. Experts that only ever fire on speech look worthless to a text-only profiler and get pruned first, which is how the 975B model lost speech transcription (word-overlap 0.88 → 0.57) while its text perplexity still looked fine. Profiling all three modalities keeps them. On held-out tests this build scores vision 6/6 and audio 0.896 word-overlap — both at the unpruned build's level.
Measured quality (4-bit)
| Build | Experts kept | Size | Text ppl | vs unpruned | Vision (image ID) | Audio (speech overlap) |
|---|---|---|---|---|---|---|
| Inkling-Small-MLX-4bit (unpruned) | 256 | ~148 GB | 5.452 | — | ✓ | ✓ |
| Inkling-Small-MLX-REAP25-4bit | 192 | ~112 GB | 4.992 | −8.4% | 6/6 | 0.896 |
This build: text perplexity 4.992 (−8.4% vs the unpruned 4-bit), vision 6/6 (held-out image ID), audio 0.896 (held-out speech transcription word-overlap), 87.5% of router-weighted expert contribution retained.
Read that −8.4% as "no measurable change", not as pruning improving the model. Perplexity was measured on two independent held-out sets: this one has REAP-25 at −8.4% vs the unpruned 4-bit, a second one has it at +0.55%. Sets that small disagree by a few percent in either direction, so the defensible claim is that a 25% expert prune costs nothing measurable here — not that it helps.
50% pruning is a different story and is deliberately not published. It was built and evaluated: text perplexity roughly doubled (+88% / +105% on the two sets) and speech transcription fell from 0.874 to 0.702, so it was dropped rather than shipped with a warning. Inkling-Small is meaningfully less prunable than the 975B model, whose REAP-50 cost ~22%. Pruning is applied to the already-quantized build; because expert subsetting is along the expert axis and affine-quant groups run along the hidden axis, it is bit-identical to pruning the bf16 source then requantizing.
Quantization scheme: affine int4 (not NVFP4 / MXFP4)
MLX supports FP4 modes and Thinking Machines ships an Inkling-NVFP4 checkpoint — so for the record, we benchmarked round-trip reconstruction error (‖W − Ŵ‖ / ‖W‖ vs bf16) on real Inkling expert weights:
| Scheme | bits/weight | reconstruction error |
|---|---|---|
| affine int4 (group 64) | 4.50 | ~9.1% |
| nvfp4 (group 16) | 4.50 | ~10.2% |
| mxfp4 (group 32) | 4.25 | ~12.3% |
Affine int4 is the most faithful: it is asymmetric (per-group scale and zero-point, 16 uniform levels), which centers on Inkling's near-Gaussian expert weights better than symmetric FP4's fixed non-uniform levels (scale only, no zero-point). FP4's real payoff is heavy-tailed activations and native Blackwell FP4 tensor cores — neither helps weight fidelity on Apple Silicon, where MLX would dequantize FP4 anyway. So these builds use affine int4; a Mac port of the NVFP4 checkpoint would be lower quality at best-equal size.
⚠️ Loading requires the bundled inkling_mlx loader
The inkling_mm_model architecture is not in stock mlx-lm / mlx-vlm, so this
repo bundles a minimal, numerically-validated MLX implementation under inkling_mlx/.
The reduced expert count is recorded in config.json (n_routed_experts = 192) and
the loader builds the model to match automatically.
pip install mlx mlx-lm transformers
from inkling_mlx.load import load
from inkling_mlx.generate import greedy_generate
from transformers import AutoTokenizer
model, config = load("/path/to/this/repo") # eager wired load fits comfortably
tok = AutoTokenizer.from_pretrained("/path/to/this/repo", trust_remote_code=True)
ids = tok("The capital of France is")["input_ids"]
print(tok.decode(greedy_generate(model, config, ids, max_new_tokens=64)))
Needs an Apple-Silicon Mac with unified memory ≥ the size above. The smaller footprint is the practical point: ~112 GB fits a 128 GB Mac, where the unpruned 148 GB 4-bit build does not.
Details
- Multimodal (HMLP vision + dMel audio towers + preprocessing) is included, same as the base MLX build; the multi-token-prediction head is dropped.
- Quantized: attention / MLP / expert projections, embed+unembed, vision/audio matmuls. Kept higher precision: MoE router, RMSNorms, the four short-convolutions per layer, relative-position bias.
License: Apache-2.0 (inherits the base model).
- Downloads last month
- 25
Quantized
Model tree for pipenetwork/Inkling-Small-MLX-REAP25-4bit
Base model
thinkingmachines/Inkling-Small