πŸ“‹ Model Description


base_model:
  • openbmb/MiniCPM-V-2_6

MiniCPM-V 2.6

Prepare models and code

Download MiniCPM-V-26 PyTorch model from huggingface to "MiniCPM-V-26" folder.

Clone llama.cpp:

git clone [email protected]:OpenBMB/llama.cpp.git
cd llama.cpp
git checkout minicpmv-main

Usage of MiniCPM-V 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-V-2_6
python ./examples/llava/minicpmv-convert-image-encoder-to-gguf.py -m ../MiniCPM-V-26 --minicpmv-projector ../MiniCPM-V-26/minicpmv.projector --output-dir ../MiniCPM-V-26/ --image-mean 0.5 0.5 0.5 --image-std 0.5 0.5 0.5 --minicpmvversion 3
python ./converthftogguf.py ../MiniCPM-V-26/model

quantize int4 version

./llama-quantize ../MiniCPM-V-26/model/ggml-model-f16.gguf ../MiniCPM-V-26/model/ggml-model-Q4KM.gguf Q4KM

Build for Linux or Mac

make
make llama-minicpmv-cli

Inference on Linux or Mac

# run f16 version
./llama-minicpmv-cli -m ../MiniCPM-V-26/model/ggml-model-f16.gguf --mmproj ../MiniCPM-V-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-V-26/model/ggml-model-Q4KM.gguf --mmproj ../MiniCPM-V-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-V-26/model/ggml-model-Q4KM.gguf --mmproj ../MiniCPM-V-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
ggml-model-IQ3_M.gguf
LFS Q3
3.33 GB Download
ggml-model-IQ3_S.gguf
LFS Q3
3.26 GB Download
ggml-model-IQ3_XS.gguf
LFS Q3
3.11 GB Download
ggml-model-IQ4_NL.gguf
LFS Q4
4.15 GB Download
ggml-model-IQ4_XS.gguf
LFS Q4
3.96 GB Download
ggml-model-Q2_K.gguf
LFS Q2
2.81 GB Download
ggml-model-Q3_K.gguf
LFS Q3
3.55 GB Download
ggml-model-Q3_K_L.gguf
LFS Q3
3.81 GB Download
ggml-model-Q3_K_M.gguf
LFS Q3
3.55 GB Download
ggml-model-Q3_K_S.gguf
LFS Q3
3.25 GB Download
ggml-model-Q4_0.gguf
Recommended LFS Q4
4.13 GB Download
ggml-model-Q4_1.gguf
LFS Q4
4.54 GB Download
ggml-model-Q4_K.gguf
LFS Q4
4.36 GB Download
ggml-model-Q4_K_M.gguf
LFS Q4
4.36 GB Download
ggml-model-Q4_K_S.gguf
LFS Q4
4.15 GB Download
ggml-model-Q5_0.gguf
LFS Q5
4.95 GB Download
ggml-model-Q5_1.gguf
LFS Q5
5.36 GB Download
ggml-model-Q5_K.gguf
LFS Q5
5.07 GB Download
ggml-model-Q5_K_M.gguf
LFS Q5
5.07 GB Download
ggml-model-Q5_K_S.gguf
LFS Q5
4.95 GB Download
ggml-model-Q6_K.gguf
LFS Q6
5.82 GB Download
ggml-model-Q8_0.gguf
LFS Q8
7.54 GB Download
ggml-model-f16.gguf
LFS FP16
14.19 GB Download
mmproj-model-f16.gguf
LFS FP16
996.04 MB Download