Instructions to use hugonis/chatux-onejev-4b-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use hugonis/chatux-onejev-4b-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("OmniJev/OneJev1.6-4B") model = PeftModel.from_pretrained(base_model, "hugonis/chatux-onejev-4b-lora") - Notebooks
- Google Colab
- Kaggle
ChatUX OneJev 4B LoRA (v2)
A bfloat16 PEFT LoRA adapter (124 MB) on OmniJev/OneJev1.6-4B that scores AI chat UI screenshots in one forward pass.
What changed in v2
Version 1 was trained on a 69%-FAIL dataset with a compressed ordinal target curve, leaving clean unseen interfaces around 2.1β2.5 / 4.0 and 0.36β0.41 ship_ready. Version 2 resolves both issues:
- Balanced 50/50 PASS/FAIL training split: 1,344 decision rows from 192 balanced screens across 177 unique real captures, adding active multi-turn chat threads with markdown, code blocks, and reasoning panels.
- Unbiased ordinal calibration: Gaussian soft targets (
sigma=0.38, mapping(score - 1.8) / 1.9to[0, 4]) place clean unseen UIs in3.6β3.9 / 4.0while severe defects stay below1.5 / 4.0. - 3.1x sharper pass/fail separation: Held-out
ship_readyseparation jumps from+0.2277(v1) to+0.6957(v2), cuttingdesign_qualityMAE by 30.8% and ECE by 26.8%.
Benchmark results
All v1 and v2 numbers below were measured live through Flide on a single 8 GB GPU with INT8 quantization at 260 ms median latency per 7-question screenshot. The holdout covers 18 unseen production screens and 126 decision rows from T3 Chat and the assistant-ui Claude replica, including active multi-turn threads.
| Metric | Zero-shot OneJev1.6-4B |
chatux-onejev-4b-lora v1 |
chatux-onejev-4b-lora v2 |
v2 vs v1 |
|---|---|---|---|---|
| Overall Accuracy | 68.25% | 87.30% | 86.51% | -0.79 pts |
| Overall Brier Score | 0.4177 | 0.2071 | 0.1898 | -8.4% |
| Overall ECE | 0.1139 | 0.1188 | 0.0870 | -26.8% |
design_quality MAE (0β4) |
β | 0.8463 | 0.5858 | -30.8% |
ship_ready clean mean |
β | 0.4085 | 0.9889 | +0.5804 |
ship_ready clean-vs-fail gap |
β | +0.2277 | +0.6957 | 3.1x |
ship_ready (noul) |
50.0% acc / 0.6226 Brier | 72.2% acc / 0.3143 Brier | 77.8% acc / 0.3383 Brier | +5.6 pts acc |
legible_contrast (noul) |
100.0% acc / 0.1278 Brier | 100.0% acc / 0.0005 Brier | 100.0% acc / 0.0000 Brier | -100% Brier |
clean_layout (noul) |
83.3% acc / 0.3084 Brier | 88.9% acc / 0.1777 Brier | 88.9% acc / 0.1432 Brier | -19.4% Brier |
touch_ergonomics (noul) |
83.3% acc / 0.3787 Brier | 88.9% acc / 0.2358 Brier | 88.9% acc / 0.2113 Brier | -10.4% Brier |
readable_typography (noul) |
88.9% acc / 0.2318 Brier | 100.0% acc / 0.0290 Brier | 100.0% acc / 0.0024 Brier | -91.7% Brier |
primary_defect (5-way choice) |
61.1% acc / 0.5806 Brier | 88.9% acc / 0.3248 Brier | 77.8% acc / 0.3575 Brier | -11.1 pts |
design_quality (0β4 score) |
11.1% acc / 0.6740 Brier | 72.2% acc / 0.3674 Brier | 72.2% acc / 0.2761 Brier | -24.9% Brier |
Training recipe
- Base model:
OmniJev/OneJev1.6-4Bwith frozen vision tower andlm_head. - Adapter: PEFT LoRA with
r=32,alpha=64, anddropout=0.05across 248 language projections. Trainable weights total64.9Mparameters exported inbfloat16(124 MB). - Objective: Official
OneJevreadout loss (Cross-Entropy + 1.0 * Brier) computed at the final token overqev-labels-v2slots. - Augmentation: Random option-order permutation per row and epoch removes slot bias, paired with mixed compact and indented JSON state formatting.
- Data: 1,344 balanced decision rows (50% PASS, 50% FAIL) built from 177 unique live captures across public AI chat apps, pairing clean screens and active multi-turn threads with live-DOM CSS defects.
- Schedule: 3 epochs on A100 (
lr=8e-5, cosine decay, batch size 16). Epoch 3 delivered the best live INT8 Brier (0.1898),design_qualityMAE (0.5858), and pass/fail separation (+0.6957).
Installation
Install Flide for serving, or peft and transformers if you want to merge the weights first.
pip install flide
# Optional, for merging the LoRA into the base weights:
pip install torch transformers peft
Quickstart
readout.json ships beside the adapter so Flide auto-detects the onejev format.
flide serve --model hugonis/chatux-onejev-4b-lora --host 127.0.0.1 --port 8082
For pre-merged bfloat16 weights ready for single-GPU or --tp 2 serving, use hugonis/chatux-onejev-4b or merge locally:
import torch
from peft import PeftModel
from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration
base_id = "OmniJev/OneJev1.6-4B"
model = Qwen3_5ForConditionalGeneration.from_pretrained(base_id, dtype=torch.bfloat16)
model = PeftModel.from_pretrained(model, "hugonis/chatux-onejev-4b-lora").merge_and_unload()
model.save_pretrained("./chatux-onejev-4b-merged")
AutoProcessor.from_pretrained(base_id).save_pretrained("./chatux-onejev-4b-merged")
Query multiple UI gates in one shared-prefix /v1/systemone request:
import base64, json, urllib.request
from pathlib import Path
b64 = base64.b64encode(Path("screenshot.png").read_bytes()).decode("ascii")
payload = {
"state": {
"role": "Senior AI Chat UI/UX Design Gate Auditor",
"viewport": "desktop",
"screenshot": "<image:1>",
},
"media": [{"type": "image", "data": f"data:image/png;base64,{b64}"}],
"questions": {
"ship_ready": {
"type": "noul",
"instructions": "Does this AI chat UI screenshot meet a production polish bar without blocking defects?",
},
"primary_defect": {
"type": "choice",
"instructions": "What is the single most prominent visual or UX defect in this AI chat UI screenshot?",
"criteria": {
"none": "No blocking visual defect; clean, legible, production-ready AI chat UI.",
"low_contrast": "Washed-out or faint text, links, and button labels failing contrast.",
"overlap_overflow": "Colliding buttons, clipped header bar, or horizontal overflow.",
"tiny_targets": "Tiny cramped buttons or undersized mobile composer input.",
"crushed_typography": "Collapsed line-height or crushed paragraph rhythm.",
},
},
},
}
req = urllib.request.Request(
"http://127.0.0.1:8082/v1/systemone",
data=json.dumps(payload).encode("utf-8"),
headers={"Content-Type": "application/json"},
)
with urllib.request.urlopen(req) as resp:
print(json.dumps(json.loads(resp.read()), indent=2))
Limitations
- Trained on English desktop and mobile AI chat interfaces. Dense dashboards or non-Latin scripts may need extra training data.
- Subtle geometry regressions on sparse landing pages, like one slightly undersized icon button, can evade pixel inspection. Pair this adapter with deterministic DOM hit-target and APCA contrast checks.
- Designed as a fast System-One triage gate alongside deterministic DOM checks and a System-Two CSS fixer.
License
Released under the Apache-2.0 license, matching OmniJev/OneJev1.6-4B.
- Downloads last month
- 19