Model reference · open weights
MiniCPM-sft is an open-weight language model from openbmb. MiniCPM-2B-sft-bf16 (BF16) weighs 5.4 GB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the openbmb/MiniCPM-2B-sft-bf16 model card, 2026-10-01
What it is
| Released by | openbmb |
|---|---|
| Released | 2024-01-29 |
| VRAM | 5.4 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory |
|---|---|---|---|
| 4K each | |||
| RTX 3060 12 GB | 3 | all 4K | 11.6 GB |
| RTX 4060 Ti 16 GB | 6 | all 4K | 15.4 GB |
| RTX 3090 24 GB | 11 | all 4K | 23.4 GB |
| RTX 4090 24 GB | 11 | all 4K | 23.4 GB |
| RTX 5090 32 GB | 16 | all 4K | 31.0 GB |
| L40S 48 GB | 25 | all 4K | 44.0 GB |
| A100 80 GB | 47 | all 4K | 78.2 GB |
| H100 80 GB | 45 | all 4K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 55 | all 4K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 64 | all 4K | 107 GB |
| H200 141 GB | 84 | all 4K | 138 GB |
| B200 180 GB | 109 | all 4K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 10 | all 4K | 11.6 GB a card |
| 2× RTX 4060 Ti 16 GB tensor parallel | 15 | all 4K | 15.4 GB a card |
| Requests at once | 4K tokens each |
|---|---|
| 1 | 7.6 GB |
| 5 | 13.6 GB |
| 8 | 18.2 GB |
| 16 | 30.2 GB |
| 32 | 54.4 GB |
| 64 | 103 GB |
One card, with vLLM's small-card settings.
From the model card
MiniCPM
MiniCPM 是面壁与清华大学自然语言处理实验室共同开源的系列端侧语言大模型,主体语言模型 MiniCPM-2B 仅有 24亿(2.4B)的非词嵌入参数量。
我们将完全开源MiniCPM-2B的模型参数供学术研究和有限商用,以及训练过程中的所有Checkpoint和大部分非专有数据供模型机理研究。
MiniCPM is an End-Size LLM developed by ModelBest Inc. and TsinghuaNLP, with only 2.4B parameters excluding embeddings.
We release all model parameters for research and limited commercial use. We also release all the checkpoint during training and most public training data for research on model mechanism.
详细的评测结果位于github仓库
Detailed evaluation results are in github repo
注意:我们发现使用Huggingface生成质量略差于vLLM,因此推荐使用vLLM进行测试。我们正在排查原因。
Notice: We discovered that the quality of Huggingface generation is slightly lower than vLLM, thus benchmarking using vLLM is recommended. We are investigating the cause now.
受限于模型规模,模型可能出现幻觉性问题。其中由于DPO模型生成的回复内容更长,更容易出现幻觉。我们也将持续进行MiniCPM模型的迭代改进;
为了保证在学术研究用途上模型的通用性,我们未对模型进行任何身份认同训练。同时由于我们用ShareGPT开源语料作为部分训练数据,模型可能会输出类似GPT系列模型的身份认同信息;
受限于模型规模,模型的输出受到提示词(prompt)的影响较大,可能多次尝试产生不一致的结果;
受限于模型容量,模型的知识记忆较不准确,后续我们将结合RAG方法来增强模型的知识记忆能力。
Due to limitations in model size, the model may experience hallucinatory issues. As DPO model tend to generate longer response, hallucinations are more likely to occur. We will also continue to iterate and improve the MiniCPM model.
To ensure the universality of the model for academic research purposes, we did not conduct any identity training on the model. Meanwhile, as we use ShareGPT open-source corpus as part of the training data, the model may output identity information similar to the GPT series models.
Due to the limitation of model size, the output of the model is greatly influenced by prompt words, which may result in inconsistent results from multiple attempts.
Due to limited model capacity, the model's knowledge memory is not accurate. In the future, we will combine the RAG method to enhance the model's knowledge memory ability.
| HuggingFace | ModelScope | WiseModel |
|---|---|---|
| sft-bf16 | sft-bf16 | sft-bf16 |
| sft-fp32 | sft-fp32 | sft-fp32 |
| dpo-bf16 | dpo-bf16 | dpo-bf16 |
| dpo-fp16 | dpo-fp16 | dpo-fp16 |
| dpo-fp32 | dpo-fp32 | dpo-fp32 |
transformers>=4.36.0以及accelerate后,运行以下代码from_pretrained中明确指明模型的数据类型,否则会引起较大计算误差transformers>=4.36.0 and acceleratefrom transformers import AutoModelForCausalLM, AutoTokenizer
import torch
torch.manual_seed(0)
path = 'openbmb/MiniCPM-2B-sft-bf16'
tokenizer = AutoTokenizer.from_pretrained(path)
model = AutoModelForCausalLM.fQuoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.