Instructions to use openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use openbmb/MiniCPM-V-4.7-35B-A3B-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/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf: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 openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf: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 openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M
Use Docker
docker model run hf.co/openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openbmb/MiniCPM-V-4.7-35B-A3B-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/MiniCPM-V-4.7-35B-A3B-DSpark-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M
- SGLang
How to use openbmb/MiniCPM-V-4.7-35B-A3B-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/MiniCPM-V-4.7-35B-A3B-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/MiniCPM-V-4.7-35B-A3B-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/MiniCPM-V-4.7-35B-A3B-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/MiniCPM-V-4.7-35B-A3B-DSpark-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf with Ollama:
ollama run hf.co/openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M
- Unsloth Desktop
- Pi
How to use openbmb/MiniCPM-V-4.7-35B-A3B-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/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M
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/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf with Docker Model Runner:
docker model run hf.co/openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M
- Lemonade
How to use openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M
Run and chat with the model
lemonade run user.MiniCPM-V-4.7-35B-A3B-DSpark-gguf-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use openbmb/MiniCPM-V-4.7-35B-A3B-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/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M
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/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use openbmb/MiniCPM-V-4.7-35B-A3B-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/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M
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/MiniCPM-V-4.7-35B-A3B-DSpark-gguf:Q4_K_M" \ --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"
Run and chat with the model
lemonade run user.MiniCPM-V-4.7-35B-A3B-DSpark-gguf-List all available models
lemonade listThis repository hosts the GGUF (llama.cpp) quantized version of MiniCPM-V-4.7-35B-A3B-DSpark. For the original BF16 weights and the full model card, please refer to openbmb/MiniCPM-V-4.7-35B-A3B-DSpark.
MiniCPM-V-4.7-35B-A3B-DSpark
MiniCPM-V-4.7-35B-A3B-DSpark is a DSpark draft checkpoint trained for exact pairing with MiniCPM-V-4.7-35B-A3B and its tokenizer.
Model Specification
| Property | Value |
|---|---|
| Target model | MiniCPM-V-4.7-35B-A3B |
| Draft layers | 5 |
| Draft parameters | 389,223,169 |
| Draft tokens per forward pass | 15 |
| Target hidden-state layers | [3, 11, 19, 27, 35] |
| Checkpoint precision | BF16 |
Training Recipe
Training responses were generated by MiniCPM-V-4.7-35B-A3B from a mixture of Vision & Text prompts.
| Setting | Value |
|---|---|
| Training sequences | 2M |
| Epochs | 6 |
| Optimizer | AdamW |
| Objective | CE + L1 + confidence loss |
Evaluation
Acceptance length is defined as the total number of completion tokens divided by the total number of speculative verification steps. Evaluation uses natural EOS termination and max_new_tokens=8192.
| Domain | Accept Length |
|---|---|
| Vision | |
| MMMU | 5.098 |
| MathVista | 6.126 |
| CharXiv_reasoning_val | 5.479 |
| OCRBench | 5.407 |
| Text | |
| Math | 6.687 |
| Code | 7.387 |
| General | 3.501 |
Usage with vLLM
vllm serve \
--model openbmb/MiniCPM-V-4.7-35B-A3B \
--served-model-name MiniCPM-V-4.7-35B-A3B \
--tensor-parallel-size 2 \
--max-model-len 40960 \
--max-num-batched-tokens 40960 \
--max-num-seqs 1 \
--attention-backend FLASH_ATTN \
--mm-encoder-attn-backend FLASH_ATTN \
--mm-processor-kwargs '{"downsample_mode":"4x"}' \
--trust-request-mm-kwargs \
--disable-custom-all-reduce \
--compilation-config '{"pass_config":{"fuse_allreduce_rms":false}}' \
--speculative-config '{"method":"dspark","model":"openbmb/MiniCPM-V-4.7-35B-A3B-DSpark","num_speculative_tokens":15,"enable_adaptive_verification":false}' \
--default-chat-template-kwargs '{"enable_thinking":false}'
Usage with llama.cpp
Download the target model, its vision projector (mmproj), and this DSpark draft:
huggingface-cli download openbmb/MiniCPM-V-4.7-35B-A3B-gguf MiniCPM-V-4_7-35B-A3B-Q4_K_M.gguf mmproj-model-f16.gguf --local-dir ./35B-A3B-gguf
huggingface-cli download openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf dspark-MiniCPM-V-4_7-35B-A3B-Q8_0.gguf --local-dir ./35B-A3B-gguf
Run with speculative decoding (-md = draft, --spec-type draft-dspark). llama-cli handles both the vision projector and the draft:
llama-cli \
-m ./35B-A3B-gguf/MiniCPM-V-4_7-35B-A3B-Q4_K_M.gguf \
--mmproj ./35B-A3B-gguf/mmproj-model-f16.gguf \
-md ./35B-A3B-gguf/dspark-MiniCPM-V-4_7-35B-A3B-Q8_0.gguf \
--spec-type draft-dspark \
--image image.jpg -p "Describe this image." \
-ngl 99 -ngld 99 -fa on -c 8192
For a multimodal server:
llama-server \
-m ./35B-A3B-gguf/MiniCPM-V-4_7-35B-A3B-Q4_K_M.gguf \
--mmproj ./35B-A3B-gguf/mmproj-model-f16.gguf \
-md ./35B-A3B-gguf/dspark-MiniCPM-V-4_7-35B-A3B-Q8_0.gguf \
--spec-type draft-dspark --spec-draft-n-max 15 \
-ngl 99 -ngld 99 -fa on -c 8192 --jinja --port 8080
Requires a llama.cpp build with the dflash architecture and the DSpark Markov head. The draft must be paired with the matching MiniCPM-V 4.7 35B-A3B target. Draft quantization only affects acceptance length (never the output), so pick the smallest quant that fits — Q8_0 / Q6_K are good defaults.
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.
- Downloads last month
- 596
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf
Base model
openbmb/MiniCPM-V-4.7-35B-A3B-DSpark
Pull the model
# Download Lemonade from https://lemonade-server.ai/lemonade pull openbmb/MiniCPM-V-4.7-35B-A3B-DSpark-gguf: