Instructions to use hugonis/chatux-onejev-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hugonis/chatux-onejev-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hugonis/chatux-onejev-4b") 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("hugonis/chatux-onejev-4b") model = AutoModelForMultimodalLM.from_pretrained("hugonis/chatux-onejev-4b", 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 hugonis/chatux-onejev-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hugonis/chatux-onejev-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hugonis/chatux-onejev-4b", "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/hugonis/chatux-onejev-4b
- SGLang
How to use hugonis/chatux-onejev-4b 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 "hugonis/chatux-onejev-4b" \ --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": "hugonis/chatux-onejev-4b", "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 "hugonis/chatux-onejev-4b" \ --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": "hugonis/chatux-onejev-4b", "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 hugonis/chatux-onejev-4b with Docker Model Runner:
docker model run hf.co/hugonis/chatux-onejev-4b
ChatUX OneJev 4B (v2)
Standalone bfloat16 multimodal System-One decision model for AI chat UI visual quality gating. Built by merging hugonis/chatux-onejev-4b-lora (v2) into OmniJev/OneJev1.6-4B in float32.
What changed in v2
Version 1 was trained on a 69%-FAIL split with a compressed ordinal target curve, which pushed clean unseen screens down to 2.1โ2.5 / 4.0 and 0.36โ0.41 ship_ready. Version 2 fixes both root causes:
- 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 production UIs in3.6โ3.9 / 4.0while severe defects stay below1.5 / 4.0. - 3.1x sharper pass/fail separation: Held-out
ship_readyseparation between clean and broken screens rises from+0.2277in v1 to+0.6957in v2, with 30.8% lowerdesign_qualityMAE and 26.8% lower ECE.
Benchmark results
All v1 and v2 metrics 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 completely 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 v1 |
chatux-onejev-4b 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 |
Clean unseen holdout screens from T3 Chat and the assistant-ui Claude static and active views score 3.78โ3.91 / 4.0, with ship_ready between 0.96 and 1.00. Low-contrast, button-collision, and crushed-typography failures drop sharply to 0.77โ2.14 / 4.0, with ship_ready near 0.00โ0.01.
Training recipe
- Base model:
OmniJev/OneJev1.6-4Bwith frozen vision tower andlm_head. - Fine-tuning: PEFT LoRA (
r=32,alpha=64,dropout=0.05) across 248 language linear projections, cast tobfloat16, merged infloat32, and exported inbfloat16. - Objective: Official
OneJevreadout loss (Cross-Entropy + 1.0 * Brier) at the final token overqev-labels-v2answer slots. - Augmentation: Random option-order permutation per row and epoch removes slot bias alongside mixed JSON state formatting.
- Data: 1,344 balanced decision rows across 177 unique live desktop and mobile captures, pairing clean threads with live-DOM CSS defect injections.
- 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 separation (+0.6957).
Installation
Install Flide to serve the checkpoint directly over HTTP.
pip install flide
Quickstart
Serve directly on a single GPU or tensor-parallel across two 8 GB GPUs without merging any adapter:
# Single GPU (>=12 GB VRAM)
flide serve --model hugonis/chatux-onejev-4b --host 127.0.0.1 --port 8082
# Dual 8 GB GPUs (e.g., 2x RTX 3070 Ti)
NCCL_P2P_DISABLE=1 flide serve \
--model hugonis/chatux-onejev-4b \
--device cuda:0 --tp 2 --budget 4096 --no-cuda-graphs --session-cache-gb 0 \
--host 127.0.0.1 --port 8082
Send a multi-question /v1/systemone request for one screenshot:
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.",
},
},
"design_quality": {
"type": "score",
"instructions": "Rate the overall visual design, legibility, layout craft, and production polish of this screenshot.",
"criteria": [
"broken or severely degraded UI",
"poor polish with major blocking UX defects",
"functional UI with noticeable craft or ergonomic issues",
"clean well-crafted production UI",
"flagship polished AI chat UI",
],
},
},
}
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 analytics dashboards or non-Latin typography may need domain-specific fine-tuning.
- Subtle geometry defects on sparse landing pages, like one slightly undersized icon button, can slip past pixel inspection. Pair this model with deterministic DOM hit-target and APCA contrast checks.
- Intended as a fast System-One triage gate paired with deterministic DOM/APCA checks and a System-Two generator for CSS fixes.
License
Released under the Apache-2.0 license, matching OmniJev/OneJev1.6-4B.
- Downloads last month
- 30