MiniCPM is a family of compact language models, including MiniCPM5-1B, designed to run locally on devices with limited resources. Developers use it for on-device assistants, reasoning, code, tool use, deployment, and fine-tuning, while the repository also includes a desktop-pet example. The catalogue entries support deployment and fine-tuning workflows for the models.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add OpenBMB/MiniCPM --skill minicpm5-deploy-transformersgit clone --depth 1 https://github.com/OpenBMB/MiniCPMWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/openbmb/minicpm/minicpm5-deploy-transformers)<a href="https://agentmods.dev/skills/openbmb/minicpm/minicpm5-deploy-transformers"><img src="https://agentmods.dev/badge/skills/openbmb/minicpm/minicpm5-deploy-transformers/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/openbmb/minicpm/minicpm5-deploy-transformers"><img src="https://agentmods.dev/badge/skills/openbmb/minicpm/minicpm5-deploy-transformers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00090 | $0.00939 |
| Opus 5.5 | $0.00036 | $0.00376 |
| Sonnet 5.5 | $0.00018 | $0.00188 |
| Haiku 4.5 | $0.00009 | $0.00094 |
Grade A, and why
minicpm5-deploy-transformers scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Deploy MiniCPM5-1B and MiniCPM5-2B with HF Transformers
One-shot Python generation. No server. Works on a single GPU (bfloat16) or CPU only (fp32).
Required input
| Var | Example | Default |
|---|---|---|
MODEL_PATH |
openbmb/MiniCPM5-2B or local dir |
required; openbmb/MiniCPM5-1B also works |
MODE |
think or nothink (nothink is 1B-only) |
think |
Steps
1. Install (once)
pip install -U "transformers>=5.6,<6" "torch>=2.11" accelerate # latest (CUDA 13.x driver hosts)
# pip install -U "transformers==4.57.3" "torch==2.7.1" accelerate # fallback for CUDA 12.x driver hosts
2. Run
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_path = "${MODEL_PATH}" # ← replace
tok = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
model_path,
torch_dtype=torch.bfloat16, # CPU users: torch.float32 + device_map="cpu"
device_map="auto",
).eval()
messages = [{"role": "user", "content": "用一句话解释什么是 GQA。"}]
inputs = tok.apply_chat_template(
messages,
add_generation_prompt=True,
enable_thinking=True,
return_tensors="pt",
return_dict=True,
).to(model.device)
with torch.no_grad():
out = model.generate(
**inputs,
max_new_tokens=1024,
do_sample=True,
temperature=1.0,
top_p=0.95,
)
prompt_len = inputs["input_ids"].shape[-1]
print(tok.decode(out[0][prompt_len:], skip_special_tokens=True))
For CPU only: change torch_dtype=torch.float32, device_map="cpu". Keep enable_thinking=True and temperature=1.0 for MiniCPM5-2B; use enable_thinking=False and temperature=0.7 only for MiniCPM5-1B No-think mode.
Sampling defaults
| Mode | enable_thinking |
temperature |
top_p |
|---|---|---|---|
| MiniCPM5-2B Think | True |
1.0 | 0.95 |
| MiniCPM5-1B Think | True |
0.9 | 0.95 |
| MiniCPM5-1B No-think | False |
0.7 | 0.95 |
Validate
A coherent answer to 1+1=? (e.g. "2" or "答案是 2").
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago Changed · +4 lines · +8 tokens per session 4e6e21fad965
- 2mo ago First seen · 91 lines · 82 tokens per session scan A e42ebb2045bc
minicpm5-deploy-transformers is a skill published in the GitHub repository OpenBMB/MiniCPM (11,865 stars, last pushed 4d ago), licensed Apache-2.0. It adds 90 tokens to every session and 939 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
minicpm5-deploy-transformers compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| minicpm5-deploy-transformersOpenBMB/MiniCPM | Skill | 12k | 4d ago | Apache-2.0 | A | 90 | Claude Code, Codex |
| accelerateNousResearch/hermes-agent | Skill | 263k | today | MIT | A | 13 | Claude Code, Codex |
| pytorch-patternsaffaan-m/ECC | Skill | 302k | 4d ago | MIT | A | 32 | Claude Code, Kiro |
| developing-genkit-pythongoogle/skills | Skill | 24k | today | Apache-2.0 | A | 96 | Claude Code, Codex |
| optimize-for-gpuK-Dense-AI/scientific-agent-skills | Skill | 57k | 4d ago | MIT | A | 151 | Claude Code, Codex |
| marimo-pairmarimo-team/marimo | Skill | 24k | today | Apache-2.0 | A | 57 | Claude Code, Codex |
| azure-mgmt-fabric-pymicrosoft/skills | Skill | 3.2k | today | MIT | A | 51 | Claude Code |