Can a small model learn UI design?

We trained Qwen3.5-9B on 205 examples of effective UIs, then conducted 512 rounds of RL using GPT-6.1-sol as a judge. The student reached a 67.7% win rate against the untrained baseline, 17.7 percentage points above an even match.

Visual RL reaches a 67.7% win rate against the untrained Qwen model.

Live UI stream

LivePreparing the renderer
Waiting for a generated UI

Preparing the Qwen run. The first generated UI will appear here.

Grader · GPT-6.1 SolAwaiting grade
Waiting for a generated UI

One actual generated interface per frame, not a screen recording.

Connecting…

What is happening?

Training and held-out evaluation are complete. Replay the generated interfaces above.

Training reward

━Total reward━25-update moving average

Updates after each RL update. Training rewards are provisional.

Background

UIRL trains a text model from screenshots scored by a vision model. This run starts with Qwen3.5-9B and asks whether broader practice and richer feedback improve the interfaces it can generate.

Methodology

Qwen3.5-9B generates HTML/CSS from text. After a supervised warm start, it learns from desktop and mobile screenshots scored for hierarchy, spacing, typography, color, craft, content, usability, visible accessibility, responsiveness and brief fulfilment. Executable checks remain separate. The final checkpoint will face the untouched base, supervised-only and best-of-four on new unseen briefs.

The rubric scores hierarchy, spacing, typography, color, craft, realistic content, usability, visible accessibility, responsiveness and brief fulfilment. Richness means purposeful detail, not extra decoration. Every dimension has its own anchored guidance. Executable checks cover HTML, required content, native controls and geometry.

Generated pages run without JavaScript or external network requests. These are static prototypes, not working backends or accessibility-certified products. All briefs and content are synthetic.

Results

RL wins 67.7% against the untrained base (95% interval 57.3% to 77.1%), 88.0% against supervised-only and 47.9% against base best-of-four. Ties count as half a win. These are blind model judgments, not human preferences.

Discussion

Qwen already knows general coding and UI patterns. This tests adaptation, not design from scratch. Training and evaluation use the same judge family with different prompts; there is no human preference study. Synthetic held-out task families do not establish general design quality. Best-of-four spends more generation and ranking work per delivered UI. The richer rubric, model and briefs differ from the earlier run, so its absolute scores are not a controlled before/after comparison.

Cost and runtime

WorkEstimated cost (USD)
Teacher examples$12.04
RL feedback and checks$84.39
Held-out scoring$5.87
Blind comparisons$3.39
Generation checks$0.03
GPU rental and disk$25.42
Total estimated cost$131.15

GPT-6.1-sol API calls total $105.72, including $1.75 allowed for 7 calls without usage receipts. GPU cost uses the recorded hourly rates and rental-to-cleanup windows. Includes startup, checks, failed attempts and recovery. Excludes bandwidth, tax, shared hosting and post-run GGUF export. Estimates, not invoices.

23h 15m elapsed overall, with 21h 14m of rented GPU time. Teacher generation: 1h 13m; supervised training: 13m; RL: 18h 17m (including interrupted work); held-out generation and scoring: 1h 05m; blind comparisons: 8m. GPU time includes setup and idle waits; it is not added to the phase runtimes.

Conclusion

The trained model improves on the base here, but best-of-four remains an important alternative. Test real briefs and human preference next.

The final adapter and Q4_K_M GGUF are archived privately on Hugging Face. GGUF has not been re-benchmarked. No public model release.

Appendix

48 held-out briefs across booking, settings, pricing, search, checkout, comparison, with 2 generation seeds; 576 candidates and 288 blind comparisons. Training: 512 briefs across 16 families; 205 accepted supervised examples, 2 epochs, 52 supervised updates; 512 RL updates with 4 briefs and 4 candidates per brief. Student: Qwen/Qwen3.5-9B at c202236235762e1c871ad0ccb60c8ee5ba337b9a; rank-32 LoRA, BF16, non-thinking text-only input. GPU: NVIDIA A100-SXM4-80GB. TRL 1.15.0; vLLM 0.31.0, CUDA graphs, bounded concurrent evaluation scoring. Final checkpoint fixed before testing. Intervals use 10000 brief-cluster resamples. See the protocol for the full anchored rubric and frozen settings. Training resumed from the latest durable checkpoint (448) after a time limit. The 17 later optimizer updates were not saved; their 18 scored batches (288 candidates) remain in the replay as an interrupted attempt, outside the retained 512-update trajectory. Optimizer, scheduler and training RNG state were restored; bit-exact sampling continuation is not claimed. Briefs, seeds, hyperparameters and held-out controls did not change.