[GH-ISSUE #2383] Add support to MiniCPM-2B model #63422

Closed
opened 2026-05-03 13:26:24 -05:00 by GiteaMirror · 16 comments
Owner

Originally created by @ShengdingHu on GitHub (Feb 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2383

Thank you for your exceptional framework. We have developed a end-side Large Language Model MiniCPM and would like to integrate it with the supported models of ollama.

Here's our repository: MiniCPM on GitHub
Here‘s our blog: How to Build MiniCPM

Following the discussions in the Llama.cpp issue tracker (see https://github.com/ggerganov/llama.cpp/issues/5276), we have successfully converted our model into the GGML format. I have also personally managed to run it successfully on my Mac.

My question is: How can we get official support in Ollama, so that users can easily use the command ollama run minicpm to try out our model?

Thank you in advance for your assistance!

Originally created by @ShengdingHu on GitHub (Feb 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2383 Thank you for your exceptional framework. We have developed a end-side Large Language Model MiniCPM and would like to integrate it with the supported models of ollama. Here's our repository: [MiniCPM on GitHub](https://github.com/OpenBMB/MiniCPM) Here‘s our blog: [How to Build MiniCPM](https://shengdinghu.notion.site/MiniCPM-Unveiling-the-Potential-of-End-side-Large-Language-Models-d4d3a8c426424654a4e80e42a711cb20) Following the discussions in the Llama.cpp issue tracker (see https://github.com/ggerganov/llama.cpp/issues/5276), we have successfully converted our model into the GGML format. I have also personally managed to run it successfully on my Mac. My question is: How can we get official support in Ollama, so that users can easily use the command `ollama run minicpm` to try out our model? Thank you in advance for your assistance!
GiteaMirror added the model label 2026-05-03 13:26:24 -05:00
Author
Owner

@da-z commented on GitHub (Feb 7, 2024):

I am very interested in trying this model too in OIlama. I see someone made a GGUF for it, so making a Modelfile may not be that hard.

<!-- gh-comment-id:1931844499 --> @da-z commented on GitHub (Feb 7, 2024): I am very interested in trying this model too in OIlama. I see someone made a [GGUF](https://huggingface.co/s3nh/MiniCPM-2B-dpo-fp32-GGUF/tree/main) for it, so making a Modelfile may not be that hard.
Author
Owner

@ShengdingHu commented on GitHub (Feb 8, 2024):

I meet a error when using this GGUF: Error: error loading model /Users/hushengding/.ollama/models/blobs/sha256:a2bab651ac9345c67d37eba3d011b055f4e7af513181b0f4854c23ac21d4

This is my ModelFile.

FROM minicpm-2b-dpo-fp32.fp16.bin
# sets the temperature to 1 [higher is more creative, lower is more coherent]
PARAMETER temperature 0.5
# sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token
PARAMETER num_ctx 4096

# sets a custom system message to specify the behavior of the chat assistant
TEMPLATE """<用户>{{ .Prompt }}<AI>"""

What might cause that error?

<!-- gh-comment-id:1934521100 --> @ShengdingHu commented on GitHub (Feb 8, 2024): I meet a error when using this [GGUF](https://huggingface.co/s3nh/MiniCPM-2B-dpo-fp32-GGUF/tree/main): Error: error loading model /Users/hushengding/.ollama/models/blobs/sha256:a2bab651ac9345c67d37eba3d011b055f4e7af513181b0f4854c23ac21d4 This is my ModelFile. ``` FROM minicpm-2b-dpo-fp32.fp16.bin # sets the temperature to 1 [higher is more creative, lower is more coherent] PARAMETER temperature 0.5 # sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token PARAMETER num_ctx 4096 # sets a custom system message to specify the behavior of the chat assistant TEMPLATE """<用户>{{ .Prompt }}<AI>""" ``` What might cause that error?
Author
Owner

@ShengdingHu commented on GitHub (Feb 12, 2024):

I have tried another gguf MiniCPM-2B-dpo-fp16-gguf , but I still encounter the same error. This gguf works fine in llama.cpp

image

Does anyone know what might be the cause?

<!-- gh-comment-id:1938886117 --> @ShengdingHu commented on GitHub (Feb 12, 2024): I have tried another gguf [MiniCPM-2B-dpo-fp16-gguf](https://huggingface.co/runfuture/MiniCPM-2B-dpo-fp16-gguf) , but I still encounter the same error. This gguf works fine in llama.cpp ![image](https://github.com/ollama/ollama/assets/32740627/44ca3011-6477-4e98-9a2e-8e87e881e065) Does anyone know what might be the cause?
Author
Owner

@lewdon commented on GitHub (Feb 13, 2024):

needed too

<!-- gh-comment-id:1941163871 --> @lewdon commented on GitHub (Feb 13, 2024): needed too
Author
Owner

@Mortezanavidi commented on GitHub (Feb 13, 2024):

same as well, ollama can't run minicpm models

<!-- gh-comment-id:1942490467 --> @Mortezanavidi commented on GitHub (Feb 13, 2024): same as well, ollama can't run minicpm models
Author
Owner

@wangfeng35 commented on GitHub (Feb 23, 2024):

need support

<!-- gh-comment-id:1960718468 --> @wangfeng35 commented on GitHub (Feb 23, 2024): need support
Author
Owner

@chllei commented on GitHub (Mar 4, 2024):

MiniCPM is very suitable for running on laptops. I hope Ollama's official version can adapt to it.

<!-- gh-comment-id:1975644795 --> @chllei commented on GitHub (Mar 4, 2024): MiniCPM is very suitable for running on laptops. I hope Ollama's official version can adapt to it.
Author
Owner

@ShengdingHu commented on GitHub (Mar 4, 2024):

Will ollama official help us in solving this problem :) thanks alot in advance!

I have tried another gguf MiniCPM-2B-dpo-fp16-gguf , but I still encounter the same error. This gguf works fine in llama.cpp

image

Does anyone know what might be the cause?

<!-- gh-comment-id:1976007305 --> @ShengdingHu commented on GitHub (Mar 4, 2024): Will ollama official help us in solving this problem :) thanks alot in advance! > I have tried another gguf [MiniCPM-2B-dpo-fp16-gguf](https://huggingface.co/runfuture/MiniCPM-2B-dpo-fp16-gguf) , but I still encounter the same error. This gguf works fine in llama.cpp > > ![image](https://private-user-images.githubusercontent.com/32740627/304135075-44ca3011-6477-4e98-9a2e-8e87e881e065.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDk1NDEzNzIsIm5iZiI6MTcwOTU0MTA3MiwicGF0aCI6Ii8zMjc0MDYyNy8zMDQxMzUwNzUtNDRjYTMwMTEtNjQ3Ny00ZTk4LTlhMmUtOGU4N2U4ODFlMDY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzA0VDA4MzExMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdjZTFmYjlhMTczMGM3ZDlmNWZjZDQxMDY3MmUwNGNiMDMwZWNlZmNiZjU1YzU3NDgyM2ExYjIwYzBhZWE5MTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.CpjoUlDOL8kMrd_p1NpjOntFKRU74cMN7q00QBpRZEQ) > > Does anyone know what might be the cause?
Author
Owner

@yqchen-sci commented on GitHub (Mar 4, 2024):

@ShengdingHu I found that this model can run perfectly on my laptop. Can you find out where the problem is?

<!-- gh-comment-id:1976019973 --> @yqchen-sci commented on GitHub (Mar 4, 2024): @ShengdingHu I found that [this model](https://ollama.com/roger/minicpm) can run perfectly on my laptop. Can you find out where the problem is?
Author
Owner

@ShengdingHu commented on GitHub (Mar 4, 2024):

Great, thanks for your help. But the performance of this checkpoint is not satisfying (see the figure). I wonder could this gguf get supported? https://huggingface.co/runfuture/MiniCPM-2B-dpo-fp16-gguf

image

@ShengdingHu I found that this model can run perfectly on my laptop. Can you find out where the problem is?

<!-- gh-comment-id:1976141296 --> @ShengdingHu commented on GitHub (Mar 4, 2024): Great, thanks for your help. But the performance of this checkpoint is not satisfying (see the figure). I wonder could this gguf get supported? https://huggingface.co/runfuture/MiniCPM-2B-dpo-fp16-gguf <img width="676" alt="image" src="https://github.com/ollama/ollama/assets/32740627/28a5e1d2-66f1-46eb-95f4-8437ab789198"> > @ShengdingHu I found that [this model](https://ollama.com/roger/minicpm) can run perfectly on my laptop. Can you find out where the problem is?
Author
Owner

@ShengdingHu commented on GitHub (Mar 4, 2024):

I suprisingly found that after I updated ollama verison, the sha:256 related problem disappears. I will work on the performance of this quantized model recently. Thanks for the community's attention.

<!-- gh-comment-id:1976153733 --> @ShengdingHu commented on GitHub (Mar 4, 2024): I suprisingly found that after I updated ollama verison, the sha:256 related problem disappears. I will work on the performance of this quantized model recently. Thanks for the community's attention.
Author
Owner

@zhao1012 commented on GitHub (Mar 18, 2024):

我将MiniCPM-2B-dpo-bf16-gguf.gguf模型成功的导入到了ollama中,并运行起来了。但是在推理的过程中,发现模型再说胡话,臆想比较严重。详见截图
miniCPM-2b 在ollama上乱说话

<!-- gh-comment-id:2002754353 --> @zhao1012 commented on GitHub (Mar 18, 2024): 我将MiniCPM-2B-dpo-bf16-gguf.gguf模型成功的导入到了ollama中,并运行起来了。但是在推理的过程中,发现模型再说胡话,臆想比较严重。详见截图 ![miniCPM-2b 在ollama上乱说话](https://github.com/ollama/ollama/assets/38517343/8f68f251-d07d-4ea5-95a1-59dde7a84bf4)
Author
Owner

@ipfans commented on GitHub (Mar 18, 2024):

@zhao1012 this is an issue tracking for Ollama, please stay on topic. For issues of MiniCPM-2B, please contact @ShengdingHu or open an issue in the MiniCPM repository to learn how to avoid.

<!-- gh-comment-id:2002774465 --> @ipfans commented on GitHub (Mar 18, 2024): @zhao1012 this is an issue tracking for Ollama, please stay on topic. For issues of MiniCPM-2B, please contact @ShengdingHu or open an issue in the MiniCPM repository to learn how to avoid.
Author
Owner

@chllei commented on GitHub (Apr 11, 2024):

@ShengdingHu Hi, I see that your team have released the MoE version of the model. Would it be possible for you to provide the GGUF quantization model files?

<!-- gh-comment-id:2049025944 --> @chllei commented on GitHub (Apr 11, 2024): @ShengdingHu Hi, I see that your team have released the MoE version of the model. Would it be possible for you to provide the GGUF quantization model files?
Author
Owner

@nuaabuaa07 commented on GitHub (Jun 5, 2024):

I suprisingly found that after I updated ollama verison, the sha:256 related problem disappears. I will work on the performance of this quantized model recently. Thanks for the community's attention.

hello,I install ollama today ,and run ” ollama pull MiniCPM-2B “ ,and it failed. Can you tell me your ollama version ,thinks

<!-- gh-comment-id:2149878186 --> @nuaabuaa07 commented on GitHub (Jun 5, 2024): > I suprisingly found that after I updated ollama verison, the sha:256 related problem disappears. I will work on the performance of this quantized model recently. Thanks for the community's attention. hello,I install ollama today ,and run ” ollama pull MiniCPM-2B “ ,and it failed. Can you tell me your ollama version ,thinks
Author
Owner

@rick-github commented on GitHub (Jan 8, 2026):

$ ollama run hf.co/runfuture/MiniCPM-2B-dpo-fp16-gguf hello
pulling manifest 
pulling 0419947b9674: 100% ▕███████████████████████████████████████████████████████▏ 5.5 GB                         
pulling b2574423288d: 100% ▕███████████████████████████████████████████████████████▏   25 B                         
pulling 44136fa355b3: 100% ▕███████████████████████████████████████████████████████▏    2 B                         
pulling 315370a2e506: 100% ▕███████████████████████████████████████████████████████▏  558 B                         
verifying sha256 digest 
writing manifest 
success 
 Hello! I'm here to help you with any questions or concerns you may have. Feel free to ask anything, and I will do my best to provide helpful information or guidance.

For the official ollama library model (2.6):

$ ollama run minicpm-v hello
Hello! How can I help you today? Is there something specific on your mind that you'd like
to discuss or learn more about? As an AI language model, I'm here to provide information
and answer questions. Let me know how I can assist you better.
<!-- gh-comment-id:3722950044 --> @rick-github commented on GitHub (Jan 8, 2026): ```console $ ollama run hf.co/runfuture/MiniCPM-2B-dpo-fp16-gguf hello pulling manifest pulling 0419947b9674: 100% ▕███████████████████████████████████████████████████████▏ 5.5 GB pulling b2574423288d: 100% ▕███████████████████████████████████████████████████████▏ 25 B pulling 44136fa355b3: 100% ▕███████████████████████████████████████████████████████▏ 2 B pulling 315370a2e506: 100% ▕███████████████████████████████████████████████████████▏ 558 B verifying sha256 digest writing manifest success Hello! I'm here to help you with any questions or concerns you may have. Feel free to ask anything, and I will do my best to provide helpful information or guidance. ``` For the official ollama library model (2.6): ```console $ ollama run minicpm-v hello Hello! How can I help you today? Is there something specific on your mind that you'd like to discuss or learn more about? As an AI language model, I'm here to provide information and answer questions. Let me know how I can assist you better. ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#63422