MiniCPM5-2B Benchmarked: A 2B Model Scores 46.4 on SWE-bench

OpenBMB's MiniCPM5-2B scores 46.4 on SWE-bench with 2B parameters and runs fully offline for free.
OpenBMB's MiniCPM5-2B is a 2-billion-parameter on-device model that scores 46.4 on SWE-bench, dominating the 2B tier and outperforming several 4B models. Its capabilities stem from reinforcement learning combined with OPD distillation — condensing 16 expert models (including 5 agent experts) into a single small model, with ~500K agent training samples and 80K+ RL samples also released openly. Using a LLaMA architecture, it runs offline via llama.cpp with no API keys required, under the permissive Apache 2.0 license. This marks a genuine convergence of open-source, free, local, and near-SOTA AI in a single deployable package.
A model with just 2 billion parameters is rewriting the ceiling of on-device AI. MiniCPM5-2B, released by OpenBMB, scored 46.4 on SWE-bench — not only outpacing every other model in the 2B class, but beating 4B competitors with twice the parameter count. What makes this even more remarkable: it's open-source, free, commercially usable, and runs fully offline on a personal computer.
Why a 2B Model Can Beat Much Larger Ones
MiniCPM5-2B's core value proposition is squeezing dramatically outsized performance out of a minimal parameter budget. According to hands-on testing covered by a Bilibili creator, the model scored 46.4 on SWE-bench — a benchmark measuring real-world code repair ability — a result that dominates the 2B tier and holds its own against 4B-class models.
Its capabilities are broad: 128K native context, tool calling, code reasoning, mathematical reasoning, and long-document understanding — features typically associated with much larger models — are all packed into this compact package.

For users accustomed to the intuition that "bigger parameters means better performance," this seems counterintuitive. But there's a clear engineering philosophy behind it: compensate for scale limitations through superior training methods.
SWE-bench is a code evaluation benchmark proposed by Princeton University. It draws real issues from GitHub software repositories and asks models to automatically generate code patches to fix bugs based on problem descriptions. Unlike simple code completion tasks, SWE-bench tests a model's ability to understand real engineering context, locate relevant files within a codebase, and produce complete fixes that pass automated tests. Because the scenarios closely mirror actual engineering work, the industry widely treats SWE-bench scores as a key indicator of "programming agent practicality" rather than a pure code generation metric. A score of 46.4 means the model can successfully fix nearly half of real-world software bugs — an exceptionally rare achievement at the 2B scale.
Where the Capability Comes From: Expert Distillation and Reinforcement Learning
MiniCPM5-2B's development approach is worth unpacking. OpenBMB combined reinforcement learning with OPD (Omni-domain Policy Distillation) to channel the capabilities of 16 expert models — including 5 dedicated agent experts — into a single 2B model.
In other words, this small model didn't learn everything from scratch. Instead, through distillation and reinforcement learning, the strengths of multiple specialized models were "concentrated" into one. This explains how it manages to excel simultaneously across code, math, and tool-calling tasks.

Equally notable is the openness of the training data. Reportedly, this release includes the training data as well — approximately 500,000 agent samples and over 80,000 reinforcement learning samples. For researchers and those looking to reproduce results, open training data is even more significant than open model weights: it means the methodology can be independently verified and iterated upon.
Knowledge Distillation is a training technique for transferring capabilities from a large model (teacher) to a smaller model (student), systematically formalized by Hinton et al. in 2015. Traditional distillation is typically one-to-one: one large teacher guides one small student. MiniCPM5-2B's OPD (Omni-domain Policy Distillation) approach is more ambitious: it simultaneously incorporates 16 teacher models, each specialized in a different domain, enabling the small model to absorb multiple capability streams in a single training run. The reinforcement learning component then uses reward signals to continuously optimize the model on tasks like tool calling and multi-step reasoning. Together, these techniques significantly increase the model's "effective capability density" — the range of tasks it can handle per unit of parameters — compared to a conventionally trained model of the same size.
Local Deployment: No API Keys, Data Never Leaves Your Machine
What truly makes MiniCPM5-2B practically useful is its low deployment barrier. The model uses a standard LLaMA architecture and runs out of the box with llama.cpp — no API keys, no internet connection required. Your own computer is its runtime environment.

This combination is particularly well-suited for three groups of users:
- Laptop users: Even offline, you get a near-SOTA local assistant;
- Privacy-conscious users: All data is processed locally — nothing is uploaded to any cloud;
- Developers: Native tool-calling support lets you build fully local agent applications right away.
The license is Apache 2.0 — one of the most permissive in the open-source world, with no extra approval needed for commercial use.
llama.cpp is an open-source inference framework developed by Georgi Gerganov, designed to efficiently run large language models on CPUs and consumer-grade GPUs. Its core technique is quantization: compressing model weights from 32-bit or 16-bit floating point down to 4-bit or lower integer precision, dramatically reducing memory requirements while preserving as much inference quality as possible. For MiniCPM5-2B, the original model weights are approximately 4 GB; after Q4 quantization, this shrinks to around 1.5 GB — well within the reach of a standard laptop with no dedicated GPU. The LLaMA architecture compatibility ensures the model can be recognized and loaded by llama.cpp directly, without any format conversion, which is an important engineering consideration behind OpenBMB's architecture choice.
What This Signals for On-Device AI
More significant than the model itself is the trend it represents. When a 2B model can handle tasks that previously required an 8B model, AI compute is clearly shifting from cloud data centers toward individual endpoint devices.

"Open-source, free, local, and SOTA" — these four qualities have rarely coexisted in a single model. MiniCPM5-2B is arguably the first to genuinely deliver all four at once. This signals that on-device AI is no longer just a synonym for "watered-down cloud models" — it can now serve as a standalone solution capable of handling serious production workloads.
That said, small models like this still have limits. A SWE-bench score of 46.4, while impressive, still trails the top-tier cloud models. For complex long-chain reasoning or massive-scale knowledge Q&A, local small models may not fully replace cloud-based solutions. Their value lies more in being "good enough, private, and portable" than in "across-the-board superiority."
How to Get Started
For users who want to try it out, the path is straightforward: pull the model from ModelScope and run it locally with llama.cpp. The entire process requires no internet connection or API key configuration — ideal for quick experimentation.
For developers, the more exciting angle is its native tool-calling capability, which provides a ready-made foundation for building fully local, data-sovereign AI agent applications. As models like this continue to improve, local agents may well become the next frontier worth serious investment.
Related articles

Letting AI Build AI Tools: A 7-Day, 31-Commit Bootstrapping Post-Mortem
An engineer ran a fully autonomous AI-builds-AI pipeline for 7 days, 31 commits, with a 1-in-6 success rate. This post-mortem covers 5 failure types, 11 structural rules, and how every mistake became a permanent immunity gate.

Building an AI-Powered E-Commerce Business from Scratch: A Real-World Account of Multi-Agent Architecture for Print-on-Demand
A blogger builds a print-on-demand e-commerce company from scratch using AI agents — documenting specialized Agent profiles, GPT-5.6 vs Claude Fable multi-model orchestration, and reusable skill accumulation.

AI Agent Earns $10K in One Week: 3 Key Upgrades Explained
A blogger shares how he earned $10K in a week with an AI Agent — not by adding more skills, but through verification, approval gates, and subagents to raise trust and enable true automation.