Instructions to use lkg67/minicpm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use lkg67/minicpm with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="lkg67/minicpm", filename="ggml-model-IQ3_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use lkg67/minicpm with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf lkg67/minicpm:Q4_K_M # Run inference directly in the terminal: llama-cli -hf lkg67/minicpm:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf lkg67/minicpm:Q4_K_M # Run inference directly in the terminal: llama-cli -hf lkg67/minicpm:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf lkg67/minicpm:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf lkg67/minicpm:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf lkg67/minicpm:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf lkg67/minicpm:Q4_K_M
Use Docker
docker model run hf.co/lkg67/minicpm:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use lkg67/minicpm with Ollama:
ollama run hf.co/lkg67/minicpm:Q4_K_M
- Unsloth Studio new
How to use lkg67/minicpm with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for lkg67/minicpm to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for lkg67/minicpm to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for lkg67/minicpm to start chatting
- Docker Model Runner
How to use lkg67/minicpm with Docker Model Runner:
docker model run hf.co/lkg67/minicpm:Q4_K_M
- Lemonade
How to use lkg67/minicpm with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull lkg67/minicpm:Q4_K_M
Run and chat with the model
lemonade run user.minicpm-Q4_K_M
List all available models
lemonade list
How to use from
llama.cppInstall from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf lkg67/minicpm:# Run inference directly in the terminal:
llama-cli -hf lkg67/minicpm:Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf lkg67/minicpm:# Run inference directly in the terminal:
./llama-cli -hf lkg67/minicpm:Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf lkg67/minicpm:# Run inference directly in the terminal:
./build/bin/llama-cli -hf lkg67/minicpm:Use Docker
docker model run hf.co/lkg67/minicpm:Quick Links
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
MiniCPM-V 2.6
Prepare models and code
Download MiniCPM-V-2_6 PyTorch model from huggingface to "MiniCPM-V-2_6" folder.
Clone llama.cpp:
git clone git@github.com: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-2_6 --minicpmv-projector ../MiniCPM-V-2_6/minicpmv.projector --output-dir ../MiniCPM-V-2_6/ --image-mean 0.5 0.5 0.5 --image-std 0.5 0.5 0.5 --minicpmv_version 3
python ./convert_hf_to_gguf.py ../MiniCPM-V-2_6/model
# quantize int4 version
./llama-quantize ../MiniCPM-V-2_6/model/ggml-model-f16.gguf ../MiniCPM-V-2_6/model/ggml-model-Q4_K_M.gguf Q4_K_M
Build for Linux or Mac
make
make llama-minicpmv-cli
Inference on Linux or Mac
# run f16 version
./llama-minicpmv-cli -m ../MiniCPM-V-2_6/model/ggml-model-f16.gguf --mmproj ../MiniCPM-V-2_6/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-2_6/model/ggml-model-Q4_K_M.gguf --mmproj ../MiniCPM-V-2_6/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-2_6/model/ggml-model-Q4_K_M.gguf --mmproj ../MiniCPM-V-2_6/mmproj-model-f16.gguf -c 4096 --temp 0.7 --top-p 0.8 --top-k 100 --repeat-penalty 1.05 --image xx.jpg -i
- Downloads last month
- 167
Hardware compatibility
Log In to add your hardware
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf lkg67/minicpm:# Run inference directly in the terminal: llama-cli -hf lkg67/minicpm: