mlx-optiq
Family guide · Inkling

Inkling on Apple Silicon

Inkling 2 Mini is Thinking Machines' looped mixture of experts. It has 24 layers of weights, and the middle 12 run three times with shared weights, so every token passes through 48 layer applications. Each token goes to 8 of 128 experts, and attention alternates between local and global layers. It reasons before it answers, calls tools, and supports a context window of up to 1M tokens.

Loads through OptiQ Stock mlx-lm has no Inkling class yet, so OptiQ ships one and registers it when it loads a model. optiq serve, optiq eval and optiq lora train do this themselves. From Python, call install_vendored() before mlx_lm.load. It needs mlx 0.32.4 and mlx-lm 0.32.2 or later.

The quant

ModelAs shippedOptiQ sizeCapability Score
Inkling-2-Mini-OptiQ-4bit20.2 GB17.7 GB84.93

Thinking Machines ships the routed experts already quantized, in NVFP4 and MXFP8, and the quant keeps them exactly as shipped. OptiQ measured every other layer (attention, the loop gates, the output head) and gave each one 4 or 8 bits from that measurement. The vision tower stays at bf16.

MetricScore
MMLU81.1%
GSM8K96.2%
IFEval (strict)89.3%
BFCL-V3 simple88.5%
HumanEval91.5%
HashHop63.0%

Serve it

terminalbash
pip install -U "mlx-optiq>=0.8.7" "mlx>=0.32.4" "mlx-lm>=0.32.2"
optiq serve --model mlx-community/Inkling-2-Mini-OptiQ-4bit

The endpoint speaks the OpenAI and Anthropic APIs. Inkling writes its thinking, its answer and each tool call as separate messages, and optiq serve returns them as the reasoning field, the content and tool_calls.

From Python

hello.pypython
from optiq.models import install_vendored
from mlx_lm import load, generate

install_vendored()  # registers the Inkling architecture with mlx-lm
model, tok = load("mlx-community/Inkling-2-Mini-OptiQ-4bit")
prompt = tok.apply_chat_template(
    [{"role": "user", "content": "Explain a looped transformer in two sentences."}],
    tokenize=False, add_generation_prompt=True,
)
print(generate(model, tok, prompt=prompt, max_tokens=4096))
Give it room to think The model reasons before every answer, even at its lowest effort setting, and can loop while it re-checks its own work. Set a token limit, and expect the looped middle layers to cost more compute per token than the active-parameter count suggests.

Fine-tune it

LoRA training works on the quant. Inkling's fast attention and routing kernels have no backward pass, so training runs through their plain MLX equivalents, which is slower than inference but gives the same results.

terminalbash
optiq lora train mlx-community/Inkling-2-Mini-OptiQ-4bit --data ./my_data --grad-checkpoint