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
docs: archive early synthetic-only 9B experiment and point to OpenAdapt-Veto-4B-r5
Browse files
README.md
CHANGED
|
@@ -13,106 +13,27 @@ tags:
|
|
| 13 |
- lora
|
| 14 |
- peft
|
| 15 |
- qwen3.5
|
|
|
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
-
# OpenAdapt-Veto-9B-v4
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
-
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
-
|
| 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 |
-
|
|
|
|
| 33 |
|
| 34 |
-
|
| 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 (a dark-mode web admin dashboard at `1280x800` and a 150%-scaled Retina web portal at `1920x1200`):
|
| 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 the dark-mode admin dashboard split 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 |
-
- **
|
| 117 |
-
- **
|
| 118 |
-
- **
|
|
|
|
| 13 |
- lora
|
| 14 |
- peft
|
| 15 |
- qwen3.5
|
| 16 |
+
- deprecated
|
| 17 |
+
- archived
|
| 18 |
---
|
| 19 |
|
| 20 |
+
# OpenAdapt-Veto-9B-v4 (Deprecated / Archived)
|
| 21 |
|
| 22 |
+
> **Deprecated:** This model is an early synthetic-only experiment and is no longer maintained. Use [`OpenAdapt/OpenAdapt-Veto-4B-r5`](https://huggingface.co/OpenAdapt/OpenAdapt-Veto-4B-r5) (and the OpenAdapt deterministic verification checks in [`OpenAdaptAI/OpenAdapt`](https://github.com/OpenAdaptAI/OpenAdapt)) instead.
|
| 23 |
|
| 24 |
+
## Why this checkpoint is archived
|
| 25 |
|
| 26 |
+
`OpenAdapt-Veto-9B-v4` was an early `111 MB` LoRA adapter on `Qwen/Qwen3.5-9B` (`~6.6 GB` VRAM in 4-bit NF4, `~1.1 s` p50 latency on an L4 GPU) trained and tested only on synthetic browser screenshots.
|
| 27 |
|
| 28 |
+
Subsequent work showed two things:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
1. **Deterministic checks belong in code, not a 9B VLM.** Entity matching, policy thresholds, DOM binding, and confirmation-ID read-back run in under 5 ms with 0% false vetoes.
|
| 31 |
+
2. **A smaller 4B LoRA is faster and easier to deploy locally.** [`OpenAdapt/OpenAdapt-Veto-4B-r5`](https://huggingface.co/OpenAdapt/OpenAdapt-Veto-4B-r5) (`81 MB` adapter on `Qwen/Qwen3.5-4B`, `3.1 GB` VRAM in 4-bit NF4) runs in `~118 ms` with constrained 3-token decoding and is the active local checkpoint for taint/prompt-injection screening and `384x384` target-crop checks.
|
| 32 |
|
| 33 |
+
This repository remains public only for reproducibility of earlier internal notes. Do not use it for new deployments or benchmark comparisons.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
## Links
|
| 36 |
|
| 37 |
+
- **Active model:** [`OpenAdapt/OpenAdapt-Veto-4B-r5`](https://huggingface.co/OpenAdapt/OpenAdapt-Veto-4B-r5)
|
| 38 |
+
- **OpenAdapt repository (MIT):** [OpenAdaptAI/OpenAdapt](https://github.com/OpenAdaptAI/OpenAdapt)
|
| 39 |
+
- **Website:** [openadapt.ai](https://openadapt.ai)
|