Image-Text-to-Text
Transformers
Safetensors
minicpmv4_7
webbrain
minicpm-v
browser-agent
tool-calling
gui-grounding
conversational
Instructions to use webbrain-one/minicpmv47-webbrain-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use webbrain-one/minicpmv47-webbrain-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="webbrain-one/minicpmv47-webbrain-v1") 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("webbrain-one/minicpmv47-webbrain-v1") model = AutoModelForMultimodalLM.from_pretrained("webbrain-one/minicpmv47-webbrain-v1", 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
- vLLM
How to use webbrain-one/minicpmv47-webbrain-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "webbrain-one/minicpmv47-webbrain-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webbrain-one/minicpmv47-webbrain-v1", "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/webbrain-one/minicpmv47-webbrain-v1
- SGLang
How to use webbrain-one/minicpmv47-webbrain-v1 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 "webbrain-one/minicpmv47-webbrain-v1" \ --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": "webbrain-one/minicpmv47-webbrain-v1", "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 "webbrain-one/minicpmv47-webbrain-v1" \ --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": "webbrain-one/minicpmv47-webbrain-v1", "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" } } ] } ] }' - Docker Model Runner
How to use webbrain-one/minicpmv47-webbrain-v1 with Docker Model Runner:
docker model run hf.co/webbrain-one/minicpmv47-webbrain-v1
Model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: webbrain-noncommercial-research-restrictions
|
| 4 |
+
base_model: openbmb/MiniCPM-V-4.7-1B
|
| 5 |
+
pipeline_tag: image-text-to-text
|
| 6 |
+
library_name: transformers
|
| 7 |
+
tags:
|
| 8 |
+
- webbrain
|
| 9 |
+
- minicpm-v
|
| 10 |
+
- browser-agent
|
| 11 |
+
- tool-calling
|
| 12 |
+
- gui-grounding
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# MiniCPM-V-4.7 WebBrain v1
|
| 16 |
+
|
| 17 |
+
A WebBrain fine-tune of MiniCPM-V-4.7-1B, built to be one on-device model for three jobs in WebBrain:
|
| 18 |
+
|
| 19 |
+
- page-state decisions (verify protocol plus probe)
|
| 20 |
+
- the local visual fallback (screenshot observations and grounding)
|
| 21 |
+
- the text and tool-calling model for offline mode
|
| 22 |
+
|
| 23 |
+
This repository holds the **merged float32 weights**: the LoRA folded into the base, with the fine-tuned merger
|
| 24 |
+
included. Companion repositories:
|
| 25 |
+
|
| 26 |
+
- [`webbrain-one/minicpmv47-webbrain-v1-lora`](https://huggingface.co/webbrain-one/minicpmv47-webbrain-v1-lora): the LoRA adapter and the merger weights.
|
| 27 |
+
- [`webbrain-one/minicpmv47-webbrain-v1-onnx`](https://huggingface.co/webbrain-one/minicpmv47-webbrain-v1-onnx): the WebGPU ONNX bundle (q8 text graphs, fp16 vision encoder, JS runtime and decision probes).
|
| 28 |
+
|
| 29 |
+
## Training
|
| 30 |
+
|
| 31 |
+
- **Base:** `openbmb/MiniCPM-V-4.7-1B` (revision `379f120c2ff3588e6e06559ec6b9ec15cc05114e`): SigLIP vision tower, a
|
| 32 |
+
16x vision-to-language merger, and a Qwen3.5-0.8B-style language model (18 Gated DeltaNet + 6 attention layers).
|
| 33 |
+
- **Data:** one pass over 344,139 samples.
|
| 34 |
+
- WebBrain-VL-4 (the VL-3 draw schedule, 335,572 draws): VL-2 six-section page observations, curated VL-3
|
| 35 |
+
observations, MolmoPoint GUI grounding tasks (intent → point/box, point/box → element, grounded interaction,
|
| 36 |
+
actionable inventory) and WebChain trajectory steps.
|
| 37 |
+
- The WebBrain Compass v3 maximal text release (8,583 rows): ask, compact browser actions, WebLINX-derived compact
|
| 38 |
+
actions, escalation.
|
| 39 |
+
- **Method:** LoRA r = 64, alpha = 64 on all 186 language-model linear layers (43.3M parameters, fp32 adapters) plus a
|
| 40 |
+
full fine-tune of the merger (26.0M, fp32). The vision tower is frozen.
|
| 41 |
+
- AdamW: LoRA 1e-4, merger 2e-5. 3% warmup, cosine decay to 10%, effective batch 64 (5,144 optimizer steps).
|
| 42 |
+
- Loss is the per-sample mean over completion tokens only, with a 32K maximum sequence length.
|
| 43 |
+
- Thinking is off: the model's chat template with `enable_thinking=False`.
|
| 44 |
+
- **Compute:** one RTX 5090, about 15 hours.
|
| 45 |
+
- **Final validation loss (full sets):** VL 0.295 (VL-2 0.216, curated VL-3 0.542, MolmoPoint 0.498); Compass 1.138.
|
| 46 |
+
- **Held out:** d1's balanced-V3 final test split was never used for training or model selection.
|
| 47 |
+
|
| 48 |
+
## Results
|
| 49 |
+
|
| 50 |
+
### Visual fallback: WebBrain VL-3 frozen validation, same 1,344 rows
|
| 51 |
+
|
| 52 |
+
Greedy generation, `max_new_tokens = max(128, expected + 96)`, scored with the VL-3 pipeline's own scorer
|
| 53 |
+
(`run_webbrain_vl3_gpu_pipeline._score_generation`). The comparison is WebBrain's current visual fallback,
|
| 54 |
+
LFM2.5-VL-450M fine-tuned on VL-3 (selected checkpoint, step 3750), on exactly the same rows: every MolmoPoint
|
| 55 |
+
grounding row except actionable inventory (first 100 of 250), every curated VL-3 row, every 10th VL-2 row.
|
| 56 |
+
|
| 57 |
+
| Metric | MiniCPM-V WebBrain v1 | LFM2.5-VL-450M (VL-3) |
|
| 58 |
+
|---|---:|---:|
|
| 59 |
+
| Schema-valid outputs | **90.1%** | 85.5% |
|
| 60 |
+
| Point within 0.05 (510 rows) | **58.8%** | 45.9% |
|
| 61 |
+
| Grounded interaction: point within 0.05 (255) | **51.0%** | 29.8% |
|
| 62 |
+
| Grounded interaction: mean point distance | **0.139** | 0.189 |
|
| 63 |
+
| Box IoU | **0.113** | 0.050 |
|
| 64 |
+
| Point inside the target box | **23.3%** | 10.4% |
|
| 65 |
+
| Six-section observation valid, VL-2 / VL-3 | **99.7% / 69.3%** | 97.1% / 44.6% |
|
| 66 |
+
| Actionable inventory valid (100) | **19%** | 10% |
|
| 67 |
+
|
| 68 |
+
On intent → point/box the mean point distance is worse (0.248 vs 0.132) although accuracy within 0.05 is higher
|
| 69 |
+
(66.7% vs 62.1%): a minority of far misses. Long inventory lists often do not terminate for either model.
|
| 70 |
+
|
| 71 |
+
### Text and tool calls: WebBrain `test/llm` routing benchmark (compact tier)
|
| 72 |
+
|
| 73 |
+
Same suite and grader as the Compass Tiny cards (`run-llamacpp.mjs` first turns, `run-scenarios.mjs` scenarios),
|
| 74 |
+
served from PyTorch BF16 with seed 3407 and thinking off. The 89 scenarios are the scored ones shared with the
|
| 75 |
+
Compass Tiny v2.1 run; strict = `ideal`, loose = `ideal` + `ideal_name`.
|
| 76 |
+
|
| 77 |
+
| Model | First-turn structured calls | Strict exact action | Loose tool family | Discouraged actions |
|
| 78 |
+
|---|---:|---:|---:|---:|
|
| 79 |
+
| **MiniCPM-V WebBrain v1** (0.8B language model) | 97/100 | 10/89 | 38/89 | 5 |
|
| 80 |
+
| MiniCPM-V-4.7-1B, untuned | 98/100 | 3/89 | 30/89 | 2 |
|
| 81 |
+
| Compass Tiny v2.1 (2.6B, WebGPU q4f16) | 98/100 | 15/89 | 43/89 | 3 |
|
| 82 |
+
| Compass Tiny XS v3 (1.7B, BF16, from its card) | 97/100 | 9/89 | 39/89 | n/a |
|
| 83 |
+
|
| 84 |
+
### Page-state decisions: d1 balanced-V3 final test (126 categorical questions)
|
| 85 |
+
|
| 86 |
+
WebBrain's verify protocol (one Yes/No continuation per option on a shared prefill) plus a linear probe on the
|
| 87 |
+
margin and `decision_hidden`, fit on d1's train split with its strength chosen on validation; the final test is
|
| 88 |
+
never trained on. The conservative probe weighs a false "completed" four times in its fit.
|
| 89 |
+
|
| 90 |
+
| Model | Correct | Completions found | False completions | Unknown recognized | Time per request |
|
| 91 |
+
|---|---:|---:|---:|---:|---:|
|
| 92 |
+
| v1, WebGPU q8, probe | 103/126 | 22/24 | 11/48 | 13/24 | 0.85 s (RTX 5090) |
|
| 93 |
+
| v1, WebGPU q8, conservative probe | 101/126 | 14/24 | **4/48** | 20/24 | 0.85 s |
|
| 94 |
+
| MiniCPM-V-4.7-1B untuned, WebGPU q8, probe | 104/126 | 23/24 | 8/48 | 16/24 | n/a |
|
| 95 |
+
| Bonsai 2 2B Vision + probe (reference) | 110/126 | 21/24 | 4/48 | 20/24 | 2.2 s |
|
| 96 |
+
| d1-omni-600M (reference) | 92/126 | n/a | 1/48 | n/a | 0.75 s |
|
| 97 |
+
|
| 98 |
+
The fine-tune did not improve decisions: its data has no decision-format examples.
|
| 99 |
+
|
| 100 |
+
## Usage
|
| 101 |
+
|
| 102 |
+
```python
|
| 103 |
+
import torch
|
| 104 |
+
from PIL import Image
|
| 105 |
+
from transformers import AutoModelForImageTextToText, AutoProcessor
|
| 106 |
+
|
| 107 |
+
repo = "webbrain-one/minicpmv47-webbrain-v1"
|
| 108 |
+
processor = AutoProcessor.from_pretrained(repo)
|
| 109 |
+
model = AutoModelForImageTextToText.from_pretrained(repo, dtype=torch.bfloat16, device_map="cuda").eval()
|
| 110 |
+
|
| 111 |
+
messages = [{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": "Describe this page."}]}]
|
| 112 |
+
prompt = processor.apply_chat_template(messages, add_generation_prompt=True, enable_thinking=False, tokenize=False)
|
| 113 |
+
inputs = processor(text=[prompt], images=[Image.open("screenshot.png").convert("RGB")], return_tensors="pt").to(model.device)
|
| 114 |
+
out = model.generate(**inputs, do_sample=False, max_new_tokens=512)
|
| 115 |
+
print(processor.tokenizer.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
Tool calls use the chat template's native format: `<tool_call>`, then `<function=NAME>`, then one `<parameter=KEY>`
|
| 119 |
+
block per argument. Pass OpenAI-style `tools=` to `apply_chat_template`, and parse the reply with a Qwen3.5 /
|
| 120 |
+
Qwen3-coder style tool parser that types each argument from the tool's JSON schema.
|
| 121 |
+
|
| 122 |
+
## License
|
| 123 |
+
|
| 124 |
+
The base model is Apache-2.0. This fine-tune was trained on data that includes noncommercial-licensed sources (for
|
| 125 |
+
example the WebLINX-derived Compass subset), so the fine-tuned weights are released for **noncommercial research
|
| 126 |
+
only** under the WebBrain noncommercial research restrictions. Private hosting does not expand those rights.
|
| 127 |
+
Model output is never proof that a browser action succeeded. Keep WebBrain's schema validation, grounding checks and
|
| 128 |
+
confirmations in front of any action.
|