minicpm5-deploy-mlx
What it does
This skill guides your AI through running MiniCPM5 on a Mac with Apple Silicon, using Apple's MLX framework. It is for Mac users who want the fastest local option on their machine.
When to use it
- ✓When you have an M-series Mac and want to run MiniCPM5 locally.
- ✓When you want to use mlx_lm to generate text from the command line.
- ✓When you have a Hugging Face model and want to convert it to MLX format on your Mac.
Skill link
https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-mlx/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Help me run MiniCPM5 on my Mac with MLX and check that it gives the right answer to 1+1.”
5 new skills a week. 1 minute to read.
How it works
The skill installs the mlx-lm tools, runs a test prompt with a ready-made MLX model, and can also convert a model you already have into MLX format.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Deploy MiniCPM5-1B and MiniCPM5-2B with MLX (Apple Silicon)
Apple's on-device tensor framework. Highest throughput on M-series. Stays inside one Python process — no separate server, no llama.cpp build chain.
Required input
| Var | Example | Default |
|---|---|---|
MLX_REPO |
openbmb/MiniCPM5-2B-MLX (pre-converted 4-bit affine) |
required; openbmb/MiniCPM5-1B-MLX also works |
OR HF_REPO + QUANT |
openbmb/MiniCPM5-2B, 4bit or bf16 |
for local conversion |
MAX_TOKENS |
200 |
200 |
Steps
1. Install (once)
pip install "mlx-lm>=0.31" "gguf"
2A. Use a pre-converted MLX repo (recommended when available)
mlx_lm.generate --model "${MLX_REPO}" \
--prompt "<|im_start|>user
1+1=?<|im_end|>
<|im_start|>assistant
" \
--max-tokens ${MAX_TOKENS} --temp 1.0 --top-p 0.95
2B. Convert from a HF checkpoint locally (advanced)
Use 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 4
Then run as in 2A.
3. Validate
The reply should contain "2" for 1+1=?.
OpenAI-compatible server (mlx-lm)
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": 1.0, "top_p": 0.95, "max_tokens": 64
}'
Common pitfalls
- Slow first generate: MLX JIT-compiles kernels on first call (~5-10 s); subsequent calls hit the warm cache.
- Model runs past
<|im_end|>: only happens onmlx-lm < 0.31(older versions ignore multi-ideos_token_idlists). Upgrade, or pass--extra-eos-token "<|im_end|>"as a manual override —<|im_end|>is token id 130073 and is already listed ingeneration_config.jsonon 0.31+.
When NOT to use
- Not on Apple Silicon →
minicpm5-deploy-llama-cpp(CPU/CUDA) orminicpm5-deploy-vllm(CUDA) - Want a desktop GUI →
minicpm5-deploy-lmstudio(LM Studio bundles an MLX runtime) - Want one-line CLI run →
minicpm5-deploy-ollama
Reference
FAQ
Do I need to convert a model myself?
Usually not. The skill recommends a ready-made MLX repository when one exists.
How do I know it works?
The skill says the reply should contain the number 2 for the question 1+1.
Can it run a local server?
Yes. The skill includes an OpenAI-compatible server through mlx_lm.server.
Details
Original description by the author
Run MiniCPM5-1B or MiniCPM5-2B 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.
repo: OpenBMB/MiniCPM
Popularity
- GitHub stars
- 12k
- Ranking position
- #11533
- License
- Apache-2.0
- Updated
- 9/21/2026
Comments
- …
More skills from this repository
minicpm5-deploy-litert
12kLets your agent run MiniCPM5 models on a computer or Android phone with Google's LiteRT-LM runtime, using one model file.
minicpm5-deploy-llama-cpp
12kShows your agent how to run MiniCPM5 models with llama.cpp on a CPU or a home graphics card, using ready-made GGUF files.
minicpm5-deploy-lmstudio
12kHelps your agent run MiniCPM5 models in LM Studio, a desktop app with a chat window, and start its local OpenAI-style server.
minicpm5-deploy-ollama
12kTeaches your agent to run MiniCPM5 with Ollama on a Mac or Linux laptop, using a GGUF file and a few simple commands.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.