Instructions to use saidutta69/MiniCPM-V-4.7-1B-heretic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saidutta69/MiniCPM-V-4.7-1B-heretic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="saidutta69/MiniCPM-V-4.7-1B-heretic") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("saidutta69/MiniCPM-V-4.7-1B-heretic") model = AutoModelForMultimodalLM.from_pretrained("saidutta69/MiniCPM-V-4.7-1B-heretic", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use saidutta69/MiniCPM-V-4.7-1B-heretic 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 saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M # Run inference directly in the terminal: llama cli -hf saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M # Run inference directly in the terminal: llama cli -hf saidutta69/MiniCPM-V-4.7-1B-heretic: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 saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf saidutta69/MiniCPM-V-4.7-1B-heretic: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 saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M
Use Docker
docker model run hf.co/saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use saidutta69/MiniCPM-V-4.7-1B-heretic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "saidutta69/MiniCPM-V-4.7-1B-heretic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "saidutta69/MiniCPM-V-4.7-1B-heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M
- SGLang
How to use saidutta69/MiniCPM-V-4.7-1B-heretic 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 "saidutta69/MiniCPM-V-4.7-1B-heretic" \ --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": "saidutta69/MiniCPM-V-4.7-1B-heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "saidutta69/MiniCPM-V-4.7-1B-heretic" \ --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": "saidutta69/MiniCPM-V-4.7-1B-heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use saidutta69/MiniCPM-V-4.7-1B-heretic with Ollama:
ollama run hf.co/saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M
- Unsloth Desktop
- Pi
How to use saidutta69/MiniCPM-V-4.7-1B-heretic with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saidutta69/MiniCPM-V-4.7-1B-heretic: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": "saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use saidutta69/MiniCPM-V-4.7-1B-heretic with Docker Model Runner:
docker model run hf.co/saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M
- Lemonade
How to use saidutta69/MiniCPM-V-4.7-1B-heretic with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M
Run and chat with the model
lemonade run user.MiniCPM-V-4.7-1B-heretic-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use saidutta69/MiniCPM-V-4.7-1B-heretic with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saidutta69/MiniCPM-V-4.7-1B-heretic: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 saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use saidutta69/MiniCPM-V-4.7-1B-heretic with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saidutta69/MiniCPM-V-4.7-1B-heretic: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 "saidutta69/MiniCPM-V-4.7-1B-heretic: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"
MiniCPM-V-4.7-1B-heretic
A decensored variant of openbmb/MiniCPM-V-4.7-1B, produced with Heretic v1.4.0 (directional ablation / "abliteration"). Refusal behaviour is suppressed here via targeted weight edits to the attention output and MLP down-projections rather than fine-tuning, so the vision tower, the OCR and grounding behaviour, and the on-device footprint are left intact.
The GGUF here is fully multimodal — text and vision. Most converted VL checkpoints in this collection ship a text-only GGUF, because the converter silently drops the vision tower. llama.cpp registers MiniCPM-V 4.7 properly, so the vision tower is shipped as a separate projector file,
MiniCPM-V-4.7-1B-heretic-mmproj-F16.gguf(1.11 GB), and the two files together are the model. For image input you must load both — see Quickstart. Text-only use needs only the main GGUF. Nothing is lost in the conversion: the text GGUF holds 1,006,209,856 tensor elements, an exact match for the text tower inmodel.safetensors, and the projector holds the vision tower and merger exactly.
Who this is for: developers who want an uncensored vision-language model small enough to run on a phone. The text tower is 1.01B and the vision tower 0.55B, so 1.55B total — by far the smallest model in this collection that still sees images, and it answers instead of declining: refusals drop from 60/100 to 5/100. OpenBMB ships an iPhone app for this checkpoint, and the base model is claimed to substantially outperform Qwen3.5 0.8B on both overall score and inference efficiency. Best for on-device image Q&A, OCR, screenshot and document reading, visual grounding, and local vision agents. If you need text-only at this size, Qwen3.5-0.8B-heretic is the denser sibling; if you want a stronger text model, take the vision tower off the table entirely and use one of the 3B text models.
Runs on your gaming PC
Full GGUF ladder included - pick the quant that fits your card:
| Your GPU | Recommended quant | Text weights | Text + vision |
|---|---|---|---|
| RTX 4090 / 5090 (24 GB) | Q8_0 | 1.08 GB | 2.19 GB |
| RTX 4080 / 5080 / 4060 Ti 16G (16 GB) | Q6_K | 0.84 GB | 1.95 GB |
| RTX 3060 / 4070 / 5070 (12 GB) | Q5_K_M | 0.75 GB | 1.86 GB |
| RTX 4060 / 3070 (8 GB) | Q4_K_M | 0.67 GB | 1.78 GB |
| GTX 1660 Super / 2060 / 3050 laptop (6 GB) | IQ4_XS | 0.64 GB | 1.75 GB |
| CPU-only / Apple Silicon | Q4_K_M | 0.67 GB | 1.78 GB |
The right-hand column is what you actually need on disk and in VRAM for image input: the text GGUF plus the 1.11 GB projector, which is fixed-size because vision weights are not quantized. Add ~1 GB per 32K of context, and budget more KV cache than a text-only model of the same size because image tokens are expensive. OOM? Drop one quant level. Headroom to spare? Go one up.
Abliteration parameters
Trial trial_id 169 of a 200-trial Heretic run (seed 4161231025). Unlike most models in this
collection, this run used a single refusal direction for the whole network rather than one per
layer, so direction_index is a single value.
| Parameter | Value |
|---|---|
| direction_index | 12.37 |
| attn.o_proj.max_weight | 1.43 |
| attn.o_proj.max_weight_position | 14.34 |
| attn.o_proj.min_weight | 0.12 |
| attn.o_proj.min_weight_distance | 13.03 |
| mlp.down_proj.max_weight | 1.30 |
| mlp.down_proj.max_weight_position | 14.65 |
| mlp.down_proj.min_weight | 1.22 |
| mlp.down_proj.min_weight_distance | 11.63 |
Performance
| Metric | This model | Original model (openbmb/MiniCPM-V-4.7-1B) |
|---|---|---|
| KL divergence | 0.0351 | 0 (by definition) |
| Refusals | 5/100 | 60/100 |
Read those two numbers together, they are only meaningful as a pair. KL 0.0351 is a mid-range edit in this collection — looser than granite-4.2-3b-heretic (0.0095), tighter than Qwen3-VL-2B-Instruct-heretic (0.0528) — and it lands refusals at 5/100, so the edit did real work without wrecking the model. That combination matters more than the raw KL.
Note the base starts at 60/100 refusals, not the 90-plus typical of an RLHF'd 1B. MiniCPM-V 4.7 1B ships comparatively light alignment, so there was less refusal behaviour to remove in the first place; 55 of the 60 are cleared. On a base with heavier alignment this same method would start from a much higher number.
No benchmark table here, on purpose. The base model card publishes its evaluation results as images (frontier and overall-performance plots) rather than as text, so there is nothing to quote that I have actually read. The one textual claim worth repeating is OpenBMB's own: the 1B variant substantially outperforms Qwen3.5 0.8B on both overall score and inference efficiency.
Why abliteration instead of fine-tuning
Fine-tuning a "helpful" persona on top of RLHF'd refusals fights the base model's training and tends to degrade coherence. Abliteration instead finds and edits the specific weight directions responsible for refusal, leaving the rest of the network (and its capabilities) untouched. See the Heretic repo and the original abliteration writeup for the mechanism.
Made with ❤️ by RACER IS OP — follow for more uncensored models
Files
Safetensors
| File | Size |
|---|---|
model.safetensors |
3.11 GB |
BF16, 1.55B total (1.01B text tower + 0.55B vision tower).
The reproduce/ directory carries the full Heretic recipe - config.toml, requirements.txt,
the Optuna study journal, and SHA-256 sums - so this exact model can be regenerated
bit-for-bit. Reproduce it with heretic --reproduce reproduce/reproduce.json.
GGUF quantizations
Full quantization set (14 quants + F16) produced with llama.cpp, plus the vision projector.
| File | Format | Size |
|---|---|---|
MiniCPM-V-4.7-1B-heretic-F16.gguf |
GGUF F16 | 2.02 GB |
MiniCPM-V-4.7-1B-heretic-Q2_K.gguf |
GGUF Q2_K | 0.51 GB |
MiniCPM-V-4.7-1B-heretic-IQ3_S.gguf |
GGUF IQ3_S | 0.56 GB |
MiniCPM-V-4.7-1B-heretic-Q3_K_S.gguf |
GGUF Q3_K_S | 0.54 GB |
MiniCPM-V-4.7-1B-heretic-Q3_K_M.gguf |
GGUF Q3_K_M | 0.58 GB |
MiniCPM-V-4.7-1B-heretic-Q3_K_L.gguf |
GGUF Q3_K_L | 0.60 GB |
MiniCPM-V-4.7-1B-heretic-IQ4_XS.gguf |
GGUF IQ4_XS | 0.64 GB |
MiniCPM-V-4.7-1B-heretic-Q4_K_S.gguf |
GGUF Q4_K_S | 0.65 GB |
MiniCPM-V-4.7-1B-heretic-Q4_0.gguf |
GGUF Q4_0 | 0.64 GB |
MiniCPM-V-4.7-1B-heretic-Q4_1.gguf |
GGUF Q4_1 | 0.69 GB |
MiniCPM-V-4.7-1B-heretic-Q4_K_M.gguf |
GGUF Q4_K_M | 0.67 GB |
MiniCPM-V-4.7-1B-heretic-Q5_K_S.gguf |
GGUF Q5_K_S | 0.74 GB |
MiniCPM-V-4.7-1B-heretic-Q5_K_M.gguf |
GGUF Q5_K_M | 0.75 GB |
MiniCPM-V-4.7-1B-heretic-Q6_K.gguf |
GGUF Q6_K | 0.84 GB |
MiniCPM-V-4.7-1B-heretic-Q8_0.gguf |
GGUF Q8_0 | 1.08 GB |
| File | Format | Size |
|---|---|---|
MiniCPM-V-4.7-1B-heretic-mmproj-F16.gguf |
vision projector (F16) | 1.11 GB |
Total GGUF payload: 12.62 GB across 16 files.
Architecture is qwen35 for the text tower (the Qwen3.5 hybrid Gated-DeltaNet stack, not a plain
transformer) and clip / minicpmv4_7 for the projector (460 tensors). Both load natively in llama.cpp, LM Studio, Jan,
and Ollama. Text is loaded with llama-cli, images need the projector passed alongside it.
Quickstart
Text only
# pulls the default quant for you
llama-cli -hf saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M -ngl 99
Text and images
Use a multimodal entry point. llama-cli is the text-only binary and will not fetch the
projector; llama-mtmd-cli and llama-minicpmv-cli both will, because llama.cpp looks for a
sibling GGUF whose name contains mmproj:
llama-mtmd-cli \
-hf saidutta69/MiniCPM-V-4.7-1B-heretic:Q4_K_M \
--image path/to/photo.png \
-p "Describe this image in one sentence." \
-ngl 99
# or from a local checkout, passing the projector explicitly
llama-mtmd-cli \
-m MiniCPM-V-4.7-1B-heretic-Q4_K_M.gguf \
--mmproj MiniCPM-V-4.7-1B-heretic-mmproj-F16.gguf \
--image photo.png \
-p "Describe this image in one sentence."
# transformers
from transformers import AutoProcessor, AutoModelForImageTextToText
model_name = "saidutta69/MiniCPM-V-4.7-1B-heretic"
model = AutoModelForImageTextToText.from_pretrained(model_name, dtype="auto", device_map="auto")
processor = AutoProcessor.from_pretrained(model_name)
messages = [{"role": "user", "content": [
{"type": "image", "image": "https://example.com/screenshot.png"},
{"type": "text", "text": "Transcribe all text in this image and describe the layout."},
]}]
inputs = processor.apply_chat_template(messages, tokenize=True, add_generation_prompt=True,
return_dict=True, return_tensors="pt",
downsample_mode="16x", max_slice_nums=36,
enable_thinking=False).to(model.device)
out = model.generate(**inputs, max_new_tokens=1024, downsample_mode="16x",
do_sample=True, temperature=0.7, top_p=0.95, top_k=100,
repetition_penalty=1.03)
print(processor.batch_decode(out[:, inputs["input_ids"].shape[-1]:], skip_special_tokens=True)[0])
Requires transformers>=5.18.0 — config.json uses dtype: rather than torch_dtype: and the
tokenizer is a TokenizersBackend, so older transformers will not load it. Use dtype="auto".
Visual detail and cost
downsample_mode is the main knob and it must be passed to both apply_chat_template (so the
placeholder count matches) and generate:
downsample_mode |
Effect |
|---|---|
"16x" |
Default. Merges visual tokens for speed. |
"4x" |
Keeps 4x more tokens, much better on dense text and fine detail in a screenshot. |
Other useful knobs: max_slice_nums (default 9; OpenBMB recommends 36 for images, 1 for video),
use_image_id, and for video max_num_frames, stack_frames, downsample_mode.
Thinking mode
The chat template is thinking-on by default — the generation prompt is opened with <think>. Pass
enable_thinking=False to apply_chat_template for a direct answer with no reasoning block.
Output from the default mode routinely opens with </think> and no matching <think>, since the
template supplies the opening half.
Model details
| Architecture | MiniCPM-V-4.7-1B-heretic — MiniCPMV4_7ForConditionalGeneration |
| Text backbone | Qwen3.5 hybrid — Gated DeltaNet linear attention + gated full attention |
| Vision backbone | SigLIP2 encoder + vit_merger, intra-ViT early compression (from LLaVA-UHD v4) |
| Parameters | 1.55B total — 1.01B text, 0.55B vision |
| Text layers | 24 — 18 linear-attention, 6 full-attention (every 4th) |
| Attention | 8 attention heads, 2 KV heads, head dim 256 |
| Hidden / intermediate | 1024 / 3584 |
| Position embedding | mRoPE interleaved, sections 11/11/10, partial rotary 0.25 (64 dims), theta = 10,000,000 |
| Context length | 262,144 |
| Vocab | 248,094 (embeddings untied) |
| Vision tower | 27 layers, hidden 1152, patch 14, window kernel 2x2 |
| GGUF | arch qwen35, 321 tensors, 24 blocks |
| Precision | bfloat16 |
| Modalities | Text, image, and video in; text out |
| Base model | openbmb/MiniCPM-V-4.7-1B |
The 1B in the name refers to the language tower, as is standard for MiniCPM-V. Vision weights are
not counted there, and they are the larger half of this particular checkpoint by tensor count.
About MiniCPM-V 4.7
MiniCPM-V is OpenBMB's vision-language line, built for on-device use. 4.7 pushes on the performance/efficiency frontier rather than raw scale: it compresses visual tokens inside the vision encoder before the later encoder layers, supports mixed 4x/16x token compression so you can trade detail against cost per task, and ships first-class deployment support for iOS, Android and HarmonyOS with day-0 support from Rockchip, Houmo, Intel, AMD and Arm. Beyond llama.cpp and Ollama it is integrated with SGLang, vLLM and OpenVINO, and it can be fine-tuned with SWIFT and LLaMA-Factory. A separate DSpark draft checkpoint exists for speculative decoding.
Responsible use
Refusal suppression is deliberate and works as intended: this model will comply with requests the base model would refuse, including some it shouldn't. There is no safety filtering layered on top. You are responsible for how you deploy it — don't put this behind an unmoderated public-facing endpoint serving third parties. It inherits MiniCPM-V 4.7's factual limitations and biases; abliteration removes refusal directions, it doesn't add capability or judgment.
License
apache-2.0, inherited from the base model. Neither
openbmb/MiniCPM-V-4.7-1B nor this repo ships a LICENSE file, so license_link points at the
canonical Apache 2.0 text rather than a blob in either repo.
Related
- openbmb/MiniCPM-V-4.7-1B — the base model
- saidutta69/Qwen3-VL-2B-Instruct-heretic — the other small multimodal model in this collection, and the one whose GGUF is text-only
- saidutta69/MiniCPM5-1B-heretic — the earlier text-only MiniCPM checkpoint, also decensored
- saidutta69/Qwen3.5-0.8B-heretic — the text-only backbone family at comparable size
- Downloads last month
- 1,045