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
Disk size: 875 MB (vs 2,062 MB bf16, 2.4× compression)
Calibration: the bundled optiq.jsonl mix (40 samples across prose, reasoning, code, agent loops, tool-calling, instructions)
The OptiQ optimizer kept 67 of 169 linears at 8-bit (output projections, gate, last block, lm_head) and 102 at 4-bit (most of MLP). The full per-layer assignment is in optiq_metadata.json next to the safetensors.
Same recipe and benchmark suite as the rest of the mlx-optiq family (Qwen3.5, Qwen3.6, Gemma-4). MMLU + IFEval + HumanEval are the strong scores. GSM8K and BFCL are weak in the non-thinking-mode configuration the benchmark recipe uses for cross-family comparability, see "Hybrid reasoning" below for how to unlock them.
from mlx_lm import load, generate
model, tok = load("mlx-community/MiniCPM5-1B-OptiQ-4bit")
prompt = tok.apply_chat_template(
[{"role": "user", "content": "Summarize the plot of The Iliad in three sentences."}],
tokenize=False,
add_generation_prompt=True,
enable_thinking=False,
)
print(generate(model, tok, prompt=prompt, max_tokens=300))
MiniCPM5's chat template accepts an enable_thinking flag. With it on, the model emits a <think>...</think> block before answering, useful for math, multi-step planning, or any chain-of-thought task. The benchmark numbers above are with thinking off (the OptiQ framework forces it off for cross-family comparability).
Mode
temperature
top_p
Use when
No-think (default)
0.7
0.95
Fast assistant, rewriting, conversational
Think
0.9
0.95
Math, code, multi-hop reasoning
Pass via chat_template_kwargs at the OpenAI endpoint level or as a keyword to apply_chat_template directly. optiq serve forwards chat_template_kwargs verbatim:
Sensitivity-aware allocation puts 8-bit precision on the layers OptiQ measured as most fragile (output projection, gate, the last few blocks). For a 1B model with limited redundancy, that targeting matters disproportionately. HumanEval +12.2 and HashHop recovering from a 0% floor to 4.0% are both consequences of that. Same pattern shows up on small Gemma quants, see the mlx-optiq sensitivity-aware research.
The 1B size makes MiniCPM5 the smallest base in mlx-optiq that's still capable enough to fine-tune for real tasks. On a 24 GB Mac, LoRA training fits comfortably at max_seq_length=2048 with all 7 Unsloth target modules adapted (peak ~3 GB during training, observed). The sensitivity-aware LoRA overlay reads optiq_metadata.json and gives 8-bit layers 2× the adapter rank of 4-bit layers at the same parameter budget.
import os
os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com"
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("mlx-community/MiniCPM5-1B-OptiQ-4bit", revision="935dd26f1ce9f3596d7ecd04014a704592b70dcc")
model = AutoModelForCausalLM.from_pretrained("mlx-community/MiniCPM5-1B-OptiQ-4bit", revision="935dd26f1ce9f3596d7ecd04014a704592b70dcc", device_map="auto")