We are releasing
MiniCPM5-2B
, the second model in the
MiniCPM5
series, following
MiniCPM5-1B
. It is a dense 2B Transformer that scales up the same training recipe, built for on-device, local deployment, and resource-constrained scenarios, reaching 2B-class open-source SOTA.
🏆
2B-class open-source SOTA
: compared with strong open-source models of similar size, MiniCPM5-2B achieves SOTA performance within this comparison set. It remains competitive with 4B-class models overall, while showing its advantages over models of comparable size in coding, mathematics, long-context understanding, tool use, and agentic tasks.
📂
Open High-Quality Data
: Alongside the model, we are releasing the high-quality training datasets behind it as part of the
UltraData
family:
UltraX
, a high-quality web pre-training dataset;
UltraData-Code
, featuring L0–L3 tiered code data management to drive a significant leap in coding capabilities;
UltraData-SFT-Agent-2609
, comprising 500K agent training samples to enhance comprehensive on-device agent capabilities; and
UltraData-RL-2609
, with 80K+ high-quality RL training samples covering mathematics, code, general knowledge, and long-context reasoning.
Model List
Use this directory to choose the model format that matches your runtime:
Number of Non-Embedding Parameters
: 1,981,982,720
Number of Layers
: 42
Number of Attention Heads (GQA)
: 16 for Q and 2 for KV
Context Length
: 131,072
Introduction
MiniCPM5-2B is the second model in the MiniCPM5 series. It is designed for local assistants, coding agents, tool-use workflows, and reasoning scenarios where a compact model is preferred. The model keeps a small deployment footprint while providing native long-context support.
Evaluation Results
We compare
MiniCPM5-2B
with strong open-source models in the same size class, including
LFM2.5-2.6B
,
Qwen3.5-2B
, and
Gemma-4-E2B-it
, while also listing larger models such as
Qwen3.5-4B
,
granite-4.2-3B
,
Nemotron-3-Nano-4B
,
Gemma-4-E4B-it
, and
LFM2.5-8B-A1B
for reference.
Within this comparison set, MiniCPM5-2B reaches 2B-class open-source SOTA with an average score of
53.9
, and also exceeds all of the larger models included here (the highest is
51.1
). Its advantages are most visible in code reasoning, math reasoning, long-context understanding, tool use, and multiple agentic tasks.
Evaluation Results of MiniCPM5-2B and Baselines
MiniCPM5-2B
2B-class Models
4B-class Models
LFM2.5-2.6B
Qwen3.5-2B
Gemma-4-E2B-it
Qwen3.5-4B
granite-4.2-3B
Nemotron-3-Nano-4B
Gemma-4-E4B-it
LFM2.5-8B-A1B
Average
53.9
33.2
28.0
24.6
51.1
42.7
32.6
31.2
28.4
Code Reasoning
LiveCodeBench v6
69.1
42.1
20.2
42.9
56.4
58.9
50.7
53.9
39.8
LCB-Pro 25Q2 (Easy)
68.0
30.9
10.3
27.1
58.3
54.6
51.6
45.8
27.8
LCB-Pro 25Q2 (Medium)
17.5
0.0
0.0
0.0
7.0
5.3
5.3
1.8
0.0
OJBench
32.5
11.2
2.6
11.6
24.8
21.8
20.0
19.0
8.2
SciCode (wbg)
26.3
†
14.2
†
2.8
†
20.9
†
16.1
†
24.9
†
16.4
†
24.4
†
7.8
†
Math Reasoning
AIME 2025
86.5
41.9
29.6
31.7
78.8
79.4
56.3
37.1
46.0
AIME 2026
86.5
45.2
29.0
39.8
82.7
83.5
62.1
45.0
56.7
HMMT Feb 2026
63.8
33.7
20.5
17.8
64.0
60.8
51.3
30.1
38.5
MATH-500
94.6
89.6
85.8
85.4
99.0
97.0
91.6
88.2
93.2
Instruction Following
IFBench
66.3
59.0
46.0
25.7
59.0
73.0
58.3
28.3
51.0
IFEval
86.7
93.4
77.5
31.4
90.2
93.7
88.0
44.4
90.8
Multi-IF
71.8
76.8
57.1
40.3
73.6
75.9
65.9
45.9
71.4
General Knowledge
MMLU-Pro
70.8
65.2
64.3
56.0
78.0
65.8
65.7
68.3
63.1
MMLU-Redux
84.7
80.0
80.0
71.8
88.7
78.9
79.8
83.7
80.0
HLE
8.9
†
6.2
†
2.6
†
4.8
†
9.9
†
6.6
†
4.9
†
3.8
†
6.9
†
GPQA-Diamond
70.2
†
55.8
†
45.6
†
43.3
†
77.1
†
55.9
†
51.3
†
57.6
†
51.3
†
SuperGPQA
40.8
26.2
38.6
30.3
52.8
39.9
37.8
38.7
34.5
Long Context
AA-LCR
59.0
†
5.3
†
28.7
†
17.0
†
61.0
†
24.3
†
17.3
†
33.0
†
0.0
†
NoLiMa
68.1
0.7
17.1
3.9
43.5
5.1
1.1
2.3
0.5
LongBenchPro
44.8
23.7
8.2
42.2
58.4
34.8
27.9
53.5
19.6
LongBench v2
43.7
30.3
24.9
33.2
47.3
36.0
32.0
42.7
30.4
Tool Use
τ³-Bench Banking
20.8
†
7.2
†
2.1
3.9
6.8
†
5.6
†
1.2
4.1
3.4
τ²-Bench Telecom
97.1
90.4
69.0
†
20.8
†
92.1
†
40.9
28.1
†
20.8
†
16.1
†
BFCL v4
66.6
61.1
43.6
36.6
56.8
52.2
43.7
47.0
49.2
Coding Agent
SWE-bench Verified
46.4
6.0
5.0
2.0
33.6
36.8
3.0
15.0
0.4
SWE-bench Pro
14.4
0.6
0.8
0.0
28.2
12.3
0.1
3.3
0.4
Terminal-Bench v2.1
8.6
†
4.5
†
3.0
†
0.4
†
25.8
†
13.9
†
3.8
†
1.9
†
1.9
Search Agent
BrowseComp-ZH
43.5
9.8
18.2
4.7
39.6
21.1
3.3
7.0
13.2
BrowseComp Top100
39.7
13.7
19.3
6.0
33.3
19.0
4.7
6.3
9.7
GAIA Text-103
88.7
49.5
47.9
30.1
78.6
57.3
26.5
39.5
41.1
General Agent
GDPval-AA v2
19.6
†
4.5
0.0
0.0
11.7
0.0
†
0.0
0.0
0.0
Claw-Gym
59.2
19.3
25.5
31.3
51.6
60.0
33.7
37.9
2.7
WildClaw
23.9
10.2
9.2
8.9
17.0
20.0
8.9
14.3
4.5
QwenClaw
42.9
19.3
18.2
14.5
37.1
36.4
16.8
16.7
4.5
1.
Blue bold
indicates the best result across all models in the row (including 4B-class models);
Black bold
indicates the best result among 2B-class models.
2. Scores marked
†
come from the official Artificial Analysis release; all others are reproduced internally.
Training Recipe
The training of MiniCPM5-2B is a full-stack practice of
UltraData Tiered Data Management
, covering three stages: base training, mid-training, and post-training.
During
base training
, the model goes through stable training and decay training to build core language capability and training stability. It then enters
mid-training
to further strengthen target capabilities and adapt to the target data distribution. The training corpus is released alongside the model as
Ultra-FineWeb
,
Ultra-FineWeb-L3
,
UltraX
,
UltraData-Code
and
UltraData-Math
.
During
post-training
, we proceed in three steps:
SFT
,
RL
, and
OPD
. We first use
400B tokens of deep-thinking SFT
to establish deep-thinking and general chat abilities; the SFT data is released as
UltraData-SFT-2605
and the Agent SFT data is released as
UltraData-SFT-Agent-2609
. We then train specialized
RL teachers
for math, code, agentic tasks, writing, and related domains (with the corresponding data also open-sourced as
UltraData-RL-2609
), and use
On-Policy Distillation (OPD)
to distill these teachers back into one release model.
What does RL + OPD bring?
RL + OPD
is a key part of MiniCPM5-2B post-training. During the
RL
stage, we adopted the critic-based algorithm described in
JustRL II
, substantially improving training stability and achieving significant gains across multiple domains. On the benchmarks listed below, RL + OPD improves reasoning and general capabilities by an average of
↑10.96 points
, and agentic capabilities by
↑6.96 points
.
OPD
merges the capabilities of 16 expert models produced by RL training, including 5 agentic expert models. At each response position, we compute the full-vocabulary reverse KL divergence between student and teacher logits as the advantage estimate, replacing the original verification-based advantage. OPD directly reuses the prompts used to train each RL teacher as distillation data, so no additional corpus construction is required.
Speculative decoding (DSpark)
: we also release
MiniCPM5-2B-DSpark
, a DSpark draft model trained for MiniCPM5-2B. Enable it in SGLang to accelerate decoding while keeping the target model's outputs unchanged:
For tool / function calling,
SGLang is the recommended backend
. MiniCPM5-2B emits XML-style tool calls and SGLang's built-in
minicpm5
parser converts them to OpenAI-compatible
tool_calls
natively:
MiniCPM5-2B uses the
standard
LlamaForCausalLM
architecture
, so mainstream inference engines can load it directly:
no custom kernels, no model-code fork
. For step-by-step deployment and fine-tuning instructions, use the GitHub cookbooks below. Agent Skills are linked as GitHub resources for users working with Cursor / Claude Code style coding agents.
In addition to the deployment and fine-tuning frameworks listed above, MiniCPM5-2B is also supported by FlagOS for multi-chip deployment.
FlagOS Overview
To enable large-scale deployment across different AI chips, Beijing Zhiyuan Research Institute, together with numerous research institutions, chip manufacturers, system vendors, and algorithm and software organizations both domestically and internationally, jointly initiated and established the FlagOS Open Source Community.
The FlagOS community is dedicated to building a unified, open-source system software stack for various AI chips, encompassing core open-source projects such as a large-scale operator library, a unified AI compiler, parallel training and inference frameworks, and a unified communication library. It aims to create an open technology ecosystem connecting the “model-system-chip” layers. By enabling “develop once, deploy across chips”, FlagOS unlocks the computational potential of hardware, breaks down the ecosystem silos between different chip software stacks, and effectively reduces migration costs for developers.The FlagOS community fosters an AI hardware and software ecosystem, overcomes single-vendor closed-source monopolies, promotes widespread deployment of AI hardware technologies, and is committed to rooted in China while embracing global collaboration.
Thanks to FlagOS’s unified multi-chip AI system software stack, MiniCPM5-2B was adapted to 9 different AI chips in an extremely short time. Currently, the multi-chip version of MiniCPM5-2B has been released on FlagRelease, FlagOS’s platform for automatic migration, adaptation, and deployment of large models across multi-architecture AI chips. Details are as follows:
FlagRelease is a platform developed by the FlagOS team for automatic migration, adaptation, and deployment of large models across multi-architecture AI chips. The multi-chip version of MiniCPM5-2B has already been released on FlagRelease. All necessary software packages are pre-installed on the platform, so users do not need to install anything.
vllm-plugin-FL
is a plugin built for the vLLM inference/service framework. Developed on top of FlagOS’s unified multi-chip backend, it is designed to extend vLLM’s capabilities and performance across a variety of hardware environments.
This model has no autonomous intent or legal personhood; its outputs are text generated from statistical patterns and may be inaccurate, biased, or offensive, and may be manipulated by carefully crafted prompts ("jailbreaks") into producing unintended content. Its responses on sensitive topics such as politics, health, finance, and law are not reviewed by experts and should not be treated as professional advice.
This model is provided "
AS IS
", without warranty of any kind, express or implied, and the developers are not liable for any damages arising from its use. Users must employ the model only for lawful, compliant, and ethical purposes, configure their own safeguards, and label AI-generated content where required; deliberate jailbreaking, injection attacks, or inducing harmful output is prohibited, and any such testing is at the user's own risk.
License
This repository and MiniCPM model weights are released under the
Apache-2.0
License.
Citation
Please cite our paper if you find our work valuable:
@article{minicpm4,
title={Minicpm4: Ultra-efficient llms on end devices},
author={MiniCPM, Team},
journal={arXiv preprint arXiv:2506.07900},
year={2025}
}
Runs of openbmb MiniCPM5-2B-Base on huggingface.co
3.1K
Total runs
285
24-hour runs
3.0K
3-day runs
3.1K
7-day runs
3.1K
30-day runs
More Information About MiniCPM5-2B-Base huggingface.co Model
MiniCPM5-2B-Base huggingface.co is an AI model on huggingface.co that provides MiniCPM5-2B-Base's model effect (), which can be used instantly with this openbmb MiniCPM5-2B-Base model. huggingface.co supports a free trial of the MiniCPM5-2B-Base model, and also provides paid use of the MiniCPM5-2B-Base. Support call MiniCPM5-2B-Base model through api, including Node.js, Python, http.
MiniCPM5-2B-Base huggingface.co is an online trial and call api platform, which integrates MiniCPM5-2B-Base's modeling effects, including api services, and provides a free online trial of MiniCPM5-2B-Base, you can try MiniCPM5-2B-Base online for free by clicking the link below.
openbmb MiniCPM5-2B-Base online free url in huggingface.co:
MiniCPM5-2B-Base is an open source model from GitHub that offers a free installation service, and any user can find MiniCPM5-2B-Base on GitHub to install. At the same time, huggingface.co provides the effect of MiniCPM5-2B-Base install, users can directly use MiniCPM5-2B-Base installed effect in huggingface.co for debugging and trial. It also supports api for free installation.