MiniCPM5-15B-A2.5B
MiniCPM Text Series
MiniCPM5-15B-A2.5B is the sparse Mixture-of-Experts (MoE) model in the MiniCPM5 series, with 15B total parameters and 2.5B activated parameters, designed as an on-device native agent. It runs locally on phones, PCs and other edge devices, delivering general work, coding, tool calling and complex reasoning under tight resource budgets. It supports hybrid thinking and a 512K context window, and works with agent harnesses such as Codex, Claude Code, DeepSeek Harness and WorkBuddy, so data and execution stay on the user's device.
- Strongest model under 20B: With less than half the parameters of Qwen3.6-35B-A3B, it surpasses it overall, and scores 11 on the AA-Index leaderboard, ranking first among models under 20B.
- On-device inference speed: Decodes at up to 52 tokens/s on an iPhone 18 Pro Max without memory limits; with native prefetch-routing training, it still reaches 30 tokens/s at about 3 GB of memory.
- IMO / CMO gold-medal reasoning: Scored 123/126 in the CMO 2026 final with an official gold medal, and 32 points on a self-evaluated IMO 2026, above the 29-point gold line — the first on-device model to reach IMO gold level.
Pick the weight format that matches your deployment tool, or choose the Base, Midtrain or SFT checkpoint for your training needs. Checkpoints from different training stages serve different purposes, so read the corresponding model card first.
Model Downloads
Recommended version: MiniCPM5-15B-A2.5B (BF16 / GGUF / MLX / GPTQ / LiteRT):
Q3_gud-LCO-GGUF and Q4_K_M-LCO-GGUF target llama.cpp-omni. On iOS, Q3_gud-LCO-GGUF is recommended for faster inference.
Quick Start
The three most common inference paths are shown below. The default context length is 524,288 tokens; if you run out of GPU memory, increase tensor parallelism or reduce the context length.
For thinking mode, MiniCPM5-15B-A2.5B recommends temperature=1.0, top_p=0.95, min_p=0.0.
vLLM (OpenAI-compatible server, NVIDIA GPU)
Requires the latest main branch or a nightly build that includes PR #69127 and PR #69128:
uv pip install -U vllm --torch-backend=auto --extra-index-url https://wheels.vllm.ai/nightly
vllm serve openbmb/MiniCPM5-15B-A2.5B --served-model-name MiniCPM5-15B-A2.5B --port 8000
Test request:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "MiniCPM5-15B-A2.5B",
"messages": [{"role": "user", "content": "Who are you? Please introduce yourself briefly."}],
"max_tokens": 512,
"temperature": 1.0,
"top_p": 0.95
}'
Replace the model path with MiniCPM5-15B-A2.5B-GPTQ to use the 4-bit quantized version.
SGLang (OpenAI-compatible server, NVIDIA GPU)
Requires the latest main branch that includes PR #52071 and PR #52072:
git clone https://github.com/sgl-project/sglang.git
cd sglang
pip install -e "python[all]"
python -m sglang.launch_server --model-path openbmb/MiniCPM5-15B-A2.5B --served-model-name MiniCPM5-15B-A2.5B --port 8000
Requests work the same way as with vLLM.
DSpark Speculative Decoding
We also release MiniCPM5-15B-A2.5B-DSpark, a draft model trained for MiniCPM5-15B-A2.5B. Enabling it speeds up decoding while keeping the target model's output unchanged.
# SGLang
python -m sglang.launch_server --model-path openbmb/MiniCPM5-15B-A2.5B --served-model-name MiniCPM5-15B-A2.5B --port 8000 \
--speculative-algorithm DSPARK \
--speculative-draft-model-path openbmb/MiniCPM5-15B-A2.5B-DSpark \
--speculative-dspark-block-size 7
# vLLM
vllm serve openbmb/MiniCPM5-15B-A2.5B --served-model-name MiniCPM5-15B-A2.5B --port 8000 \
--speculative-config '{"method":"dspark","model":"openbmb/MiniCPM5-15B-A2.5B-DSpark","num_speculative_tokens":7}'
Transformers (local Python inference, CPU or GPU)
The model architecture is MiniCPM5MoEForCausalLM, natively integrated into Transformers (minicpm5_moe), so trust_remote_code is not required.
pip install -U "transformers>=5.25.0" accelerate torch
Local inference test:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "openbmb/MiniCPM5-15B-A2.5B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="auto", device_map="auto")
messages = [{"role": "user", "content": "Who are you? Please introduce yourself briefly."}]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
enable_thinking=True, # set to False to disable thinking mode
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(
outputs[0][inputs["input_ids"].shape[-1]:],
skip_special_tokens=True,
))
Recommended sampling parameters:
- General tasks: thinking mode
temperature=1.0, top_p=0.95, min_p=0.0(addrepetition_penalty=1.05if repetition occurs); non-thinking modetemperature=0.7, top_p=0.80, top_k=20, min_p=0.0, presence_penalty=1.5. - Creative writing: thinking mode
temperature=0.7, top_p=0.95, min_p=0.0, repetition_penalty=1.05; non-thinking modetemperature=0.7, top_p=0.80, top_k=20, min_p=0.0, presence_penalty=0.5.
For other backends (llama.cpp / Ollama / LM Studio / MLX-VLM / vLLM Ascend / LiteRT-LM), see the Deployment Guide.
Tool Calling and Agent Integration
SGLang is recommended.
MiniCPM5-15B-A2.5B natively supports thinking mode, parallel multi-tool calls in a single turn, and long-horizon multi-turn agent workflows. Launch with the minicpm5 tool-call parser and the qwen3 reasoning parser to get OpenAI-compatible tool_calls and reasoning_content fields.
# SGLang
python -m sglang.launch_server --model-path openbmb/MiniCPM5-15B-A2.5B --served-model-name MiniCPM5-15B-A2.5B --port 8000 \
--tool-call-parser minicpm5 --reasoning-parser qwen3
# vLLM
vllm serve openbmb/MiniCPM5-15B-A2.5B --served-model-name MiniCPM5-15B-A2.5B --port 8000 \
--enable-auto-tool-choice --tool-call-parser minicpm5 --reasoning-parser qwen3
- Thinking mode is on by default. To turn it off for lower latency, pass
chat_template_kwargs: {"enable_thinking": false}for Chat Completions,reasoning: {"effort": "none"}for Responses, orthinking: {"type": "disabled"}for Anthropic Messages. - The current chat template does not strip historical reasoning. In multi-step tool calls and agent trajectories, send the earlier reasoning (
reasoning_content/reasoning/thinking) back with the history to keep the chain of thought coherent and improve the prefix KV cache hit rate. - Verified to work with Claude Code, Codex CLI / Desktop, DeepSeek Harness and WorkBuddy via CC Switch. For full request formats, multi-turn parallel calls and harness setup steps, see the Tool Usage Guide.
Running on iOS
Install MiniCPM-V-Apps via TestFlight, select MiniCPM5-15B-A2.5B in the model list and download it to run locally on iPhone. For detailed steps and FAQ, see Running MiniCPM5-15B-A2.5B on iOS.
Model Information
| Item | Details |
|---|---|
| Type | Causal Language Model (sparse MoE) |
| Architecture | MiniCPM5MoEForCausalLM |
| Parameters | 15B total, 2.5B activated |
| Layers / hidden size | 28 layers / 2,048 |
| Attention | Gated Attention, GQA with 32 Q heads / 2 KV heads, head dim 128 |
| Feed-forward | Layer 0 is a dense MLP (intermediate 8,192); layers 1–27 are MoE with 160 routed experts, 16 routed + 1 shared expert activated per token, expert intermediate 512 |
| Vocabulary size | 130,560 |
| Context length | 524,288 |
Related Resources
| Topic | Link |
|---|---|
| Deployment | MiniCPM5-15B-A2.5B Deployment Guide |
| Fine-tuning | MiniCPM5-15B-A2.5B Fine-tuning Guide |
| Tool calling | Tool Usage Guide |
| Running on iOS | Running MiniCPM5-15B-A2.5B on iOS |
| Online demo | MiniCPM5-15B-A2.5B Demo |
| Code repository | OpenBMB/MiniCPM |
| Agent Skills | Deployment and fine-tuning Skills |