What is MiniCPM5-2B
MiniCPM5-2B is an on-device language foundation model jointly open-sourced by ModelBest, the OpenBMB community, and Tsinghua University. The model has approximately 2.5 billion parameters, supports 128K context, and scores an average of 53.9 across 34 benchmarks, surpassing a host of 4B-class models and achieving 2B-class open-source SOTA. The model packs Agent capabilities such as tool calling, deep search, and code generation into the device side, and can run on devices with 6GB of memory; it also open-sources its training data, the RL framework Meshy, and the JustRL II algorithm, making it a true on-device "little powerhouse."
Main Features of MiniCPM5-2B
-
On-Device Conversational Q&A: Runs the language model directly on local devices to handle daily Q&A, writing, summarization, and other tasks, with no need to upload data to the cloud.
-
Long-Text Understanding: Supports 128K context, and can locally process meeting minutes, contracts, and long documents and accurately extract key information.
-
Code Generation and Repair: From code completion to real repository-level repair (SWE-bench Verified 46.4), it can serve as a local coding assistant.
-
Tool Calling: Natively supports function calling and can invoke external tools on demand to perform queries, calculations, database interactions, and other operations.
-
Deep Search: Possesses search Agent capabilities and can autonomously plan multi-step retrieval and integrate answers.
-
Hybrid Reasoning: Switches between quick-response and deep-thinking modes via
enable_thinkingtoggles, balancing efficiency and solving difficult problems. -
Local Batch Tasks: Privacy-sensitive tasks such as resume screening, exam paper grading, and contract analysis can be processed in parallel on the device side at low cost.
Technical Principles of MiniCPM5-2B
-
Standard Dense Transformer Architecture: The model adopts a standard LlamaForCausalLM structure with a total of 42 layers, uses GQA to reduce KV Cache overhead, and natively supports 131,072 token context. Because the architecture is fully standard, mainstream frameworks such as vLLM, llama.cpp, and Ollama can load it natively without custom kernels.
-
Full-Pipeline Agent Capability Development: The Agent is purposefully prepared from the pretraining stage: first, 200B-scale Agent Midtraining is used to inject priors for task decomposition and tool use; then 500,000 SFT trajectories covering scenarios such as tool calling, web search, and code Agents teach the model standardized execution; finally, Agent RL alignment ensures stable policies in multi-turn interactions, forming a complete capability chain that is "runnable and easy to use."
-
Meshy Reinforcement Learning Framework: Meshy removes the central controller and Ray dependency of traditional RL training, modeling training, inference, and reward computation entirely as peer-to-peer node services, and uses the data readiness state in TransferQueue to drive the actual control flow. It can flexibly switch among synchronous, asynchronous, and fully asynchronous modes, making large-scale RL training easier to scale and lighter to deploy.
-
JustRL II Reward Learning Algorithm: Targeting the two major pain points in long chain-of-thought RL for on-device models—"reward signals biasing the model" and "coarse credit assignment in GRPO"—JustRL II uses a three-stage pipeline on the data side to calibrate training samples and introduces a Critic to GRPO on the algorithm side to achieve token-level credit assignment, precisely distinguishing the contribution of each step in a long reasoning chain.
-
UltraX Function-Calling-Style Data Refinement: UltraX abandons the traditional approach of end-to-end rewriting of web text by large models, and instead trains a 0.6B lightweight model to predict structured editing operations, which are then applied line by line by a deterministic executor—this avoids the semantic drift and structural damage caused by rewriting, and because the editing operations are saveable and auditable, it achieves full traceability. In practice, training on 16B tokens of refined corpus surpasses the fully trained performance on the original 20B tokens corpus.
-
UltraData tiered data governance system: Code data adopts progressive L0–L3 governance, and RL data goes through a three-stage pipeline to remove samples that are unverifiable, have untrustworthy rewards, or are mismatched in difficulty, using high-quality data signals to compensate for the capacity disadvantage of small models. This is the key engineering foundation for surpassing 4B models in capability with a small parameter count.
Follow on WeChat and reply “open source” to join theAI open-source project exchange group
How to use MiniCPM5-2B
- Confirm hardware requirements: The BF16 original weights are about 4.7GiB, or use the approximately 1.2GB GGUF quantized version to run on a phone with 6GB of memory or an ordinary laptop.
- Obtain model weights: Download the required version from HuggingFace or the ModelScope community, and choose formats such as BF16 / GGUF / MLX / GPTQ / SFT as needed.
- Install the inference framework: For cloud or high-concurrency scenarios, use vLLM (natively supported from ≥0.21.0, single-card TP=1 is sufficient); for local lightweight deployment, use llama.cpp, Ollama, or SGLang; for CPU environments, the self-developed Arclight framework from ModelBest can be used.
- Load and run the model: Load directly with the standard Llama architecture, with no custom kernel required.
- Switch thinking mode: Through the chat template's
enable_thinkingswitch, control fast response or deep reasoning, and choose the mode according to task difficulty. - Integrate tool calling/Agent: Leverage the model's native function calling and deep search capabilities, combined with the accompanying deployment Cookbook and Agent Skills, to build a local Agent workflow.
Core advantages of MiniCPM5-2B
- 2B-class open-source SOTA: Average score of 53.9 across 34 benchmarks, surpassing all tested 4B-class models, achieving more with less.
- Prototype of an end-side general Agent: Natively integrates core agent capabilities such as tool calling, deep search, and code generation. It ranks first on the Agent leaderboard with 20 points, ahead of larger models such as Granite 4.2 8B and Qwen3.5 9B.
- Extremely deployment-friendly: Standard Llama architecture + release in all formats; vLLM, Ollama, and llama.cpp can load it directly without modification; the INT4 version is only 1.2GB and can run on devices with 6GB of memory.
- Native 128K long context: A 130K-token context provides the capability foundation for local end-side processing of long documents such as meeting minutes and contracts.
- Full-chain open source: Not just weights—training data (the UltraData series), the RL framework (Meshy), the RL algorithm (JustRL II), and the training Recipe are all open-sourced, allowing complete reproduction and further innovation.
- Efficient inference: An average of about 21K output tokens per task, with token consumption lower than models of the same class, making end-side operation faster and more power-efficient.
- Broad chip ecosystem: Covers Day0 adaptation for AMD, Intel, MediaTek, Qualcomm, and 9 domestic chips including Ascend, Hygon, Kunlunxin, and Moore Threads.
MiniCPM5-2B project address
- GitHub repository:https://github.com/OpenBMB/MiniCPM
- HuggingFace Model Hub:https://huggingface.co/collections/openbmb/minicpm5
Comparison of MiniCPM5-2B with Similar Competing Products
| Dimension | MiniCPM5-2B | Qwen3.5-2B |
|---|---|---|
| Provider | ModelBest × OpenBMB × Tsinghua | Alibaba Tongyi |
| Parameter Scale | 2.52B (approximately 1.98B non-embedding) | Approximately 2B |
| Architecture | Dense, 42 layers, GQA 16Q/2KV | Dense,GQA |
| Native Context | 128K | 128K* |
| Open Source License | Apache 2.0 | Apache 2.0 |
| Release Format | BF16/GGUF/MLX/GPTQ/SFT/Base | GGUF/BF16, etc. |
Application Scenarios of MiniCPM5-2B
- Privacy-Sensitive Document Processing: Question answering and summarization for meeting minutes, contracts, and internal emails are completed locally, with data never leaving the device throughout the process.
- Recruitment and Human Resources: Local batch screening of resumes, extraction of candidate information, and structured comparison, avoiding uploading resumes to the cloud.
- On-Device Coding Assistant: Offline completion of code completion, debugging suggestions, and even repository-level defect fixing, ensuring the security of code assets.
- Local Deep Search: Automatic planning of multi-step web searches and integration of answers, suitable for research, price comparison, and information gathering.
- Education and Grading: Local batch parallel processing of exam paper grading, homework review, and error analysis, reducing costs for schools and educational training.