minicpm5-deploy-llama-cpp
What it does
This skill guides your AI through running MiniCPM5 with llama.cpp, a lightweight program that works on many systems. It is for people with a CPU-only computer, a consumer graphics card, or no Python installed.
When to use it
- ✓When you want to run MiniCPM5 on a computer without a powerful graphics card.
- ✓When you want to use llama-cli for a chat in the terminal or llama-server for a local server.
- ✓When you have no Python available and still want to run the model.
Skill link
https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-llama-cpp/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 computer with llama.cpp so I can chat with it in the terminal.”
5 new skills a week. 1 minute to read.
How it works
The skill installs llama.cpp, downloads a GGUF model file in the size you choose, and then starts either a terminal chat or a local server.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Deploy MiniCPM5-1B and MiniCPM5-2B with llama.cpp
CPU / edge / consumer-GPU deployment via the released GGUF artifacts. The artifacts work directly with vanilla llama.cpp and every downstream runtime (Ollama / LM Studio / llama-cpp-python).
Required input
| Var | Example | Default |
|---|---|---|
GGUF_REPO |
openbmb/MiniCPM5-2B-GGUF |
required; openbmb/MiniCPM5-1B-GGUF also works |
QUANT |
Q4_K_M (1.56 GB, recommended) / Q8_0 (2.68 GB) / F16 (5.04 GB) |
Q4_K_M |
NGL |
99 (all layers on GPU) / 0 (CPU only) |
99 if NVIDIA GPU, else 0 |
CTX |
8192 (default) up to 131072 (128 K) |
8192 |
Steps
1. Install llama.cpp
# macOS
brew install llama.cpp
# Linux / cross-platform: pre-built binary
curl -fsSL https://github.com/ggerganov/llama.cpp/releases/latest/download/llama-cli-linux.tar.gz | tar -xz
# OR build from source:
git clone --depth=1 https://github.com/ggerganov/llama.cpp.git && cd llama.cpp
mkdir build && cd build
cmake .. -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release # CPU-only: omit GGML_CUDA=ON
cmake --build . --config Release -j $(nproc) --target llama-cli llama-server
2. Download the GGUF
mkdir -p ~/minicpm5 && cd ~/minicpm5
huggingface-cli download ${GGUF_REPO} MiniCPM5-2B-${QUANT}.gguf --local-dir .
3a. Interactive chat (CLI)
llama-cli -m MiniCPM5-2B-${QUANT}.gguf \
-n 2048 --temp 1.0 --top-p 0.95 --min-p 0.0 -ngl ${NGL} -c ${CTX}
3b. OpenAI-compatible HTTP server
llama-server -m MiniCPM5-2B-${QUANT}.gguf \
--port 8080 -ngl ${NGL} -c ${CTX} --jinja
4. Validate
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "MiniCPM5-2B",
"messages": [{"role":"user","content":"1+1=?"}],
"temperature": 1.0, "top_p": 0.95, "min_p": 0.0, "max_tokens": 64
}'
Expected: "2" in the reply.
In llama.cpp, the default min_p=0.05 can lead to repetitive output: it filters out tokens whose probability is below 5% of the highest-probability token, potentially discarding the exact tokens needed to break out of a repetition loop. To prevent this, we set min_p=0.0.
Sampling defaults
| Mode | --temp |
--top-p |
--min-p |
|---|---|---|---|
| MiniCPM5-2B Think | 1.0 | 0.95 | 0.0 |
| MiniCPM5-1B Think | 0.9 | 0.95 | 0.0 |
| MiniCPM5-1B No-think | 0.7 | 0.95 | 0.0 |
Choosing a quant
| Quant | Disk | Quality |
|---|---|---|
| F16 | 5.04 GB | reference |
| Q8_0 | 2.68 GB | ~indistinguishable from F16 |
| Q4_K_M | 1.56 GB | small drop, ideal for laptops |
Common pitfalls
- Slow on CPU + large context: drop
-c 131072to-c 8192if you don't need 128 K.
Building your own GGUF (advanced)
If you've trained your own MiniCPM5-1B or MiniCPM5-2B variant, build a GGUF with:
python convert_hf_to_gguf.py /path/to/your-fp16-hf --outfile out/F16.gguf --outtype f16
llama-quantize out/F16.gguf out/Q4_K_M.gguf Q4_K_M
Trained a LoRA adapter (not a full model) and want to apply it at runtime with --lora instead of baking it in? Convert it to a GGUF adapter — see minicpm5-finetune-gguf-lora.
When NOT to use
- NVIDIA GPU + want OpenAI-compatible serving →
minicpm5-deploy-vllm - Apple Silicon native →
minicpm5-deploy-mlxis faster - Just want one-line desktop run →
minicpm5-deploy-ollama - Want a desktop GUI →
minicpm5-deploy-lmstudio
Reference
FAQ
Which model file should I choose?
The skill recommends Q4_K_M as the default, with Q8_0 and F16 as larger options.
Can it use my graphics card?
Yes. The skill has a setting that puts all layers on the GPU, or uses the CPU only.
How much context can it use?
The skill sets 8192 as the default and says the maximum is 131072, which is 128K.
Details
Original description by the author
Run MiniCPM5-1B or MiniCPM5-2B with llama.cpp using the released GGUF artifacts (F16 / Q8_0 / Q4_K_M). Use when the user wants CPU-only / consumer-GPU / cross-platform native deployment, asks for "llama.cpp", "llama-cli", "llama-server", "GGUF", or has no Python available.
repo: OpenBMB/MiniCPM
Popularity
- GitHub stars
- 12k
- Ranking position
- #11531
- 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-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-mlx
12kLets your agent run MiniCPM5 models natively on Apple Silicon Macs with Apple's MLX framework, for fast local chat and text generation.
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.