MiniCPM 中文使用教程
2026-07-27发表于
Jupyter Notebook
0
0
项目速览(fallback 模板)
OpenBMB/MiniCPM 是一个基于 GitHub 的开源项目,目前拥有 10,042 颗 Star。该项目的主要语言为 Jupyter Notebook。
功能特点(fallback 模板)
详情请查阅项目的 README 文档。
快速开始
安装
git clone https://github.com/OpenBMB/MiniCPM.git
cd MiniCPM
基本使用
请参考项目 README 获取详细使用方法。
README 原文
<div align="center">
<img src="./assets/minicpm_logo.png" width="500em" ></img>
</div>
<h4 align="center">
<p>
<a href="https://github.com/OpenBMB/MiniCPM/blob/minicpm5/README-cn.md">中文</a> | <b>English</b>
<p>
</h4>
<p align="center">
<a href="https://arxiv.org/pdf/2506.07900" target="_blank">MiniCPM Tech Report</a> |
<a href="https://modelbest.feishu.cn/wiki/D2tFw8Pcsi5CIzkaHNacLK64npg" target="_blank">MiniCPM Wiki (in Chinese)</a> |
<a href="https://github.com/OpenBMB/MiniCPM-V/" target="_blank">MiniCPM-V Repo</a> |
<a href="https://ultradata.openbmb.cn/" target="_blank">UltraData</a>
</p>
<p align="center">
Join our <a href="https://discord.gg/3cGQn9b3YM" target="_blank">discord</a> and <a href="https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=559o65ab-9086-442a-96c9-cf382e80b22d" target="_blank">Feishu/Lark</a> |
<a href="https://mp.weixin.qq.com/s/KIhH2nCURBXuFXAtYRpuXg?poc_token=HBIsUWijxino8oJ5s6HcjcfXFRi0Xj2LJlxPYD9c">Join Us</a>
</p>
## ✨ Highlights
We are releasing **MiniCPM5-1B**, the first model in the **MiniCPM5** series. It is a dense 1B Transformer built for on-device, local deployment, and resource-constrained scenarios, reaching 1B-class open-source SOTA.
🏆 **1B-class open-source SOTA**: MiniCPM5-1B reaches an average score of 42.57 across reasoning, knowledge, code, instruction-following, math, logic and agentic benchmarks, above the highest average score of 35.61 among strong open-source models in the same size class; its strengths are most visible in agentic tool use, code, and competition math.

🧠 **Hybrid Reasoning**: built-in `<think>` chat template, switch via `enable_thinking`. The same checkpoint serves as both a fast assistant and a deliberate reasoner.
🛠️ **Deployment / Fine-tuning Agent Skills**: the repo provides single-page cookbooks for major inference backends and fine-tuning frameworks, each paired with an [Agent Skill](./skills/) to help developers reproduce deployment and fine-tuning workflows.
🐱 **Desktop Pet**: a local-LLM desktop pet driven by MiniCPM5-1B — see [Desktop Pet](#desktop-pet) below.
## 🔥 Changelog
- 📌 [2026.05.19] **[MiniCPM5-1B](https://huggingface.co/openbmb/MiniCPM5-1B)** is released: a compact 1B-class dense model for on-device and resource-constrained use, paired with deployment / fine-tuning [Agent Skills](./skills/).
- [2026.02.11] **[MiniCPM-SALA](https://huggingface.co/openbmb/MiniCPM-SALA)** is released: a sparse-and-linear hybrid attention model for million-token context modeling and efficient inference.
- [2025.09.05] **[MiniCPM4.1 series](https://huggingface.co/collections/openbmb/minicpm-4-6841ab29d180257e940baa9b)** is released: a trainable sparse-attention model with hybrid reasoning.
- [2025.06.06] **[MiniCPM4](https://huggingface.co/collections/openbmb/minicpm-4-6841ab29d180257e940baa9b)** is released: an end-side model with over 5x generation acceleration on typical edge chips.
<details>
<summary>Older entries (2024 + InfLLM-V2 paper)</summary>
- [2025.09.29] **[InfLLM-V2 paper](https://arxiv.org/abs/2509.24663) is released!** We can train a sparse attention model with only 5B long-text tokens.
- [2024.09.05] We release **[MiniCPM3-4B](https://huggingface.co/openbmb/MiniCPM3-4B)**! This model outperforms Phi-3.5-mini-instruct and GPT-3.5-Turbo-0125 and is comparable to several models with 7B-9B parameters like Llama3.1-8B-Instruct, Qwen2-7B-Instruct, and GLM-4-9B-Chat.
- [2024.07.05] Released **[MiniCPM-S-1B](https://huggingface.co/openbmb/MiniCPM-S-1B-sft)**! This model achieves an average sparsity of 87.89% in the FFN layer, reducing FFN FLOPs by 84%, while maintaining downstream task performance.
- [2024.04.11] Released **[MiniCPM-2B-128k](https://huggingface.co/openbmb/MiniCPM-2B-128k)**, **[MiniCPM-MoE-8x2B](https://huggingface.co/openbmb/MiniCPM-MoE-8x2B)** and **[MiniCPM-1B](https://huggingface.co/openbmb/MiniCPM-1B-sft-bf16)**! Click [here](https://openbmb.vercel.app/) to read our technical blog.
- [2024.02.01] Released **[MiniCPM-2B](https://huggingface.co/openbmb/MiniCPM-2B-sft-bf16)**! This model performs similarly to Mistral-7B on public benchmarks (with better performance in Chinese, math, and code abilities) and overall outperforms models like Llama2-13B, MPT-30B, and Falcon-40B.
</details>
## 🧭 Quick Links
- [✨ Highlights](#-highlights)
- [🔥 Changelog](#-changelog)
- [📦 Model Downloads](#-model-downloads)
- [🚀 MiniCPM5-1B](#-minicpm5-1b)
- [Introduction](#introduction)
- [Evaluation Results](#evaluation-results)
- [Training Recipe](#training-recipe)
- [What does RL + OPD bring?](#what-does-rl--opd-bring)
- [Quickstart](#quickstart)
- [Deployment and Fine-tuning Cookbooks and Agent Skills](#deployment-and-fine-tuning-cookbooks-and-agent-skills)
- [Other Supported Frameworks](#other-supported-frameworks)
- [Desktop Pet](#desktop-pet)
- [🧪 MiniCPM-SALA](#-mini
项目信息
| 项目 | 值 |
|---|---|
| 仓库 | OpenBMB/MiniCPM |
| 语言 | Jupyter Notebook |
| Star | 10,042 |
| Fork | 675 |
| 主页 | 无 |
参考链接
75
文章数
46
分类数
1
评论数
976
访问量
文章目录
评论