Run MiniCPM5-1B natively on Apple Silicon with Apple's MLX framework. Use when the user has an Apple Silicon Mac and asks for "MLX", "mlx_lm", "mlx_lm.convert", "mlx_lm.generate", or wants the fastest path on Apple Silicon.
75
94%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Apple's on-device tensor framework. Highest throughput on M-series. Stays inside one Python process — no separate server, no llama.cpp build chain.
| Var | Example | Default |
|---|---|---|
MLX_REPO | openbmb/MiniCPM5-1B-MLX (pre-converted 4-bit affine) | required |
OR HF_REPO + QUANT | openbmb/MiniCPM5-1B, 4bit or bf16 | for local conversion |
MAX_TOKENS | 200 | 200 |
pip install "mlx-lm>=0.31" "gguf"mlx_lm.generate --model "${MLX_REPO}" \
--prompt "<|im_start|>user
1+1=?<|im_end|>
<|im_start|>assistant
" \
--max-tokens ${MAX_TOKENS} --temp 0.7 --top-p 0.95Use mlx_lm.convert only if you have a self-trained HF fp16 checkpoint:
HF=/path/to/your-fp16-hf
# Convert: bf16
mlx_lm.convert --hf-path "$HF" --mlx-path ./minicpm5-mlx-bf16
# Convert: 4-bit (smaller / faster)
mlx_lm.convert --hf-path "$HF" --mlx-path ./minicpm5-mlx-q4 -q --q-bits 4Then run as in 2A.
The reply should contain "2" for 1+1=?.
mlx_lm.server --model "${MLX_REPO}" --host 127.0.0.1 --port 8000
curl http://127.0.0.1:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "default",
"messages": [{"role":"user","content":"1+1=?"}],
"temperature": 0.7, "top_p": 0.95, "max_tokens": 64
}'<|im_end|>: only happens on mlx-lm < 0.31 (older versions ignore multi-id eos_token_id lists). Upgrade, or pass --extra-eos-token "<|im_end|>" as a manual override — <|im_end|> is token id 130073 and is already listed in generation_config.json on 0.31+.minicpm5-deploy-llama-cpp (CPU/CUDA) or minicpm5-deploy-vllm (CUDA)minicpm5-deploy-lmstudio (LM Studio bundles an MLX runtime)minicpm5-deploy-ollama719e4fc
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.