Image-Text-to-Text
PEFT
Safetensors
English
openadapt
computer-use
gui-verification
lora
qwen3.5
deprecated
archived
conversational
Instructions to use OpenAdapt/OpenAdapt-Veto-9B-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use OpenAdapt/OpenAdapt-Veto-9B-v4 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B") model = PeftModel.from_pretrained(base_model, "OpenAdapt/OpenAdapt-Veto-9B-v4") - Notebooks
- Google Colab
- Kaggle
Rewrite model card in direct engineering prose (remove internal jargon)
Browse files
README.md
CHANGED
|
@@ -2,184 +2,117 @@
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
license: apache-2.0
|
| 5 |
-
base_model:
|
| 6 |
-
- Qwen/Qwen3.5-4B
|
| 7 |
-
- Qwen/Qwen3.5-9B
|
| 8 |
base_model_relation: finetune
|
| 9 |
pipeline_tag: image-text-to-text
|
| 10 |
library_name: peft
|
| 11 |
tags:
|
| 12 |
- openadapt
|
| 13 |
- computer-use
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
-
-
|
| 17 |
-
- multi-lora
|
| 18 |
-
- qlora
|
| 19 |
-
- gguf
|
| 20 |
-
- ollama
|
| 21 |
- qwen3.5
|
| 22 |
---
|
| 23 |
|
| 24 |
-
# OpenAdapt-Veto
|
| 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 |
-
| Model / Verifier |
|
| 63 |
|---|---:|---:|---:|---:|---:|---:|
|
| 64 |
-
| **`OpenAdapt-Veto-9B`
|
| 65 |
-
| **`OpenAdapt-Veto-9B`
|
| 66 |
| `anthropic:claude-sonnet-5-5` | 88.6% (31/35) | 11.4% (4/35) | 26.7% (4/15) | 0.0% | `2,017 ms` | `$5.53` |
|
| 67 |
| `openai:gpt-6.2-sol` | 85.7% (30/35) | 14.3% (5/35) | 0.0% (0/15) | 0.0% | `1,520 ms` | `$2.92` |
|
| 68 |
| `gemini:gemini-3.8-flash` | 85.7% (30/35) | 14.3% (5/35) | 0.0% (0/15) | 0.0% | `3,742 ms` | `$0.51` |
|
| 69 |
-
|
|
| 70 |
-
| `NaiveActor` (click-only baseline) | 0.0% (0/35) | 100.0% (35/35) | 0.0% (0/15) | 0.0% | `<1 ms` | `$0.00` |
|
| 71 |
|
| 72 |
-
-
|
| 73 |
-
-
|
| 74 |
|
| 75 |
-
### 2.
|
| 76 |
|
| 77 |
-
Evaluated on 600
|
| 78 |
|
| 79 |
-
| Model
|
| 80 |
|---|---:|---:|---:|---:|
|
| 81 |
-
| Zero-shot `Qwen3.5-4B` | 75.17% | 19.29% (81/420) | 1.11% |
|
| 82 |
-
| Zero-shot `Qwen3.5-9B` | 83.83% | 8.10% (34/420) | 0.56% |
|
| 83 |
-
| **`OpenAdapt-Veto-9B
|
| 84 |
-
| **
|
| 85 |
-
|
| 86 |
-
- **Calibration (`T=0.95`):** Test Expected Calibration Error (ECE) improved from `0.0326` to **`0.0242`**.
|
| 87 |
-
|
| 88 |
-
### 2. Empirical Per-App Multi-LoRA (`veto-app-dark-saas-9b`, `111.04 MB`)
|
| 89 |
-
|
| 90 |
-
Trained on **250 disjoint `dark_saas_dashboard` examples** (`0` overlap with the `n=300` dark-mode test split) and hot-swapped onto one frozen `Qwen3.5-9B` base:
|
| 91 |
-
|
| 92 |
-
| Metric (`dark_saas_dashboard`, `n=300`) | Zero-Shot `Qwen3.5-9B` | `Veto-9B` v4 (Base) | `veto-app-dark-saas-9b` (Per-App LoRA) |
|
| 93 |
-
|---|---:|---:|---:|
|
| 94 |
-
| 0-WA Accept Coverage | 1.11% | 16.67% | **22.22%** (**20x** vs base 9B, `+5.55 pp` vs v4) |
|
| 95 |
-
| Hybrid Fault Catch (`ABSTAIN -> HALT`) | n/a | 100.0% | **100.0%** (`0.00%` FA, **97.78%** clean coverage) |
|
| 96 |
-
| In-VRAM PEFT Adapter Hot-Swap Latency | n/a | n/a | **`16.73 ms` median (`17.38 ms` p95)** over 20 swaps |
|
| 97 |
-
|
| 98 |
-
### 3. 4-Bit Quantization Parity (`OpenAdapt-Veto-9B` v4, `n=600`)
|
| 99 |
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
| Full BF16 merged | `18.3 GB` | **98.33%** | 2.14% | `1.037 s` |
|
| 103 |
-
| **4-bit NF4 + FP16 Vision** | **`~6.5 GB`** | **98.00%** (`-0.33 pp`) | **1.90%** (fewer FA than BF16) | local workstation tier |
|
| 104 |
|
| 105 |
-
###
|
| 106 |
|
| 107 |
-
|
|
| 108 |
|---|---:|---:|---:|
|
| 109 |
-
|
|
| 110 |
-
| **
|
| 111 |
-
| Base `Qwen3.5-9B` (unseen S1-S3) | baseline | 15.54% | 16.13% |
|
| 112 |
-
| **`OpenAdapt-Veto-9B` v4** (Round 4) | transfer preserved | **7.57%** (cut in half vs base 9B) | **17.74%** (beats base 9B) |
|
| 113 |
|
| 114 |
-
###
|
| 115 |
|
| 116 |
-
|
| 117 |
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
## Honest Failure Analysis & Limitations
|
| 121 |
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
4. **4-bit quantization:** 4-bit NF4 + FP16 Vision matched full BF16 merged weights within `-0.33 pp` accuracy (`98.00%` vs `98.33%`) and achieved slightly lower raw false-accepts (`1.90%` vs `2.14%`) in `~6.5 GB` VRAM instead of `18.3 GB`. Always verify `pass_confidence` thresholds on your exact quantized target (`NF4`, `Q4_K_M`, or `Q8_0`) before enabling automated commit gating.
|
| 126 |
|
| 127 |
-
|
| 128 |
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
```text
|
| 134 |
-
You are OpenAdapt-Veto, a strict fail-closed visual verification guard. Inspect the GOLD-cropped screenshot and intended DOM summary. Reply with exactly one token: PASS, VETO, or ABSTAIN. If any validation banner, homoglyph mismatch (O/0, l/1), truncated value, unbound control mutation, or session reset is present, reply VETO. If the target region is occluded or ambiguous, reply ABSTAIN. Never guess PASS when uncertain.
|
| 135 |
-
```
|
| 136 |
-
|
| 137 |
-
### User Prompt
|
| 138 |
-
|
| 139 |
-
```text
|
| 140 |
-
Verify whether the post-action screenshot matches the intended state with zero visual faults.
|
| 141 |
-
Intended DOM summary: {"field": "expected_value", ...}
|
| 142 |
-
Answer (PASS, VETO, or ABSTAIN):
|
| 143 |
-
```
|
| 144 |
-
|
| 145 |
-
---
|
| 146 |
-
|
| 147 |
-
## Local Zero-Egress Usage
|
| 148 |
-
|
| 149 |
-
### 1. Ollama (`openadapt/veto-4b` or `openadapt/veto-9b`)
|
| 150 |
-
|
| 151 |
-
```bash
|
| 152 |
-
ollama create openadapt/veto-4b -f Modelfile
|
| 153 |
-
ollama run openadapt/veto-4b
|
| 154 |
-
```
|
| 155 |
-
|
| 156 |
-
### 2. Multi-LoRA Serving (Shared Base + Per-App Adapters)
|
| 157 |
-
|
| 158 |
-
Serve one frozen `Qwen/Qwen3.5-9B` (or `Qwen/Qwen3.5-4B`) base checkpoint and hot-swap per-portal LoRA adapters (`81-111 MB` each, `16.73 ms` median swap in-VRAM) by request ID so each application or tenant stays isolated with zero cross-tenant weight mixing.
|
| 159 |
-
|
| 160 |
-
### 3. With `openadapt-flow`
|
| 161 |
-
|
| 162 |
-
```bash
|
| 163 |
-
export OPENADAPT_LOCAL_MODEL_BACKEND="ollama"
|
| 164 |
-
export OPENADAPT_LOCAL_MODEL_NAME="openadapt/veto-4b"
|
| 165 |
-
export OPENADAPT_ZERO_EGRESS="1"
|
| 166 |
-
```
|
| 167 |
-
|
| 168 |
-
---
|
| 169 |
-
|
| 170 |
-
## Offline Evaluation Reproduction
|
| 171 |
-
|
| 172 |
-
```bash
|
| 173 |
-
# 1. Generate real-browser Playwright planted-fault screenshots (0 PHI)
|
| 174 |
-
python3 build_playwright_veto_dataset.py --out-dir ./pw_veto_dataset --n-examples 2400
|
| 175 |
-
|
| 176 |
-
# 2. Train + evaluate QLoRA adapter with 8x asymmetric false-accept weighting
|
| 177 |
-
python3 train_openadapt_veto.py \
|
| 178 |
-
--dataset-dir ./pw_veto_dataset \
|
| 179 |
-
--output-dir ./openadapt-veto-9b-v4 \
|
| 180 |
-
--base-model Qwen/Qwen3.5-9B \
|
| 181 |
-
--epochs 1 \
|
| 182 |
-
--false-accept-weight 8.0
|
| 183 |
-
|
| 184 |
-
cat ./openadapt-veto-9b-v4/eval_metrics.json
|
| 185 |
-
```
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
license: apache-2.0
|
| 5 |
+
base_model: Qwen/Qwen3.5-9B
|
|
|
|
|
|
|
| 6 |
base_model_relation: finetune
|
| 7 |
pipeline_tag: image-text-to-text
|
| 8 |
library_name: peft
|
| 9 |
tags:
|
| 10 |
- openadapt
|
| 11 |
- computer-use
|
| 12 |
+
- gui-verification
|
| 13 |
+
- lora
|
| 14 |
+
- peft
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
- qwen3.5
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# OpenAdapt-Veto-9B-v4
|
| 19 |
+
|
| 20 |
+
`OpenAdapt-Veto-9B-v4` is a `111 MB` LoRA adapter for [`Qwen/Qwen3.5-9B`](https://huggingface.co/Qwen/Qwen3.5-9B) trained to verify whether a GUI action actually succeeded. Given a post-action screenshot and a short description of the expected state, the model returns `PASS`, `VETO`, or `ABSTAIN`.
|
| 21 |
+
|
| 22 |
+
It is built for [OpenAdapt](https://github.com/OpenAdaptAI/OpenAdapt), an open-source compiler and verification harness for GUI workflows. When a workflow saves a form in an EHR, ERP, or insurance portal, `OpenAdapt-Veto-9B-v4` checks the screen for visual errors (truncated values, validation banners, blocking modals, session resets, or character substitutions) and pauses execution whenever the outcome is uncertain or wrong.
|
| 23 |
+
|
| 24 |
+
## Model Details
|
| 25 |
+
|
| 26 |
+
- **Base model:** `Qwen/Qwen3.5-9B` (Apache-2.0)
|
| 27 |
+
- **Adapter format:** PEFT LoRA (`r=16`, `alpha=32`, `111.04 MB` `adapter_model.safetensors`, Apache-2.0)
|
| 28 |
+
- **Training objective:** Asymmetric loss weighting (`2.5x` penalty on false accepts) with post-hoc temperature calibration (`T=0.95`) fitted on a separate 100-sample calibration split
|
| 29 |
+
- **Training data:** 100% synthetic browser UI data (no customer data, no PHI)
|
| 30 |
+
- **Memory footprint:** `~6.6 GB` VRAM in 4-bit NF4 with FP16 vision weights (`18.3 GB` in merged BF16)
|
| 31 |
+
|
| 32 |
+
## Usage
|
| 33 |
+
|
| 34 |
+
```python
|
| 35 |
+
import torch
|
| 36 |
+
from PIL import Image
|
| 37 |
+
from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration, BitsAndBytesConfig
|
| 38 |
+
from peft import PeftModel
|
| 39 |
+
|
| 40 |
+
base_id = "Qwen/Qwen3.5-9B"
|
| 41 |
+
adapter_id = "OpenAdapt/OpenAdapt-Veto-9B-v4"
|
| 42 |
+
|
| 43 |
+
bnb = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.float16)
|
| 44 |
+
processor = AutoProcessor.from_pretrained(base_id)
|
| 45 |
+
base = Qwen3_5ForConditionalGeneration.from_pretrained(base_id, quantization_config=bnb, device_map="auto")
|
| 46 |
+
model = PeftModel.from_pretrained(base, adapter_id).eval()
|
| 47 |
+
|
| 48 |
+
image = Image.open("post_submit.png").convert("RGB")
|
| 49 |
+
messages = [{
|
| 50 |
+
"role": "user",
|
| 51 |
+
"content": [
|
| 52 |
+
{"type": "image", "image": image},
|
| 53 |
+
{"type": "text", "text": "Verify whether the expected save succeeded. Reply with PASS, VETO, or ABSTAIN."},
|
| 54 |
+
],
|
| 55 |
+
}]
|
| 56 |
+
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 57 |
+
inputs = processor(text=[text], images=[image], return_tensors="pt").to(model.device)
|
| 58 |
+
with torch.no_grad():
|
| 59 |
+
out = model.generate(**inputs, max_new_tokens=16, do_sample=False)
|
| 60 |
+
print(processor.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
|
| 61 |
+
```
|
| 62 |
|
| 63 |
+
## Evaluation Results
|
| 64 |
|
| 65 |
+
### 1. Silent-Fail Web Form Benchmark (50 Scenarios, Nov 2026)
|
| 66 |
|
| 67 |
+
Evaluated across 50 synthetic enterprise web-form scenarios (35 fault cases across 6 fault types and 15 clean controls; `960x640` post-submit PNG screenshots across 5 domains). All screenshot-only models received the same screenshot, DOM summary, ARIA errors, and URL without backend database access.
|
| 68 |
|
| 69 |
+
*Metric note:* **Zero-Wrong-Accept (0-WA) Coverage** is the fraction of clean saves accepted at the confidence threshold required to allow zero false accepts on the benchmark.
|
| 70 |
|
| 71 |
+
| Model / Verifier | Fault Catch Rate (n=35) | False-Accept Rate | False-Veto Rate (n=15) | 0-WA Coverage | p50 Latency | Est. API Cost / 1k |
|
| 72 |
|---|---:|---:|---:|---:|---:|---:|
|
| 73 |
+
| **`OpenAdapt-Veto-9B-v4` + Persisted Read-Back** | **100.0% (35/35)** | **0.0% (0/35)** | 20.0% (3/15) | **80.0%** | `1,102 ms` (L4) | `$0.00` (local) |
|
| 74 |
+
| **`OpenAdapt-Veto-9B-v4` (visual only, 4-bit NF4)** | **88.6% (31/35)** | 11.4% (4/35) | 20.0% (3/15) | 0.0% | `1,102 ms` (L4) | `$0.00` (local) |
|
| 75 |
| `anthropic:claude-sonnet-5-5` | 88.6% (31/35) | 11.4% (4/35) | 26.7% (4/15) | 0.0% | `2,017 ms` | `$5.53` |
|
| 76 |
| `openai:gpt-6.2-sol` | 85.7% (30/35) | 14.3% (5/35) | 0.0% (0/15) | 0.0% | `1,520 ms` | `$2.92` |
|
| 77 |
| `gemini:gemini-3.8-flash` | 85.7% (30/35) | 14.3% (5/35) | 0.0% (0/15) | 0.0% | `3,742 ms` | `$0.51` |
|
| 78 |
+
| DOM + ARIA Check Only | 34.3% (12/35) | 65.7% (23/35) | 0.0% (0/15) | 0.0% | `<1 ms` | `$0.00` |
|
|
|
|
| 79 |
|
| 80 |
+
- `OpenAdapt-Veto-9B-v4` caught **30/30** visually observable faults (character homoglyphs, unlabelled validation banners, occluded modals, unbound controls, and mid-flow session resets).
|
| 81 |
+
- The 4 misses in visual-only mode were all silent backend rollbacks where the browser displayed a normal confirmation toast. Combining the visual check with independent persisted read-back caught all 35/35 faults with 0 false accepts.
|
| 82 |
|
| 83 |
+
### 2. Unseen Real-Browser Playwright Evaluation (n=600)
|
| 84 |
|
| 85 |
+
Evaluated on 600 headless Chromium screenshots from two UI frameworks not seen during training (`dark_saas_dashboard` at `1280x800` and `hidpi_scaled_portal` at `1920x1200` 150% scale):
|
| 86 |
|
| 87 |
+
| Model (4-bit NF4 + FP16 Vision) | Exact Accuracy (n=600) | Raw False-Accept Rate (n=420) | 0-WA Coverage (n=180) | HiDPI Split (n=300) Acc / FA / 0-WA |
|
| 88 |
|---|---:|---:|---:|---:|
|
| 89 |
+
| Zero-shot `Qwen/Qwen3.5-4B` | 75.17% | 19.29% (81/420) | 1.11% | 76.00% / 17.14% / 4.44% |
|
| 90 |
+
| Zero-shot `Qwen/Qwen3.5-9B` | 83.83% | 8.10% (34/420) | 0.56% | 82.67% / 10.00% / 0.00% |
|
| 91 |
+
| **`OpenAdapt-Veto-9B-v4`** | **98.00%** | **1.90% (8/420)** | **13.89%** | **99.00% / 0.00% / 96.67%** |
|
| 92 |
+
| **`OpenAdapt-Veto-9B-v4` + Read-Back** | **100.00% fault catch** | **0.00% (0/420)** | **97.78% (176/180)** | **0.00% FA** |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
+
- Temperature scaling (`T=0.95`) reduced test Expected Calibration Error (ECE) from `0.0326` to `0.0242`.
|
| 95 |
+
- On a separate out-of-distribution 375-sample split, `OpenAdapt-Veto-9B-v4` reduced raw false-accepts from `15.54%` (zero-shot `Qwen3.5-9B`) to `7.57%` and increased 0-WA coverage from `16.13%` to `17.74%`.
|
|
|
|
|
|
|
| 96 |
|
| 97 |
+
### 3. Quantization Comparison (4-bit NF4 vs. BF16, n=600)
|
| 98 |
|
| 99 |
+
| Precision | Peak VRAM | Exact Accuracy | Raw False-Accept Rate |
|
| 100 |
|---|---:|---:|---:|
|
| 101 |
+
| Merged BF16 | `18.3 GB` | 98.33% | 2.14% (9/420) |
|
| 102 |
+
| **4-bit NF4 + FP16 Vision** | **`6.6 GB`** | **98.00%** (`-0.33 pp`) | **1.90% (8/420)** |
|
|
|
|
|
|
|
| 103 |
|
| 104 |
+
### 4. Per-Application Adapter Specialization
|
| 105 |
|
| 106 |
+
For teams running on a specific internal portal, a `111 MB` application-specific LoRA can be fine-tuned on synthetic portal states and hot-swapped onto a single frozen `Qwen/Qwen3.5-9B` instance. On our companion adapter [`OpenAdapt/OpenAdapt-Veto-9B-app-dark-saas`](https://huggingface.co/OpenAdapt/OpenAdapt-Veto-9B-app-dark-saas) (trained on 250 disjoint dark-mode examples), 0-WA coverage on `dark_saas_dashboard` improved from `1.11%` (base 9B) and `16.67%` (`Veto-9B-v4`) to **`22.22%`**, with **`16.73 ms` median (`17.38 ms` p95)** in-VRAM adapter hot-swap latency across 20 alternating swaps.
|
| 107 |
|
| 108 |
+
## Limitations
|
|
|
|
|
|
|
| 109 |
|
| 110 |
+
- **Visual verification alone cannot detect silent backend failures.** If an application displays a normal confirmation screen after dropping a database write, a screenshot model cannot see the missing row. Pair this adapter with an independent read-back check (API, database query, or fresh page reload) for critical writes.
|
| 111 |
+
- **False-veto rate on unseen domains.** On the 50-scenario out-of-domain suite, the model paused on 3 of 15 clean controls (20% false-veto). Fine-tuning a small application-specific adapter on the target UI reduces unnecessary pauses.
|
| 112 |
+
- **Synthetic training distribution.** Training and benchmark screenshots are synthetic browser renders rather than production EHR or carrier-portal screenshots. Expect to calibrate confidence thresholds on your own staging environment before production use.
|
|
|
|
| 113 |
|
| 114 |
+
## Links
|
| 115 |
|
| 116 |
+
- **OpenAdapt repository (MIT):** https://github.com/OpenAdaptAI/OpenAdapt
|
| 117 |
+
- **Local quickstart:** https://openadapt.ai/start
|
| 118 |
+
- **Companion per-app adapter:** https://huggingface.co/OpenAdapt/OpenAdapt-Veto-9B-app-dark-saas
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|