Instructions to use jduartedj/MiniCPM-V-4.6-35B-Abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use jduartedj/MiniCPM-V-4.6-35B-Abliterated with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="jduartedj/MiniCPM-V-4.6-35B-Abliterated", filename="ggml-model-Q4_K_M.gguf", )
llm.create_chat_completion( 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" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use jduartedj/MiniCPM-V-4.6-35B-Abliterated with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M # Run inference directly in the terminal: llama-cli -hf jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M # Run inference directly in the terminal: llama-cli -hf jduartedj/MiniCPM-V-4.6-35B-Abliterated: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 jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf jduartedj/MiniCPM-V-4.6-35B-Abliterated: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 jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M
Use Docker
docker model run hf.co/jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use jduartedj/MiniCPM-V-4.6-35B-Abliterated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jduartedj/MiniCPM-V-4.6-35B-Abliterated" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jduartedj/MiniCPM-V-4.6-35B-Abliterated", "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/jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M
- Ollama
How to use jduartedj/MiniCPM-V-4.6-35B-Abliterated with Ollama:
ollama run hf.co/jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M
- Unsloth Studio
How to use jduartedj/MiniCPM-V-4.6-35B-Abliterated 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 jduartedj/MiniCPM-V-4.6-35B-Abliterated 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 jduartedj/MiniCPM-V-4.6-35B-Abliterated to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for jduartedj/MiniCPM-V-4.6-35B-Abliterated to start chatting
- Pi
How to use jduartedj/MiniCPM-V-4.6-35B-Abliterated with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use jduartedj/MiniCPM-V-4.6-35B-Abliterated with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf jduartedj/MiniCPM-V-4.6-35B-Abliterated: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 jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use jduartedj/MiniCPM-V-4.6-35B-Abliterated with Docker Model Runner:
docker model run hf.co/jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M
- Lemonade
How to use jduartedj/MiniCPM-V-4.6-35B-Abliterated with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jduartedj/MiniCPM-V-4.6-35B-Abliterated:Q4_K_M
Run and chat with the model
lemonade run user.MiniCPM-V-4.6-35B-Abliterated-Q4_K_M
List all available models
lemonade list
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 jduartedj/MiniCPM-V-4.6-35B-Abliterated to start chattingUsing HuggingFace Spaces for Unsloth
# No setup required# Open https://huggingface.co/spaces/unsloth/studio in your browser
# Search for jduartedj/MiniCPM-V-4.6-35B-Abliterated to start chattingMiniCPM-V-4.6-35B-Abliterated
A multimodal vision-language model combining:
- Vision: openbmb/MiniCPM-V-4.6 vision tower (SigLIP 400M, 27 encoder layers + ViT merger)
- Language: huihui-ai/Huihui-Qwen3.5-35B-A3B-abliterated (Qwen3.5-35B-A3B MoE, abliterated for uncensored text generation)
- Merger: Trained MLP bridge (4608→2048) connecting vision to language, trained across a 4-stage curriculum (pretrain → instruction-tune → UI grounding → SFT polish)
⚙️ Latest update (2026-06-05): model weights now ship with the Stage 4 / step 23706 trained merger (val_loss 1.0280). See Training below.
Quick Stats
| Property | Value |
|---|---|
| Total params | ~35B (3B active per token, MoE 256 experts × 8 active) |
| Vision tower | 1152 hidden, 27 layers, SigLIP-400M + ViT merger |
| Merger | 4608 → 2048, single DownsampleMLP (LayerNorm → Linear → GELU → Linear) |
| LLM hidden size | 2048 |
| Precision | BF16 (also ships Q4_K_M GGUF for llama.cpp) |
| Disk | 65.6 GB safetensors, 21.2 GB GGUF Q4_K_M |
| Inference | ~75 GB BF16 VRAM, ~28 GB NF4 (bitsandbytes) |
How It Was Made
- Assembled by splicing weights:
- Vision tower + ViT merger from
openbmb/MiniCPM-V-4.6 - Language model +
lm_headfromhuihui-ai/Huihui-Qwen3.5-35B-A3B-abliterated - Merger MLP Xavier-initialized
- Vision tower + ViT merger from
- Merger trained in 4 stages on NVIDIA GB10 (128 GB unified memory) using a custom standalone trainer (~2.4 GB GPU footprint — only vision tower + merger + embed_tokens loaded, LLM frozen).
Training
The merger MLP (~22 tensors, 270 MB) was trained in a 4-stage curriculum. Vision tower and LLM remain frozen throughout. Each stage uses next-token cross-entropy loss against the LLM's frozen embedding/lm_head (Stages 2-4) or proxy MSE loss (Stage 1).
Stage Curriculum
| Stage | Name | Dataset | Steps | LR | Final val_loss |
|---|---|---|---|---|---|
| 1 | Pretrain Alignment | LLaVA-Pretrain (558K image-caption) | 558,128 | 2e-4 | — (MSE only) |
| 2 | Instruction Tuning | LLaVA-Instruct-150k | 157,712 | 5e-5 | 1.0855 |
| 3 | UI Grounding | ScreenSpot + UI variants | 1,211 | 5e-5 | 4.1910 |
| 4 | SFT Polish | agentsea/wave-ui-25k | 23,706 | 5e-5 | 1.0280 ✓ |
Each stage trains on top of the previous stage's converged merger.
Stage 4 Eval Trajectory (the shipped checkpoint)
| Step | val_loss |
|---|---|
| 16000 | 1.0318 |
| 18000 | 1.0302 |
| 20000 | 1.0286 |
| 22000 | 1.0282 |
| 23706 | 1.0280 ✓ shipped |
Validation loss is monotonically decreasing; the final checkpoint is the best by val_loss and is the one packaged in model-00015-of-00015.safetensors and mmproj-stage4.gguf.
Hyperparameters (all stages)
- Optimizer: AdamW (β1=0.9, β2=0.999, weight_decay=0.01)
- LR schedule: linear warmup + cosine decay
- Gradient clipping: max_norm=1.0
- Batch size: 1 with grad accumulation (Stages 1: 12 / 2: 16 / 3: 8 / 4: 8)
- Hardware: NVIDIA GB10 (128 GB unified memory)
- Only merger + ViT-merger weights trained; vision tower core and LLM frozen
Usage
Transformers
from transformers import AutoModelForCausalLM, AutoProcessor
from PIL import Image
model = AutoModelForCausalLM.from_pretrained(
"jduartedj/MiniCPM-V-4.6-35B-Abliterated",
trust_remote_code=True,
torch_dtype="auto",
device_map="auto",
)
processor = AutoProcessor.from_pretrained(
"jduartedj/MiniCPM-V-4.6-35B-Abliterated",
trust_remote_code=True,
)
image = Image.open("your_image.jpg").convert("RGB")
messages = [
{"role": "user", "content": [
{"type": "image"},
{"type": "text", "text": "Describe this image in detail."},
]},
]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=[text], images=[image], return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=512)
print(processor.decode(output[0], skip_special_tokens=True))
NF4 (bitsandbytes) for ~28 GB inference
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
import torch
bnb = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=True,
)
model = AutoModelForCausalLM.from_pretrained(
"jduartedj/MiniCPM-V-4.6-35B-Abliterated",
trust_remote_code=True,
quantization_config=bnb,
device_map={"": 0},
dtype=torch.bfloat16,
# CRITICAL: keep vision tower, ViT merger, projector merger, and lm_head
# in bf16. Skipping only via llm_int8_skip_modules silently fails on the
# 4-bit code path for sub-module dotted names. See caveat below.
modules_to_not_convert=[
"merger", # model.merger.mlp.0.*
"vision_tower.vit_merger", # model.vision_tower.vit_merger.*
"lm_head",
],
)
⚠️ NF4 loader caveat — use
modules_to_not_convert.BitsAndBytesConfig(llm_int8_skip_modules=[...])alone is not honored on the 4-bit code path for sub-module dotted names. Without the kwarg below, 8 of the 22 merger Linear layers get silently wrapped asbitsandbytes.Linear4bit, and any post-load overlay (state_dict.copy_(...)) will silently fail on the 4-bit-packed.weighttensors. The fix is to passmodules_to_not_convert=["merger", "vision_tower.vit_merger", "lm_head"]directly tofrom_pretrained, as shown in the NF4 snippet above. The shipped weights already contain the trained merger, so no overlay is needed — the kwarg above is enough.
llama.cpp
# Use the matched stage-4 mmproj:
./llama-mtmd-cli \
-m ggml-model-Q4_K_M.gguf \
--mmproj mmproj-stage4.gguf \
--image your_image.jpg \
-p "Describe this image."
Requirements
transformers >= 5.7.0(nativeminicpmv4_6support)torch >= 2.1.0torchvisionbitsandbytes >= 0.43(for NF4 path)- ~67 GB disk for safetensors, ~21 GB for GGUF
- ~75 GB VRAM (bf16) or ~28 GB (NF4) for inference
Limitations
- Domain bias: the final merger checkpoint was polished on wave-ui-25k, a UI-screenshot dataset. Strongest grounding is on screenshots / UI elements / OCR-heavy images. Natural-image captioning works but is not as sharp as the instruction-tuned-only stage.
- Abliteration removes safety refusals from the LLM. Use responsibly.
- Merger is BF16, LLM is recommended NF4 for sane VRAM. Loading both in BF16 demands ~75 GB.
- Val_loss has plateaued (1.0318 → 1.0280 across the last 7K steps of Stage 4). Further training would need a new dataset or different objective.
Files in This Repo
| File | Size | Purpose |
|---|---|---|
model-*-of-00015.safetensors |
~66 GB total | BF16 full weights (LLM + vision + trained merger) |
ggml-model-Q4_K_M.gguf |
21.2 GB | Quantized LLM for llama.cpp |
mmproj-stage4.gguf |
1.1 GB | Stage-4 trained mmproj for llama.cpp (matches the safetensors merger) |
mmproj-model-f16.gguf |
1.1 GB | Legacy alias (identical content) |
chat_template.jinja |
7 KB | Chat template |
tokenizer.json + tokenizer_config.json |
20 MB | Tokenizer |
Credits
- openbmb — MiniCPM-V-4.6 vision architecture & weights
- huihui-ai — Abliterated Qwen3.5-35B-A3B language model
- liuhaotian — LLaVA-Pretrain & LLaVA-Instruct-150k datasets
- ScreenSpot — UI grounding dataset
- agentsea — wave-ui-25k SFT dataset
- Assembly & 4-stage merger training by jduartedj
License
Apache 2.0 (consistent with all upstream components).
- Downloads last month
- 640
Model tree for jduartedj/MiniCPM-V-4.6-35B-Abliterated
Base model
Qwen/Qwen3.5-35B-A3B-Base
Install Unsloth Studio (macOS, Linux, WSL)
# Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for jduartedj/MiniCPM-V-4.6-35B-Abliterated to start chatting