π Model Description
tags:
- minicpm-o
- openbmb/MiniCPM-o-2_6
A GPT-4o Level MLLM for Vision, Speech and Multimodal Live Streaming on Your Phone
GitHub | Online Demo | Technical Blog | Join Us
MiniCPM-o 2.6
This repository contains the MiniCPM-o 2.6 model weights in GGUF format, used for llama.cpp.
Currently, this readme only supports minicpm-omni's vision capabilities, and we will update the full-mode support as soon as possible.
Prepare models and code
Download MiniCPM-o-26 PyTorch model from huggingface to "MiniCPM-o-26" folder.
Clone llama.cpp:
git clone [email protected]:OpenBMB/llama.cpp.git
cd llama.cpp
git checkout minicpm-omni
Usage of MiniCPM-o 2.6
Convert PyTorch model to gguf files (You can also download the converted gguf by us)
python ./examples/llava/minicpmv-surgery.py -m ../MiniCPM-o-2_6
python ./examples/llava/minicpmv-convert-image-encoder-to-gguf.py -m ../MiniCPM-o-26 --minicpmv-projector ../MiniCPM-o-26/minicpmv.projector --output-dir ../MiniCPM-o-26/ --image-mean 0.5 0.5 0.5 --image-std 0.5 0.5 0.5 --minicpmvversion 4
python ./converthftogguf.py ../MiniCPM-o-26/model
quantize int4 version
./llama-quantize ../MiniCPM-o-26/model/ggml-model-f16.gguf ../MiniCPM-o-26/model/ggml-model-Q4KM.gguf Q4KM
Build llama.cpp using CMake:
https://github.com/ggerganov/llama.cpp/blob/master/docs/build.md
cmake -B build
cmake --build build --config Release
Inference on Linux or Mac
# run f16 version
./llama-minicpmv-cli -m ../MiniCPM-o-26/model/ggml-model-f16.gguf --mmproj ../MiniCPM-o-26/mmproj-model-f16.gguf -c 4096 --temp 0.7 --top-p 0.8 --top-k 100 --repeat-penalty 1.05 --image xx.jpg -p "What is in the image?"
run quantized int4 version
./llama-minicpmv-cli -m ../MiniCPM-o-26/model/ggml-model-Q4KM.gguf --mmproj ../MiniCPM-o-26/mmproj-model-f16.gguf -c 4096 --temp 0.7 --top-p 0.8 --top-k 100 --repeat-penalty 1.05 --image xx.jpg -p "What is in the image?"
or run in interactive mode
./llama-minicpmv-cli -m ../MiniCPM-o-26/model/ggml-model-Q4KM.gguf --mmproj ../MiniCPM-o-26/mmproj-model-f16.gguf -c 4096 --temp 0.7 --top-p 0.8 --top-k 100 --repeat-penalty 1.05 --image xx.jpg -i
π GGUF File List
| π Filename | π¦ Size | β‘ Download |
|---|---|---|
|
Model-7.6B-F16.gguf
LFS
FP16
|
14.19 GB | Download |
|
Model-7.6B-Q4_0.gguf
Recommended
LFS
Q4
|
4.13 GB | Download |
|
Model-7.6B-Q4_1.gguf
LFS
Q4
|
4.54 GB | Download |
|
Model-7.6B-Q4_K_M.gguf
LFS
Q4
|
4.36 GB | Download |
|
Model-7.6B-Q4_K_S.gguf
LFS
Q4
|
4.15 GB | Download |
|
Model-7.6B-Q5_0.gguf
LFS
Q5
|
4.95 GB | Download |
|
Model-7.6B-Q5_1.gguf
LFS
Q5
|
5.36 GB | Download |
|
Model-7.6B-Q5_K_M.gguf
LFS
Q5
|
5.07 GB | Download |
|
Model-7.6B-Q6_K.gguf
LFS
Q6
|
5.82 GB | Download |
|
Model-7.6B-Q8_0.gguf
LFS
Q8
|
7.54 GB | Download |
|
mmproj-model-f16.gguf
LFS
FP16
|
996.04 MB | Download |