Instructions to use openbmb/MiniCPM5-2B-DSpark-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/MiniCPM5-2B-DSpark-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openbmb/MiniCPM5-2B-DSpark-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openbmb/MiniCPM5-2B-DSpark-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use openbmb/MiniCPM5-2B-DSpark-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf openbmb/MiniCPM5-2B-DSpark-GGUF # Run inference directly in the terminal: llama cli -hf openbmb/MiniCPM5-2B-DSpark-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf openbmb/MiniCPM5-2B-DSpark-GGUF # Run inference directly in the terminal: llama cli -hf openbmb/MiniCPM5-2B-DSpark-GGUF
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 openbmb/MiniCPM5-2B-DSpark-GGUF # Run inference directly in the terminal: ./llama-cli -hf openbmb/MiniCPM5-2B-DSpark-GGUF
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 openbmb/MiniCPM5-2B-DSpark-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf openbmb/MiniCPM5-2B-DSpark-GGUF
Use Docker
docker model run hf.co/openbmb/MiniCPM5-2B-DSpark-GGUF
- LM Studio
- Jan
- vLLM
How to use openbmb/MiniCPM5-2B-DSpark-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openbmb/MiniCPM5-2B-DSpark-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM5-2B-DSpark-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openbmb/MiniCPM5-2B-DSpark-GGUF
- SGLang
How to use openbmb/MiniCPM5-2B-DSpark-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "openbmb/MiniCPM5-2B-DSpark-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM5-2B-DSpark-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "openbmb/MiniCPM5-2B-DSpark-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM5-2B-DSpark-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use openbmb/MiniCPM5-2B-DSpark-GGUF with Ollama:
ollama run hf.co/openbmb/MiniCPM5-2B-DSpark-GGUF
- Unsloth Desktop
- Pi
How to use openbmb/MiniCPM5-2B-DSpark-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf openbmb/MiniCPM5-2B-DSpark-GGUF
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "openbmb/MiniCPM5-2B-DSpark-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use openbmb/MiniCPM5-2B-DSpark-GGUF with Docker Model Runner:
docker model run hf.co/openbmb/MiniCPM5-2B-DSpark-GGUF
- Lemonade
How to use openbmb/MiniCPM5-2B-DSpark-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull openbmb/MiniCPM5-2B-DSpark-GGUF
Run and chat with the model
lemonade run user.MiniCPM5-2B-DSpark-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use openbmb/MiniCPM5-2B-DSpark-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf openbmb/MiniCPM5-2B-DSpark-GGUF
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default openbmb/MiniCPM5-2B-DSpark-GGUF
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use openbmb/MiniCPM5-2B-DSpark-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf openbmb/MiniCPM5-2B-DSpark-GGUF
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "openbmb/MiniCPM5-2B-DSpark-GGUF" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
MiniCPM Tech Report | MiniCPM Wiki(Chinese) | GitHub Repo | UltraData | Online Demo
MiniCPM5-2B-DSpark-GGUF
GGUF version of MiniCPM5-2B-DSpark for speculative decoding with MiniCPM5-2B in llama.cpp.
| File | Precision | Size |
|---|---|---|
MiniCPM5-2.6B-DSpark.gguf |
BF16 | 653 MB |
Usage with llama.cpp
llama-server \
-m MiniCPM5-2B-Q4_K_M.gguf \
-md MiniCPM5-2.6B-DSpark.gguf \
--spec-type draft-dspark --spec-draft-n-max 7 \
-ngl 99 -ngld 99 -fa on \
-c 8192 --jinja --port 8080
Limitations and Disclaimer
This model has no autonomous intent or legal personhood; its outputs are text generated from statistical patterns and may be inaccurate, biased, or offensive, and may be manipulated by carefully crafted prompts ("jailbreaks") into producing unintended content. Its responses on sensitive topics such as politics, health, finance, and law are not reviewed by experts and should not be treated as professional advice.
This model is provided "AS IS", without warranty of any kind, express or implied, and the developers are not liable for any damages arising from its use. Users must employ the model only for lawful, compliant, and ethical purposes, configure their own safeguards, and label AI-generated content where required; deliberate jailbreaking, injection attacks, or inducing harmful output is prohibited, and any such testing is at the user's own risk.
License
This repository and MiniCPM model weights are released under the Apache-2.0 License.
Citation
Please cite our paper if you find our work valuable:
@article{minicpm4,
title={Minicpm4: Ultra-efficient llms on end devices},
author={MiniCPM, Team},
journal={arXiv preprint arXiv:2506.07900},
year={2025}
}
- Downloads last month
- -
We're not able to determine the quantization variants.