minicpm5-deploy-ollama
What it does
This skill guides your AI through running MiniCPM5 with Ollama on a Mac or Linux computer. It is for people who want a quick setup for a local AI model.
When to use it
- ✓When you want to run MiniCPM5 with a single ollama command on your laptop.
- ✓When you want to create a custom Ollama setup with a Modelfile.
- ✓When you want to test the model through Ollama's API.
Skill link
https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-ollama/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
“Set up MiniCPM5 on my laptop with Ollama so I can run it with a single command.”
5 new skills a week. 1 minute to read.
How it works
The skill installs Ollama, downloads a GGUF file, writes a short Modelfile with the chat template, creates the model, and then tests it through the API.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Deploy MiniCPM5-1B and MiniCPM5-2B with Ollama
One-binary, no-Python laptop deployment. Consumes the released GGUF.
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 |
MODEL_NAME |
minicpm5-2b |
minicpm5-2b |
Steps
1. Install Ollama (once)
brew install ollama # macOS
# or:
curl -fsSL https://ollama.com/install.sh | sh # Linux
OLLAMA_FLASH_ATTENTION=1 OLLAMA_KV_CACHE_TYPE=q8_0 ollama serve &
2. Download the GGUF + write Modelfile
mkdir -p ~/${MODEL_NAME} && cd ~/${MODEL_NAME}
huggingface-cli download ${GGUF_REPO} MiniCPM5-2B-${QUANT}.gguf --local-dir .
cat > Modelfile <<EOF
FROM ./MiniCPM5-2B-${QUANT}.gguf
# MiniCPM5 basic chat template
TEMPLATE """{{- if .Messages -}}
{{- range .Messages -}}
<|im_start|>{{ .Role }}
{{ .Content }}<|im_end|>
{{ end -}}
<|im_start|>assistant
{{ end -}}"""
PARAMETER stop "<|im_end|>"
PARAMETER stop "</s>"
# Defaults tuned for think mode
PARAMETER temperature 1.0
PARAMETER top_p 0.95
PARAMETER num_ctx 8192
EOF
3. Create + run
ollama create ${MODEL_NAME} -f Modelfile
ollama run ${MODEL_NAME}
4. Validate via OpenAI-compatible API
curl http://localhost:11434/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, "max_tokens": 64
}'
Expected: "2" in the reply.
MiniCPM5-1B Think vs No-think
A MiniCPM5-1B Modelfile configured with temperature=0.7, top_p=0.95 defaults to no-think. To switch a single conversation to think mode, override the sampling params at request time:
ollama run minicpm5-1b --temperature 0.9 --top-p 0.95
Or bake it into a separate model tag by raising the temperature line (top_p stays 0.95):
PARAMETER temperature 0.9
PARAMETER top_p 0.95
Then ollama create minicpm5-1b-think -f Modelfile.think.
Ollama 0.24 does not directly evaluate the GGUF-embedded Jinja chat template. It maps recognized Jinja templates to built-in Go templates, so MiniCPM5 uses the explicit Go TEMPLATE block above. To enter the MiniCPM5-2B think path, use raw mode and prepend <think>\n manually:
curl http://localhost:11434/api/generate -d '{
"model": "minicpm5-2b",
"raw": true,
"prompt": "<|im_start|>user\n鸡兔同笼…<|im_end|>\n<|im_start|>assistant\n<think>\n",
"options": {"temperature": 1.0, "top_p": 0.95}
}'
Common pitfalls
Error: invalid file magic: corrupted download. Re-runhuggingface-cli download.
When NOT to use
- Highest throughput on Mac →
minicpm5-deploy-mlx(Q4 build) - GUI experience →
minicpm5-deploy-lmstudio - NVIDIA GPU production →
minicpm5-deploy-vllm
Reference
FAQ
Which file size should I download?
The skill recommends Q4_K_M, which it lists at about 1.56 GB.
Is Windows covered?
The install steps cover macOS and Linux. The skill does not give Windows install steps.
What is a Modelfile?
It is a small text file that tells Ollama which model file to use and how to format chats.
Details
Original description by the author
Run MiniCPM5-1B or MiniCPM5-2B via Ollama on macOS / Linux laptop using the released GGUF. Use when the user wants "ollama run", "ollama pull", a Modelfile-driven setup, or one-line laptop deployment.
repo: OpenBMB/MiniCPM
Popularity
- GitHub stars
- 12k
- Ranking position
- #11534
- 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-mlx
12kLets your agent run MiniCPM5 models natively on Apple Silicon Macs with Apple's MLX framework, for fast local chat and text generation.
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.