Image-Text-to-Text
Safetensors
GGUF
English
Chinese
minicpmv4_6
multimodal
vision
abliterated
uncensored
qwen3.5
minicpm
Mixture of Experts
vision-language
conversational
computer-use
ui-grounding
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
Update config, tokenizer, README
Browse files- README.md +84 -73
- model.safetensors.index.json +0 -0
README.md
CHANGED
|
@@ -6,7 +6,10 @@ language:
|
|
| 6 |
base_model:
|
| 7 |
- openbmb/MiniCPM-V-4.6
|
| 8 |
- huihui-ai/Huihui-Qwen3.5-35B-A3B-abliterated
|
|
|
|
| 9 |
tags:
|
|
|
|
|
|
|
| 10 |
- multimodal
|
| 11 |
- vision
|
| 12 |
- abliterated
|
|
@@ -15,97 +18,105 @@ tags:
|
|
| 15 |
- minicpm
|
| 16 |
- moe
|
| 17 |
- vision-language
|
| 18 |
-
|
|
|
|
| 19 |
---
|
| 20 |
|
| 21 |
-
# MiniCPM-V
|
| 22 |
-
|
| 23 |
-
A vision-language model
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
|
| 54 |
-
|
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
- **Linear attention layers**: Use conv1d kernels for efficient sequence processing
|
| 66 |
-
- **Full attention layers**: Standard multi-head attention every 4th layer
|
| 67 |
-
- **MoE routing**: Top-8 gating per token from 256 expert MLPs (intermediate_size=512 each)
|
| 68 |
-
- **Shared expert**: Always-active expert (intermediate_size=512) at each MoE layer
|
| 69 |
|
| 70 |
## Usage
|
| 71 |
|
| 72 |
```python
|
| 73 |
-
import
|
| 74 |
-
from transformers import AutoModel, AutoTokenizer
|
| 75 |
from PIL import Image
|
| 76 |
|
| 77 |
-
model =
|
| 78 |
"jduartedj/MiniCPM-V-4.6-35B-Abliterated",
|
| 79 |
trust_remote_code=True,
|
| 80 |
-
torch_dtype=
|
|
|
|
| 81 |
)
|
| 82 |
-
|
| 83 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 84 |
"jduartedj/MiniCPM-V-4.6-35B-Abliterated",
|
| 85 |
-
trust_remote_code=True
|
| 86 |
)
|
| 87 |
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
|
|
|
|
|
|
| 98 |
```
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
## Limitations
|
| 101 |
|
| 102 |
-
-
|
| 103 |
-
-
|
| 104 |
-
-
|
| 105 |
-
- **Experimental**: For research and development only.
|
| 106 |
|
| 107 |
## Credits
|
| 108 |
|
| 109 |
-
- [
|
| 110 |
-
- [huihui-ai](https://huggingface.co/huihui-ai)
|
| 111 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
base_model:
|
| 7 |
- openbmb/MiniCPM-V-4.6
|
| 8 |
- huihui-ai/Huihui-Qwen3.5-35B-A3B-abliterated
|
| 9 |
+
pipeline_tag: image-text-to-text
|
| 10 |
tags:
|
| 11 |
+
- safetensors
|
| 12 |
+
- minicpmv4_6
|
| 13 |
- multimodal
|
| 14 |
- vision
|
| 15 |
- abliterated
|
|
|
|
| 18 |
- minicpm
|
| 19 |
- moe
|
| 20 |
- vision-language
|
| 21 |
+
- image-text-to-text
|
| 22 |
+
- conversational
|
| 23 |
---
|
| 24 |
|
| 25 |
+
# MiniCPM-V-4.6-35B-Abliterated
|
| 26 |
+
|
| 27 |
+
A multimodal vision-language model combining:
|
| 28 |
+
- **Vision:** [openbmb/MiniCPM-V-4.6](https://huggingface.co/openbmb/MiniCPM-V-4.6) vision tower (SigLIP 400M, 27 encoder layers + ViT merger)
|
| 29 |
+
- **Language:** [huihui-ai/Huihui-Qwen3.5-35B-A3B-abliterated](https://huggingface.co/huihui-ai/Huihui-Qwen3.5-35B-A3B-abliterated) (Qwen3.5-35B-A3B with abliteration for uncensored text generation)
|
| 30 |
+
- **Merger:** Trained MLP bridge (4608→2048) connecting vision to language
|
| 31 |
+
|
| 32 |
+
## Architecture
|
| 33 |
+
|
| 34 |
+
| Component | Source | Parameters | Status |
|
| 35 |
+
|-----------|--------|------------|--------|
|
| 36 |
+
| Vision Tower | openbmb/MiniCPM-V-4.6 | 522M | Frozen (original weights) |
|
| 37 |
+
| ViT Merger | openbmb/MiniCPM-V-4.6 | ~25M | Frozen (original weights) |
|
| 38 |
+
| Merger MLP | Trained | 30.7M | **Trained** (proxy MSE loss) |
|
| 39 |
+
| Language Model | huihui-ai/Huihui-Qwen3.5-35B-A3B-abliterated | ~35B (3B active MoE) | Abliterated weights |
|
| 40 |
+
|
| 41 |
+
The merger is a single `DownsampleMLP` layer:
|
| 42 |
+
- Input: 4608-dim (2×2 spatial merge of 1152-dim vision patches)
|
| 43 |
+
- `LayerNorm(4608)` → `Linear(4608→4608)` → `GELU` → `Linear(4608→2048)`
|
| 44 |
+
- Output: 2048-dim (LLM embedding space)
|
| 45 |
+
|
| 46 |
+
## Merger Training Details
|
| 47 |
+
|
| 48 |
+
The merger was trained using a **proxy MSE loss** approach:
|
| 49 |
+
- **Dataset:** LLaVA-Pretrain (558K image-caption pairs from BLIP/LAION/CC/SBU)
|
| 50 |
+
- **Method:** `MSE(mean(merger(vision_tower(image))), mean(embed_tokens(caption)))`
|
| 51 |
+
- **Only merger weights trained** — vision tower and LLM frozen
|
| 52 |
+
- **Standalone training** — loaded only vision tower + merger + embed_tokens (~2.4GB GPU)
|
| 53 |
+
|
| 54 |
+
### Training Metrics
|
| 55 |
+
| Metric | Start | End |
|
| 56 |
+
|--------|-------|-----|
|
| 57 |
+
| MSE Loss | 0.548 | 0.0006 |
|
| 58 |
+
| Cosine Similarity | 0.05 | 0.10-0.12 |
|
| 59 |
+
|
| 60 |
+
### Hyperparameters
|
| 61 |
+
- Learning rate: 1e-4 with 500-step warmup + cosine decay
|
| 62 |
+
- Optimizer: AdamW (β1=0.9, β2=0.999, weight_decay=0.01)
|
| 63 |
+
- Steps: 20,000
|
| 64 |
+
- Batch size: 1
|
| 65 |
+
- Gradient clipping: max_norm=1.0
|
| 66 |
+
- Hardware: NVIDIA GB10 (128GB unified memory)
|
| 67 |
+
- Training time: ~55 minutes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
## Usage
|
| 70 |
|
| 71 |
```python
|
| 72 |
+
from transformers import AutoModelForCausalLM, AutoProcessor
|
|
|
|
| 73 |
from PIL import Image
|
| 74 |
|
| 75 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 76 |
"jduartedj/MiniCPM-V-4.6-35B-Abliterated",
|
| 77 |
trust_remote_code=True,
|
| 78 |
+
torch_dtype="auto",
|
| 79 |
+
device_map="auto",
|
| 80 |
)
|
| 81 |
+
processor = AutoProcessor.from_pretrained(
|
|
|
|
| 82 |
"jduartedj/MiniCPM-V-4.6-35B-Abliterated",
|
| 83 |
+
trust_remote_code=True,
|
| 84 |
)
|
| 85 |
|
| 86 |
+
image = Image.open("your_image.jpg").convert("RGB")
|
| 87 |
+
messages = [
|
| 88 |
+
{"role": "user", "content": [
|
| 89 |
+
{"type": "image"},
|
| 90 |
+
{"type": "text", "text": "Describe this image in detail."},
|
| 91 |
+
]},
|
| 92 |
+
]
|
| 93 |
+
|
| 94 |
+
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 95 |
+
inputs = processor(text=[text], images=[image], return_tensors="pt").to(model.device)
|
| 96 |
+
output = model.generate(**inputs, max_new_tokens=512)
|
| 97 |
+
print(processor.decode(output[0], skip_special_tokens=True))
|
| 98 |
```
|
| 99 |
|
| 100 |
+
## Requirements
|
| 101 |
+
|
| 102 |
+
- `transformers >= 5.7.0` (native `minicpmv4_6` support)
|
| 103 |
+
- `torch >= 2.1.0`
|
| 104 |
+
- `torchvision`
|
| 105 |
+
- ~67GB disk space for weights
|
| 106 |
+
- ~75GB+ GPU memory for inference (or use quantization)
|
| 107 |
+
|
| 108 |
## Limitations
|
| 109 |
|
| 110 |
+
- The merger was trained with proxy MSE loss (image embedding ↔ caption embedding), not end-to-end. Vision-language alignment may not be as strong as fully fine-tuned models.
|
| 111 |
+
- The abliterated LLM may produce unfiltered content — use responsibly.
|
| 112 |
+
- Cosine similarity between vision and text embeddings reaches ~0.10-0.12, indicating meaningful but not perfect alignment.
|
|
|
|
| 113 |
|
| 114 |
## Credits
|
| 115 |
|
| 116 |
+
- **[openbmb](https://huggingface.co/openbmb)** — MiniCPM-V-4.6 vision architecture and weights
|
| 117 |
+
- **[huihui-ai](https://huggingface.co/huihui-ai)** — Abliterated Qwen3.5-35B-A3B language model
|
| 118 |
+
- **Assembly & merger training** by [jduartedj](https://huggingface.co/jduartedj)
|
| 119 |
+
|
| 120 |
+
## License
|
| 121 |
+
|
| 122 |
+
Apache 2.0
|
model.safetensors.index.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|