Instructions to use mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit 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("mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit") 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 mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-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 "mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-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": "mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-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 "mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-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 mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-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 "mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-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 "mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-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"
mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit
Built with mlx-optiq, the MLX-native toolkit to quantize, fine-tune, and serve LLMs locally on Apple Silicon, no PyTorch and no cloud. Try the Lab · All OptiQ quants · Docs
A 4-bit mixed-precision MLX quant of XiaomiMiMo/MiMo-V2.6-Distill-Qwen-9B, a distillation of the Qwen3.5 9B architecture. Sensitive layers are kept at 8-bit and robust ones at 4-bit, rather than crushing everything to a uniform width.
Quantization details
| Property | Value |
|---|---|
| Predominant precision | 4-bit |
| Layers at 8-bit | 134 |
| Layers at 4-bit | 116 |
| Bits per weight | 6.34 |
| Size on disk | 6.77 GB (from ~18 GB bf16) |
| Group size | 64 |
How the bit-widths were chosen
Honestly stated, because it differs from most OptiQ quants: the per-layer allocation was not measured on this model. It was transferred from mlx-community/Qwen3.5-9B-OptiQ-4bit, whose allocation came from a KL-divergence sensitivity pass over a six-domain calibration mix (prose, reasoning, code, agent, tool-call, instructions).
That transfer is sound here because the two models share an architecture
exactly — qwen3_5, 32 layers with 8 full-attention and 24 linear-attention,
16 heads, 4 KV heads, head_dim 256, hidden 4096, vocab 248,320 — so every
layer in the recipe has a counterpart with the same role and shape. All 250
tensors matched with none unmatched, which is the check that matters: an
unmatched tensor would silently fall back to flat 4-bit and make this a
uniform quant wearing a mixed-precision name.
What sensitivity measures is how much a layer's role in the architecture
suffers from precision loss. What it cannot know is whether this model's own
training moved that sensitivity around. If you are quantizing your own
fine-tune and want the allocation measured against it, run
optiq convert and let the sweep do it.
What was verified
- 250/250 tensors matched the recipe, 0 unmatched.
- Generation compared against the bf16 parent on identical prompts — factual recall, arithmetic with working shown, an iterative Fibonacci implementation, and a technical explanation. The answers agree; the quant runs 2.4–7× faster.
- OptiQ's release contract (artifact layout, metadata, mixed-precision assertions).
Not run for this model: the six-metric Capability Score. The published scores for the Qwen3.5-9B quant describe that model, not this one, and are not claimed here.
Use it
pip install mlx-optiq
optiq serve --model mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit
Or with mlx-lm directly:
from mlx_lm import generate, load
model, tokenizer = load("mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit")
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "Explain write-ahead logging in two sentences."}],
add_generation_prompt=True, tokenize=False)
print(generate(model, tokenizer, prompt=prompt, max_tokens=256))
The per-layer bit map is in optiq/metadata.json and in the quantization
block of config.json.
- Downloads last month
- 1,916
4-bit
Model tree for mlx-community/MiMo-V2.6-Distill-Qwen-9B-OptiQ-4bit
Base model
Qwen/Qwen3.5-9B-Base