The Open Standard for Generative UI
blog: Introducing OUI-1, the first open-weight model built for generative UI (#1116)
Aditya-thesys87668c19fe1c
diff --git a/docs/app/blog/[slug]/page.tsx b/docs/app/blog/[slug]/page.tsxindex f8219023e..073d39d86 100644--- a/docs/app/blog/[slug]/page.tsx+++ b/docs/app/blog/[slug]/page.tsx@@ -2,8 +2,8 @@ import { GitHubButton } from "@/app/(home)/components/GitHubButton/GitHubButton"import { Footer } from "@/app/(home)/sections/Footer/Footer";import { blog } from "@/lib/source";import { getMDXComponents } from "@/mdx-components";-import { TOCItem, TOCItems } from "fumadocs-ui/components/toc/default";import { TOCProvider, TOCScrollArea } from "fumadocs-ui/components/toc";+import { TOCItem, TOCItems } from "fumadocs-ui/components/toc/default";import type { Metadata } from "next";import { notFound } from "next/navigation";@@ -20,40 +20,40 @@ export default async function BlogPostPage(props: { params: Promise<{ slug: strifooter's surface — matching the home content band (light: foreground->background->foreground;dark: black -> neutral-950 -> black, so the edges meet the black menu + footer). */}<div className="min-h-screen bg-[linear-gradient(to_bottom,var(--openui-foreground),var(--openui-background)_10rem,var(--openui-background)_calc(100%_-_10rem),var(--openui-foreground))] [[data-theme=dark]_&]:bg-[linear-gradient(to_bottom,#000,var(--swatch-neutral-950)_28rem,var(--swatch-neutral-950)_calc(100%_-_28rem),#000)]">- <main className="mx-auto flex w-full max-w-[var(--home-container-wide)] gap-4 px-4 pt-16 pb-40 lg:gap-28 lg:pr-8 min-[1249px]:pl-0 min-[1024px]:max-[1248px]:pl-8">- <aside className="hidden w-56 shrink-0 lg:block">- <div className="sticky top-24">- <p className="mb-3 text-sm font-medium text-fd-foreground">On this page</p>- <TOCScrollArea className="max-h-[calc(100vh-8rem)]">- <TOCItems>- {page.data.toc.map((item) => (- <TOCItem key={item.url} item={item} />- ))}- </TOCItems>- </TOCScrollArea>- </div>- </aside>+ <main className="mx-auto flex w-full max-w-[var(--home-container-wide)] gap-4 px-4 pt-16 pb-40 lg:gap-28 lg:pr-8 min-[1249px]:pl-0 min-[1024px]:max-[1248px]:pl-8">+ <aside className="hidden w-56 shrink-0 lg:block">+ <div className="sticky top-24">+ <p className="mb-3 text-sm font-medium text-fd-foreground">On this page</p>+ <TOCScrollArea className="max-h-[calc(100vh-8rem)]">+ <TOCItems>+ {page.data.toc.map((item) => (+ <TOCItem key={item.url} item={item} />+ ))}+ </TOCItems>+ </TOCScrollArea>+ </div>+ </aside>- <div className="min-w-0 flex-1">- <h1 className="mb-2 text-[length:var(--home-title-size)] font-[family-name:var(--home-font-display)] font-medium leading-[var(--home-title-leading)] tracking-[var(--home-title-tracking)] text-[color:var(--openui-text-neutral-primary)]">- {page.data.title}- </h1>- <p className="mb-4 text-[length:var(--home-lead-size)] font-[family-name:var(--home-font-text)] leading-[var(--home-lead-leading)] text-[color:var(--openui-text-neutral-secondary)]">- {page.data.description}- </p>- <div className="flex items-center gap-3 border-b border-[color:var(--home-hairline)] pb-6 text-[length:var(--home-body-size)] font-[family-name:var(--home-font-text)] text-[color:var(--openui-text-neutral-tertiary)]">- <span>{page.data.author}</span>- <span>·</span>- <time>{new Date(page.data.date).toDateString()}</time>- </div>- <article className="prose mt-8 min-w-0">- <Mdx components={getMDXComponents()} />- </article>- <div className="mt-12 border-t border-[color:var(--home-hairline)] pt-8">- <GitHubButton variant="desktopGlow" />+ <div className="min-w-0 w-full max-w-[50rem] flex-1">+ <h1 className="mb-2 text-[length:var(--home-title-size)] font-[family-name:var(--home-font-display)] font-medium leading-[var(--home-title-leading)] tracking-[var(--home-title-tracking)] text-[color:var(--openui-text-neutral-primary)]">+ {page.data.title}+ </h1>+ <p className="mb-4 text-[length:var(--home-lead-size)] font-[family-name:var(--home-font-text)] leading-[var(--home-lead-leading)] text-[color:var(--openui-text-neutral-secondary)]">+ {page.data.description}+ </p>+ <div className="flex items-center gap-3 border-b border-[color:var(--home-hairline)] pb-6 text-[length:var(--home-body-size)] font-[family-name:var(--home-font-text)] text-[color:var(--openui-text-neutral-tertiary)]">+ <span>{page.data.author}</span>+ <span>·</span>+ <time>{new Date(page.data.date).toDateString()}</time>+ </div>+ <article className="prose mt-8 min-w-0">+ <Mdx components={getMDXComponents()} />+ </article>+ <div className="mt-12 border-t border-[color:var(--home-hairline)] pt-8">+ <GitHubButton variant="desktopGlow" />+ </div></div>- </div>- </main>+ </main></div><Footer /></TOCProvider>diff --git a/docs/components/charts/diffusion-charts.tsx b/docs/components/charts/diffusion-charts.tsxnew file mode 100644index 000000000..67ede2418--- /dev/null+++ b/docs/components/charts/diffusion-charts.tsx@@ -0,0 +1,288 @@+"use client";++// Charts for the OUI-1 post. Numbers live in lib/diffusion-blog-data.ts.++import { useEffect, useRef, useState } from "react";+import { BOARD_RUNS, CROSS_LIBRARY, FRONTIER_BAND, SCATTER, SPEED_ARC, STAGES } from "@/lib/diffusion-blog-data";+import { Chart, ChartDataDisclosure, DataTable, Row, styles as s, slotClass } from "./primitives";++function useWidth(initial = 712) {+ const holder = useRef<HTMLDivElement>(null);+ const [w, setW] = useState(initial);+ useEffect(() => {+ const el = holder.current;+ if (!el) return;+ const ro = new ResizeObserver(([entry]) => setW(Math.max(320, Math.round(entry.contentRect.width))));+ ro.observe(el);+ return () => ro.disconnect();+ }, []);+ return { holder, w };+}++export function DgScoreboard() {+ const { holder, w: W } = useWidth();+ const H = 430;+ const PAD = { left: 46, right: 40, top: 34, bottom: 44 };+ const PW = W - PAD.left - PAD.right;+ const PH = H - PAD.top - PAD.bottom;++ const X_MIN = Math.log10(2);+ const X_MAX = Math.log10(45);+ const x = (b: number) => PAD.left + (1 - (Math.log10(b) - X_MIN) / (X_MAX - X_MIN)) * PW;+ const y = (v: number) => PAD.top + (1 - v / 100) * PH;++ const hero = SCATTER.find((p) => p.hero)!;+ const ghost = SCATTER.find((p) => p.ghost)!;++ return (+ <Chart+ title="Generative UI Benchmark, open-weight models up to 31B active"+ >+ <div ref={holder} className={s.svgHolder} style={{ position: "relative" }}>+ <svg width={W} height={H} viewBox={`0 0 ${W} ${H}`} role="img"+ aria-label="Scatter chart of Generative UI Benchmark score against active parameters for open-weight models up to 31B active. OUI-1 scores 71.7% at 4 billion active parameters; one 27B Qwen model scores higher.">+ <rect x={PAD.left} width={PW} y={y(FRONTIER_BAND.hi)} height={y(FRONTIER_BAND.lo) - y(FRONTIER_BAND.hi)}+ fill="var(--rule)" opacity=".45" />+ <text x={PAD.left + 8} y={y(FRONTIER_BAND.hi) + 15} fontSize="11.5" fill="var(--ink-muted)">+ {FRONTIER_BAND.label} · {FRONTIER_BAND.lo} to {FRONTIER_BAND.hi}%+ </text>+ {[0, 20, 40, 60, 80, 100].map((t) => (+ <g key={t}>+ <line x1={PAD.left} x2={PAD.left + PW} y1={y(t)} y2={y(t)} stroke="var(--rule)" />+ <text x={PAD.left - 9} y={y(t) + 4} textAnchor="end" fontSize="12" fill="var(--ink-muted)">{t}</text>+ </g>+ ))}+ {[31, 14, 8, 4, 2].map((b) => (+ <text key={b} x={x(b)} y={H - 18} textAnchor="middle" fontSize="12" fill="var(--ink-muted)">{b}B</text>+ ))}+ <text x={PAD.left + PW / 2} y={H - 2} textAnchor="middle" fontSize="11.5" fill="var(--ink-muted)">+ fewer active parameters →+ </text>+ <line x1={x(ghost.params)} y1={y(ghost.score) - 9} x2={x(hero.params)} y2={y(hero.score) + 12}+ stroke="var(--ink-muted)" strokeWidth="1.4" strokeDasharray="4 4" markerEnd="url(#dg-arr)" />+ <defs>+ <marker id="dg-arr" markerWidth="7" markerHeight="7" refX="5.5" refY="3.5" orient="auto">+ <path d="M0,0 L7,3.5 L0,7 Z" fill="var(--ink-muted)" />+ </marker>+ </defs>+ {SCATTER.map((p) => {+ const HUE: Record<string, string> = {+ ours: "var(--pO, #a78bfa)", dgbase: "#3978e6", g31: "#3978e6", twin: "#3978e6",+ phi4: "#2774c8", ministral: "#dc5a4f", granite: "#4d6fb8", lfm: "#c04f79",+ "qwen38-27b": "#7c4dff", "qwen36-27b": "#7c4dff", "qwen36-a3b": "#7c4dff",+ };+ const hue = HUE[p.id] ?? "var(--ink-muted)";+ const cx = x(p.params);+ const cy = y(p.score);+ if (p.hero) {+ return (+ <g key={p.id}>+ <circle cx={cx} cy={cy} r="13" fill={hue} opacity=".2" />+ <circle cx={cx} cy={cy} r="6.5" fill={hue} stroke="var(--surface)" strokeWidth="2" />+ <text x={cx + 17} y={cy - 8} fontSize="13.5" fontWeight={750} fill="var(--ink)"+ stroke="var(--surface)" strokeWidth={4} paintOrder="stroke">+ OUI-1+ </text>+ <text x={cx + 17} y={cy + 9} fontSize="11.5" fontWeight={650} fill={hue}+ stroke="var(--surface)" strokeWidth={4} paintOrder="stroke">+ {p.score}% · {(p.score / SCATTER.find((q) => q.ghost)!.score).toFixed(1)}x the base model+ </text>+ </g>+ );+ }+ const anchorRight = p.params === 8 || p.id === "lfm" || p.id === "qwen36-a3b";+ return (+ <g key={p.id}>+ <circle cx={cx} cy={cy} r="4.5" fill={hue} stroke="var(--surface)" strokeWidth="2" />+ <text x={anchorRight ? cx - 10 : cx + 10} y={cy + 4} fontSize="12"+ textAnchor={anchorRight ? "end" : "start"} fill="var(--ink-muted)"+ stroke="var(--surface)" strokeWidth={4} paintOrder="stroke">+ {p.label} · {p.score}%+ </text>+ </g>+ );+ })}+ </svg>+ </div>+ <ChartDataDisclosure>+ <DataTable>+ <thead><tr><th>model</th><th>active params</th><th>OpenUI score</th></tr></thead>+ <tbody>+ {SCATTER.map((p) => (+ <tr key={p.id}><td>{p.label}</td><td>{p.params}B</td><td>{p.score}%</td></tr>+ ))}+ </tbody>+ </DataTable>+ </ChartDataDisclosure>+ </Chart>+ );+}++export function DgAnatomy() {+ // wiring = undefined names + orphaned sections (see lib/diffusion-blog-data.ts)+ const CLASSES = [+ { key: "schema" as const, label: "schema errors", slot: 1 as const },+ { key: "wiring" as const, label: "wiring errors: undefined names and orphaned sections", slot: 3 as const },+ ];+ const val = (st: (typeof STAGES)[number], k: "schema" | "wiring") => (k === "schema" ? st.schema : st.orphans + st.unresolved);+ const total = (st: (typeof STAGES)[number]) => st.schema + st.orphans + st.unresolved;+ const maxT = Math.max(...STAGES.map(total));+ const COLH = 250;+ const reduction = (total(STAGES[0]) / total(STAGES[STAGES.length - 1])).toFixed(1);+ return (+ <Chart+ title="Where the errors went"+ legend={CLASSES.map((c) => ({ label: c.label, slot: c.slot }))}+ >+ <div style={{ display: "flex", gap: 34, alignItems: "flex-end", justifyContent: "center", padding: "10px 8px 4px" }}>+ {STAGES.map((st, i) => {+ const t = total(st);+ const last = i === STAGES.length - 1;+ const rate = ((t / st.statements) * 100).toFixed(1);+ return (+ <div key={st.id} style={{ display: "flex", flexDirection: "column", alignItems: "center", gap: 7, flex: "0 1 200px", minWidth: 0 }}>+ <span style={{ fontSize: 15, fontWeight: 700 }}>+ {t}+ {last ? (+ <span className={slotClass(1)} style={{ fontSize: 12.5, fontWeight: 800, marginLeft: 8 }}>+ {reduction}× fewer+ </span>+ ) : null}+ </span>+ <div style={{ display: "flex", flexDirection: "column", width: "100%", height: (t / maxT) * COLH, borderRadius: 7, overflow: "hidden" }}>+ {CLASSES.map((c) => (+ <span key={c.key} className={`${s.bar} ${slotClass(c.slot)}`}+ style={{ width: "100%", height: `${(val(st, c.key) / t) * 100}%`, minHeight: val(st, c.key) ? 2 : 0, borderRadius: 0 }} />+ ))}+ </div>+ <span style={{ fontSize: 12.5, fontWeight: 650, textAlign: "center" }}>{st.label}</span>+ <span style={{ fontSize: 11.5, color: "var(--ink-muted)", textAlign: "center", lineHeight: 1.5 }}>+ {st.complete}/{BOARD_RUNS} runs complete+ <br />+ {rate} defects per 100 statements+ </span>+ </div>+ );+ })}+ </div>+ </Chart>+ );+}++export function DgLoop() {+ const BOXES = [+ { t: "generate", d: "the model writes a few hundred openui-lang programs" },+ { t: "verify", d: "the parser keeps the ones that pass clean; a judge checks each against its brief" },+ { t: "repair", d: "near-misses fixed by an LLM, listed defects only, rewrites rejected" },+ { t: "retrain", d: "the survivors become the next training set" },+ ];+ return (+ <Chart+ title="Self-distillation: generate, verify, retrain"++ >+ <div style={{ position: "relative", padding: "14px 4px 44px" }}>+ <div style={{ display: "flex", alignItems: "stretch", gap: 0, flexWrap: "wrap", justifyContent: "center" }}>+ {BOXES.map((b, i) => (+ <div key={b.t} style={{ display: "flex", alignItems: "center" }}>+ <div style={{+ border: "1px solid var(--rule)", borderRadius: 12, padding: "12px 14px", width: 168,+ display: "flex", flexDirection: "column", gap: 4, background: "color-mix(in srgb, var(--rule) 26%, transparent)",+ }}>+ <span className={slotClass(1)} style={{ fontSize: 11, fontWeight: 800, letterSpacing: ".07em", textTransform: "uppercase" }}>+ {i + 1} · {b.t}+ </span>+ <span style={{ fontSize: 12, color: "var(--ink-muted)", lineHeight: 1.45 }}>{b.d}</span>+ </div>+ {i < BOXES.length - 1 ? (+ <span style={{ padding: "0 9px", color: "var(--ink-muted)", fontSize: 16 }} aria-hidden>→</span>+ ) : null}+ </div>+ ))}+ </div>+ <svg aria-hidden style={{ position: "absolute", left: "6%", right: "6%", bottom: 2, width: "88%", height: 40, overflow: "visible" }}+ viewBox="0 0 100 30" preserveAspectRatio="none">+ <defs>+ <marker id="dg-loop-arr" markerWidth="7" markerHeight="7" refX="4.5" refY="3.5" orient="auto">+ <path d="M0,0 L7,3.5 L0,7 Z" fill="var(--ink-muted)" />+ </marker>+ </defs>+ <path d="M 92,0 L 92,16 Q 92,23 86,23 L 14,23 Q 8,23 8,16 L 8,4"+ fill="none" stroke="var(--ink-muted)" strokeWidth="1.4" strokeDasharray="4 4"+ vectorEffect="non-scaling-stroke" markerEnd="url(#dg-loop-arr)" />+ </svg>+ <span style={{+ position: "absolute", left: "50%", bottom: 4, transform: "translateX(-50%)",+ fontSize: 11.5, color: "var(--ink-muted)", background: "var(--surface)", padding: "0 10px", whiteSpace: "nowrap",+ }}>+ each pass trains the model that writes the next batch+ </span>+ </div>+ </Chart>+ );+}++export function DgSpeedArc() {+ const max = Math.max(...SPEED_ARC.map((r) => r.secPerScreen));+ return (+ <Chart+ title="Seconds per output, before and after supervised finetuning"+ sub="Same 20 light briefs, one request at a time, same serving settings for both rows: vLLM, FP8, one A100."+ note="The finetuned model writes longer outputs and needs about twice the denoising steps per token: it is committing real names and values where DiffusionGemma commits short, generic ones."+ >+ <div className={s.rows}>+ {SPEED_ARC.map((r, i) => (+ <Row key={r.id} label={r.label} wide tip={r.note}>+ <span className={`${s.bar} ${slotClass(i === 0 ? 2 : 3)}`}+ style={{ width: `${(r.secPerScreen / max) * 72}%` }} />+ <span className={s.value}>{r.secPerScreen}s</span>+ </Row>+ ))}+ </div>+ </Chart>+ );+}++export function DgCrossLibrary() {+ const rows = [+ { id: "base", label: "DiffusionGemma", n: CROSS_LIBRARY.base, slot: 3 as const },+ { id: "ours", label: "OUI-1", n: CROSS_LIBRARY.ours, slot: 1 as const },+ ];+ return (+ <Chart+ title="Valid outputs on the appless phone library"+ sub={`${CROSS_LIBRARY.asks} asks written independently of every training file, one output each, counted valid when it parses clean: no schema errors, every name defined, at least three statements.`}+ note="A different component library from the benchmark's, with its own signatures in the system prompt. None of these asks or outputs were trained on."+ >+ <div className={s.rows}>+ {rows.map((r) => (+ <Row key={r.id} label={r.label} wide>+ <span className={`${s.bar} ${slotClass(r.slot)}`} style={{ width: `${(r.n / CROSS_LIBRARY.asks) * 78}%` }} />+ <span className={s.value}>{r.n} / {CROSS_LIBRARY.asks}</span>+ </Row>+ ))}+ </div>+ </Chart>+ );+}++export function DgErrorExample() {+ const LINES: Array<{ code: string; note?: string; kind?: "grammar" | "wiring" }> = [+ { code: 'header = CardHeader("Spending", "last 7 days")' },+ { code: 'total = Heading("$24,180", "h9")', note: "schema: h9 is not a heading level", kind: "grammar" },+ { code: 'chart = AreaChart(days, [spend], "wavy")', note: 'schema: "wavy" is not a curve type', kind: "grammar" },+ { code: 'footer = TextContent("Updated today")', note: "wiring: defined, never attached to root", kind: "wiring" },+ { code: "root = Card([header, total, chart, summary])", note: "wiring: summary is never defined", kind: "wiring" },+ ];+ const COLOR = { grammar: "#e5484d", wiring: "#d97706" } as const;+ return (+ <div style={{ border: "1px solid var(--rule)", borderRadius: 12, padding: "14px 0", margin: "1.25rem 0", overflowX: "auto", background: "color-mix(in srgb, var(--rule) 18%, transparent)", fontFamily: "var(--font-geist-mono, ui-monospace, SFMono-Regular, Menlo, monospace)", fontSize: 13, lineHeight: 1.9 }}>+ {LINES.map((l) => (+ <div key={l.code} style={{ display: "flex", gap: 24, padding: "0 18px", whiteSpace: "pre", background: l.kind ? `color-mix(in srgb, ${COLOR[l.kind]} 9%, transparent)` : undefined, boxShadow: l.kind ? `inset 3px 0 0 ${COLOR[l.kind]}` : undefined }}>+ <span style={{ flex: "0 0 auto", minWidth: 380, color: "var(--ink)" }}>{l.code}</span>+ {l.note ? <span style={{ color: COLOR[l.kind!], fontWeight: 600 }}>{"// " + l.note}</span> : null}+ </div>+ ))}+ </div>+ );+}diff --git a/docs/components/charts/reliability-by-model.tsx b/docs/components/charts/reliability-by-model.tsxindex 0515650e5..99b7487c1 100644--- a/docs/components/charts/reliability-by-model.tsx+++ b/docs/components/charts/reliability-by-model.tsx@@ -48,6 +48,7 @@ const PROVIDER_HUE: Record<ModelBoardProvider, string> = {IBM: "#4d6fb8",Liquid: "#c04f79",InclusionAI: "#7c6f64",+ Thesys: "#a78bfa",};const MODEL_NAME: Record<ModelId, string> = {sol: "GPT-5.6 Sol",diff --git a/docs/components/model-release-cards.module.css b/docs/components/model-release-cards.module.cssnew file mode 100644index 000000000..b61a34cfd--- /dev/null+++ b/docs/components/model-release-cards.module.css@@ -0,0 +1,245 @@+.grid {+ display: grid;+ grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);+ gap: 0.875rem;+ margin: 2.5rem 0 3.25rem;+}++.card {+ position: relative;+ display: flex;+ min-height: 15rem;+ flex-direction: column;+ overflow: hidden;+ border: 1px solid transparent;+ border-radius: 1.125rem;+ padding: 1.75rem;+ color: inherit;+ text-decoration: none !important;+ transition:+ transform 180ms ease,+ border-color 180ms ease,+ box-shadow 180ms ease;+}++.card::before {+ position: absolute;+ inset: 0;+ background: linear-gradient(120deg, rgb(255 255 255 / 8%), transparent 45%);+ content: "";+ pointer-events: none;+}++.card:hover {+ transform: translateY(-3px);+}++.card:focus-visible {+ outline: 3px solid #8b5cf6;+ outline-offset: 3px;+}++.primary {+ border-color: #2f2850;+ background:+ radial-gradient(circle at 88% 8%, rgb(124 58 237 / 78%), transparent 36%),+ linear-gradient(145deg, #111015 0%, #201738 100%);+ box-shadow: 0 18px 45px rgb(30 20 55 / 18%);+ color: #fff;+}++.primary:hover {+ border-color: #8b5cf6;+ box-shadow: 0 22px 55px rgb(77 42 130 / 28%);+}++.secondary {+ border-color: #d9ccf8;+ background:+ radial-gradient(circle at 95% 5%, rgb(196 181 253 / 75%), transparent 38%),+ linear-gradient(145deg, #f5f1ff 0%, #fff 75%);+ box-shadow: 0 16px 38px rgb(63 40 100 / 10%);+ color: #17131f;+}++.secondary:hover {+ border-color: #8b5cf6;+ box-shadow: 0 20px 48px rgb(91 55 145 / 18%);+}++.topline {+ position: relative;+ z-index: 1;+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 1rem;+}++.eyebrow {+ display: inline-flex;+ align-items: center;+ gap: 0.45rem;+ font-size: 0.7rem;+ font-weight: 700;+ letter-spacing: 0.13em;+ line-height: 1;+ text-transform: uppercase;+}++.primary .eyebrow {+ color: #d8ccff;+}++.secondary .eyebrow {+ color: #6335b5;+}++.dot {+ width: 0.45rem;+ height: 0.45rem;+ border-radius: 999px;+ background: currentColor;+ box-shadow: 0 0 0 4px rgb(139 92 246 / 15%);+}++.external {+ display: grid;+ width: 2rem;+ height: 2rem;+ flex: 0 0 auto;+ place-items: center;+ border: 1px solid currentColor;+ border-radius: 999px;+ opacity: 0.7;+ transition:+ opacity 180ms ease,+ transform 180ms ease;+}++.card:hover .external {+ transform: translate(2px, -2px);+ opacity: 1;+}++.content {+ position: relative;+ z-index: 1;+ display: flex;+ flex: 1;+ flex-direction: column;+ margin-top: 2.25rem;+}++.title {+ margin: 0;+ color: inherit;+ font-size: clamp(1.45rem, 3vw, 2rem);+ font-weight: 650;+ letter-spacing: -0.035em;+ line-height: 1.05;+}++.primary .title {+ color: #fff;+}++.description {+ max-width: 31rem;+ margin: 0.75rem 0 0;+ font-size: 0.95rem;+ line-height: 1.5;+}++.primary .description {+ color: rgb(255 255 255 / 72%);+}++.secondary .description {+ color: #625a6e;+}++.meta {+ margin-top: auto;+ padding-top: 1.75rem;+ font-size: 0.78rem;+ font-weight: 600;+ letter-spacing: 0.025em;+}++.primary .meta {+ color: #d8ccff;+}++.secondary .meta {+ color: #6335b5;+}++.cta {+ display: inline-flex;+ align-items: center;+ align-self: flex-start;+ gap: 0.5rem;+ margin-top: 1rem;+ border-radius: 999px;+ padding: 0.6rem 0.9rem;+ font-size: 0.82rem;+ font-weight: 700;+ line-height: 1;+}++.primary .cta {+ background: #fff;+ color: #17131f;+}++.secondary .cta {+ background: #17131f;+ color: #fff;+}++:global(.dark) .secondary {+ border-color: #463467;+ background:+ radial-gradient(circle at 95% 5%, rgb(109 40 217 / 50%), transparent 38%),+ linear-gradient(145deg, #211a2c 0%, #151219 75%);+ color: #fff;+}++:global(.dark) .secondary .description {+ color: rgb(255 255 255 / 65%);+}++:global(.dark) .secondary .eyebrow,+:global(.dark) .secondary .meta {+ color: #c4b5fd;+}++:global(.dark) .secondary .cta {+ background: #fff;+ color: #17131f;+}++@media (max-width: 720px) {+ .grid {+ grid-template-columns: 1fr;+ margin: 2rem 0 2.75rem;+ }++ .card {+ min-height: 13.5rem;+ padding: 1.4rem;+ }+}++@media (prefers-reduced-motion: reduce) {+ .card,+ .external {+ transition: none;+ }++ .card:hover,+ .card:hover .external {+ transform: none;+ }+}diff --git a/docs/components/model-release-cards.tsx b/docs/components/model-release-cards.tsxnew file mode 100644index 000000000..7e161eb5a--- /dev/null+++ b/docs/components/model-release-cards.tsx@@ -0,0 +1,65 @@+import { ArrowUpRight, ChartLineUp, DownloadSimple } from "@phosphor-icons/react/dist/ssr";++import styles from "./model-release-cards.module.css";++export function ModelReleaseCards() {+ return (+ <section className={styles.grid} aria-label="OUI-1 release resources">+ <a+ className={`${styles.card} ${styles.primary}`}+ href="https://huggingface.co/thesysdev/OUI-1"+ target="_blank"+ rel="noreferrer noopener"+ >+ <div className={styles.topline}>+ <span className={styles.eyebrow}>+ <span className={styles.dot} aria-hidden="true" />+ Model release+ </span>+ <span className={styles.external} aria-hidden="true">+ <ArrowUpRight size={16} weight="bold" />+ </span>+ </div>++ <div className={styles.content}>+ <h3 className={styles.title}>Get OUI-1</h3>+ <p className={styles.description}>Download the open-weight model from Hugging Face.</p>+ <span className={styles.meta}>26B parameters · 4B active · FP8</span>+ <span className={styles.cta}>+ <DownloadSimple size={16} weight="bold" aria-hidden="true" />+ View model weights+ </span>+ </div>+ </a>++ <a+ className={`${styles.card} ${styles.secondary}`}+ href="https://github.com/thesysdev/Generative-ui-bench"+ target="_blank"+ rel="noreferrer noopener"+ >+ <div className={styles.topline}>+ <span className={styles.eyebrow}>+ <span className={styles.dot} aria-hidden="true" />+ Open evaluation+ </span>+ <span className={styles.external} aria-hidden="true">+ <ArrowUpRight size={16} weight="bold" />+ </span>+ </div>++ <div className={styles.content}>+ <h3 className={styles.title}>Explore the benchmark</h3>+ <p className={styles.description}>+ Review the scoring code and raw generations on GitHub.+ </p>+ <span className={styles.meta}>71.7% Generative UI Benchmark</span>+ <span className={styles.cta}>+ <ChartLineUp size={16} weight="bold" aria-hidden="true" />+ View benchmark+ </span>+ </div>+ </a>+ </section>+ );+}diff --git a/docs/content/blog/oui-1.mdx b/docs/content/blog/oui-1.mdxnew file mode 100644index 000000000..4ee45f248--- /dev/null+++ b/docs/content/blog/oui-1.mdx@@ -0,0 +1,131 @@+---+title: "Introducing OUI-1: world's first model for Generative UI"+description: "A DiffusionGemma finetune at 71.7% on the Generative UI Benchmark, 5.5x its base."+date: "2026-09-08"+author: "Thesys Engineering Team"+featured: true+---++OUI-1 is a finetuned [DiffusionGemma](https://blog.google/innovation-and-ai/technology/developers-tools/diffusion-gemma-faster-text-generation/) model that writes user interfaces in [openui-lang](/docs/openui-lang). It is 26BA4B model that can run on consumer grade GPU (RTX 5090, at FP8), and the weights are on [Hugging Face](https://huggingface.co/thesysdev/OUI-1) under the Gemma Terms of Use.++<iframe+ src="/blog/dg-reveal.html"+ title="One brief, two models: DiffusionGemma and OUI-1 generate the same UI side by side"+ style={{+ width: "100%",+ aspectRatio: "1200 / 675",+ border: 0,+ borderRadius: 14,+ overflow: "hidden",+ margin: "1.5rem 0",+ }}+ scrolling="no"+ loading="lazy"+/>++## Why we built OUI-1++Agent-driven interfaces are the future of software. But getting there comes down to three constraints. Interfaces must be generated in under a second. They must be reliable enough to use as software. And the models must be small enough to run locally on consumer hardware.++With [AppLess](https://github.com/thesysdev/appless), we explored that experience using Gemma 4 on Cerebras. But it depended on specialized hardware in the cloud. Moving it onto the device means solving a harder problem: preserving responsiveness with dramatically less compute, without sacrificing the quality or correctness of the generated interface.++OUI-1 is our first step toward solving that problem: an open-weight model built to generate reliable interfaces on consumer hardware. The ambition is reliable, agent-driven interfaces generated locally at the speed of traditional software.++## Finding a model that fit the constraints++The protocol was already in place. OpenUI Lang costs up to 67% fewer tokens than JSON and streams, so the interface starts appearing before the model has finished generating it. The harder part was finding a model with the right speed and hardware profile.++That is why we chose DiffusionGemma. Autoregressive models generate one token at a time and are bottlenecked on memory bandwidth. DiffusionGemma writes a 256-token block at once, starting from noise and committing each token the moment it is sure of it. Google reports over 1,000 tokens per second on a single H100 and over 700 on an RTX 5090<sup><a href="#source-1" style={{ color: "#3978e6", textDecoration: "none", fontWeight: 600 }}>[1]</a></sup>.++DiffusionGemma gave us the speed we were looking for. But speed alone does not make software: the interfaces also have to work. That was the gap we needed to close.++## The gap became the north star++The benchmark made the gap concrete. DiffusionGemma scored **13.0%** on the [Generative UI Benchmark](https://www.openui.com/benchmarks). It had the speed and hardware profile we wanted, but not the reliability.++The OpenUI Lang parser made those failures easy to see. A schema error is a wrong enum, a missing required prop, or an invented component. A wiring error is a name used but never defined, or a section defined but never attached to the root.++<DgErrorExample />++That became our north star: bring both kinds of error down without giving up speed.++## How we trained it++The training unfolded in two stages. First, we taught DiffusionGemma to write OpenUI Lang through supervised fine tuning. Then we used self-distillation to recover its speed and improve its reliability. Once that worked on one component library, we repeated the process across 27.++### Phase 1: Supervised Fine Tuning++We started with about 700 OpenUI Lang examples written by larger models, spread across seven component libraries, and ran a LoRA fine-tune on one A100. The loss went down. But the benchmark score went down with it. The model had learned to write longer, denser programs, and almost none of them parsed cleanly.++We narrowed the problem to a single component library: the one used by the benchmark. The score rose from **13.0% to 28.8%**, but progress came with a tradeoff. One run reduced wiring errors while increasing schema errors; the next did the reverse:++| run | schema errors | orphaned sections |+| ----- | ------------- | ----------------- |+| n | 78 | 66 |+| n + 1 | 112 | 40 |+| n + 2 | 51 | 65 |++The two error types moved like a see-saw. We were well ahead of the base model, but no run brought both down together. We assumed we had reached a capacity limit of the LoRA: it could learn one discipline at a time, and a full fine-tune would resolve the tradeoff later.++<DgAnatomy />++Then we found a second problem: the model had become slower. We had expected fine tuning to make it faster. The sampler commits a token once its entropy falls below a bound, so a model that knows the language should become certain sooner. Instead, on the same 20 light briefs, generation time rose from **1.6 seconds per output to 4.3**.++The base model was fast because its outputs were short and generic, averaging 22 tokens per statement. The fine-tuned model wrote real names and values, averaging 32 tokens per statement, and needed about twice as many denoising steps to commit each token. We had taught it to produce more useful interfaces, but lost the speed that made DiffusionGemma interesting in the first place.++<DgSpeedArc />++### Phase 2: Self-distillation++The breakthrough was realizing that OpenUI Lang has a verifiable reward. The parser can tell us whether an interface is structurally valid and identify the exact schema or wiring errors when it is not. That meant the model could become its own teacher: generate programs, keep or repair them using the parser's feedback, and learn from the result. Self-distillation also offered a path to recovering speed because it is a known way to reduce the denoising steps used by diffusion language models<sup><a href="#source-2" style={{ color: "#3978e6", textDecoration: "none", fontWeight: 600 }}>[2]</a></sup><sup><a href="#source-3" style={{ color: "#3978e6", textDecoration: "none", fontWeight: 600 }}>[3]</a></sup>.++Our version uses rejection-sampled self-training with repair. The model writes a few hundred OpenUI Lang programs, and the parser keeps the ones it accepts. Near-misses go through a repair pass that fixes only the defects reported by the parser; we reject any edit that rewrites or invents. The median repair changes one statement. A judge then checks whether each surviving program matches its brief. Those programs become the training set for the next run: 500 steps, taking an hour or two on one A100. The resulting model generates the next batch, and the loop begins again.++<DgLoop />++The speed came back: on the same 20 light briefs, generation time fell from **4.3 seconds per output to 1.9**, even though the outputs contained 28% more tokens than DiffusionGemma's. Then the see-saw stopped. The benchmark score reached **57.1%**, schema errors fell from 292 to **76**, and wiring errors fell from 971 to **484** in the same model. Every earlier run had traded one error type for the other; self-distillation improved both.++In effect, this is reinforcement learning in its simplest form: rejection sampling with the parser as the reward. Our hypothesis—which we have not isolated—is that training on the model's own text keeps the loss low almost everywhere, concentrating the gradient on the few things that changed: repaired statements and sampled choices pushed toward the mode. The first teaches the wiring fix; the second sharpens the model so the entropy bound can commit tokens earlier. Teacher-written data spreads that gradient across an entirely different writing style.++### Phase 3: Generalizing across 27 component libraries++The one-library result left us with another question: had the model learned to generate interfaces, or had it learned one component library? We applied the same recipe—supervised fine tuning followed by self-distillation—across 27 component libraries.++## Results++The result was OUI-1. On the [Generative UI Benchmark](https://www.openui.com/benchmarks), it scored **71.7%**, up from DiffusionGemma's **13.0%**. Every open model with up to 31B active parameters scored lower, including Gemma 4 31B at **46.7%**, with one exception: Qwen3.8 27B at **78.8%**. Qwen3.8 is a dense model that uses 27B parameters on every token, compared with OUI-1's **4B active parameters**. Nothing at 4B active parameters or below scored higher; the next step up in score required a dense 27B.++<DgScoreboard />++The gain also generalized beyond the benchmark library. On the AppLess library, we tested 60 asks that the model had never seen during training. OUI-1 produced 55 valid outputs; DiffusionGemma produced 23.++<DgCrossLibrary />++OUI-1 did more than bring us back to where we began. AppLess had relied on Gemma 4 running on Cerebras; it now runs on OUI-1. On the benchmark, OUI-1's **71.7%** surpassed both Gemma 4 31B at **46.7%** and Gemma 4 26B-A4B at **29.9%**. The experience that first required specialized inference hardware can now be powered by an open-weight, 4B-active model built to run on consumer hardware.++<ModelReleaseCards />++## Directions from here++Three directions matter from here:++- **Personal devices.** Run models like OUI-1 closer to the person, keeping more of their context on the device.+- **[OpenUI Lang 0.5](/docs/openui-lang/specification-v05).** Generate interfaces with their own state, queries and mutations, so the runtime—not the model—handles each interaction.+- **Lower latency.** Move toward reliable, locally generated interfaces that arrive in under a second.++## References++<ol style={{ fontSize: "0.9em" }}>+ <li id="source-1">+ Google, [DiffusionGemma: faster text+ generation](https://blog.google/innovation-and-ai/technology/developers-tools/diffusion-gemma-faster-text-generation/)+ </li>+ <li id="source-2">+ Deschenaux and Gulcehre, [Beyond Autoregression: Fast LLMs via Self-Distillation Through+ Time](https://arxiv.org/abs/2410.21035)+ </li>+ <li id="source-3">+ Zhang et al., [T3D: Few-Step Diffusion Language Models via Trajectory Self-Distillation with+ Direct Discriminative Optimization](https://arxiv.org/abs/2602.12262)+ </li>+</ol>diff --git a/docs/lib/benchmark-data.ts b/docs/lib/benchmark-data.tsindex 52d4266c3..b8ecd0b20 100644--- a/docs/lib/benchmark-data.ts+++ b/docs/lib/benchmark-data.ts@@ -605,6 +605,15 @@ export const OPENUI_MODEL_BOARD = [score: 73.4,costPerPass: 0.37,},+ {+ id: "oui-1",+ label: "OUI-1 (DiffusionGemma 26B-A4B, finetuned)",+ provider: "Thesys",+ score: 71.7,+ costPerPass: 0,+ unpriced: true,+ serving: "Self-hosted · A100 FP8",+ },{id: "qwen-3-6-27b",label: "Qwen3.6 27B",diff --git a/docs/lib/diffusion-blog-data.ts b/docs/lib/diffusion-blog-data.tsnew file mode 100644index 000000000..8768f0087--- /dev/null+++ b/docs/lib/diffusion-blog-data.ts@@ -0,0 +1,61 @@+// Numbers for the OUI-1 post (content/blog/oui-1.mdx). Public-protocol+// figures come from generative-ui-bench/score.ts on the raw/ labels named+// below; the charts read from here and hardcode nothing.++export type ScatterPoint = {+ id: string;+ label: string;+ score: number; // Generative UI Benchmark score, %+ params: number; // active parameters, billions+ hero?: boolean;+ ghost?: boolean; // the base-model point the arrow starts from+};++// Every open-weight model on the public board with <= 31B active parameters.+export const SCATTER: ScatterPoint[] = [+ { id: "ours", label: "OUI-1 (DiffusionGemma, finetuned)", score: 71.7, params: 4, hero: true },+ { id: "dgbase", label: "DiffusionGemma", score: 13.0, params: 4, ghost: true },+ { id: "qwen38-27b", label: "Qwen3.8 27B", score: 78.8, params: 27 },+ { id: "qwen36-27b", label: "Qwen3.6 27B", score: 68.5, params: 27 },+ { id: "qwen36-a3b", label: "Qwen3.6 35B-A3B", score: 61.4, params: 3 },+ { id: "g31", label: "Gemma 4 31B", score: 46.7, params: 31 },+ { id: "phi4", label: "Phi-4 14B", score: 44.0, params: 14 },+ { id: "twin", label: "Gemma 4 26B-A4B", score: 29.9, params: 4 },+ { id: "ministral", label: "Ministral 8B", score: 27.2, params: 8 },+ { id: "granite", label: "Granite 4.1 8B", score: 14.7, params: 8 },+ { id: "lfm", label: "LFM 2.5 2.6B", score: 3.3, params: 2.6 },+];++export const FRONTIER_BAND = { lo: 90, hi: 99.5, label: "frontier models, open and closed" };++export type Stage = {+ id: string;+ label: string;+ complete: number; // of BOARD_RUNS+ schema: number; // enum, signature, required-field, hallucinated component, root+ unresolved: number; // names used but never defined+ orphans: number; // sections defined but never attached+ statements: number;+};++// 46 briefs x 4 runs, bench labels dgbase / dg-sft / dgoui1. The dg-sft+// checkpoint ran under the define-before-use prompt it was trained on, so+// unresolved and orphans are only comparable across stages as a sum.+export const STAGES: Stage[] = [+ { id: "base", label: "DiffusionGemma", complete: 24, schema: 693, unresolved: 1944, orphans: 165, statements: 7928 },+ { id: "sft", label: "after supervised finetuning", complete: 53, schema: 292, unresolved: 55, orphans: 916, statements: 7684 },+ { id: "a2", label: "OUI-1", complete: 132, schema: 14, unresolved: 49, orphans: 140, statements: 5372 },+];++export const BOARD_RUNS = 184;++// Median seconds per output on the same 20 light briefs, one request at a+// time, vLLM 0.24 FP8 on one A100, the checkpoint's own sampler settings.+export const SPEED_ARC = [+ { id: "base", label: "DiffusionGemma", secPerScreen: 1.6, note: "short outputs, 22 tokens per statement" },+ { id: "sft", label: "after supervised finetuning", secPerScreen: 4.3, note: "32 tokens per statement, about twice the denoising steps per token" },+];++// The appless phone library, 60 asks written independently of every training+// file; valid = parses clean with at least three statements.+export const CROSS_LIBRARY = { asks: 60, base: 23, ours: 55 };diff --git a/docs/mdx-components.tsx b/docs/mdx-components.tsxindex 647199e39..446efc678 100644--- a/docs/mdx-components.tsx+++ b/docs/mdx-components.tsx@@ -5,8 +5,17 @@ import {TokenOverhead,} from "@/components/charts/benchmark-charts";import { CompletionByDensity } from "@/components/charts/completion-by-density";+import {+ DgAnatomy,+ DgCrossLibrary,+ DgErrorExample,+ DgLoop,+ DgScoreboard,+ DgSpeedArc,+} from "@/components/charts/diffusion-charts";import { FakeVisual } from "@/components/fake-visual";import { Mermaid } from "@/components/mermaid";+import { ModelReleaseCards } from "@/components/model-release-cards";import { TweetEmbed } from "@/components/tweet-embed";import * as TabsComponents from "fumadocs-ui/components/tabs";import defaultMdxComponents from "fumadocs-ui/mdx";@@ -21,9 +30,16 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {CompletionByModel,CompletionByDensity,BlankScreens,+ DgScoreboard,+ DgAnatomy,+ DgLoop,+ DgSpeedArc,+ DgCrossLibrary,+ DgErrorExample,TokenOverhead,CostPerPass,Mermaid,+ ModelReleaseCards,...components,};}diff --git a/docs/public/blog/dg-reveal.html b/docs/public/blog/dg-reveal.htmlnew file mode 100644index 000000000..c7e3da203--- /dev/null+++ b/docs/public/blog/dg-reveal.html@@ -0,0 +1,417 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8">+<title>One brief, two models</title>+<style>+ :root{+ --bg:#0b0b0c; --ink:#ededf0; --muted:#8b8b93;+ --rule:rgba(255,255,255,.08); --chip:rgba(255,255,255,.06);+ --pO:#a78bfa; --bad:#f87171; --warn:#fbbf24; --good:#4ade80;+ --s-bg:oklch(0.145 0 0); --s-card:oklch(0.205 0 0);+ --s-border:oklch(0.994 0 89.876 / 0.06);+ --s-ink:oklch(0.985 0 89.876); --s-dim:oklch(0.985 0 89.876 / 0.5);+ --s-blue:oklch(0.546 0.215 262.881); --s-blue-hi:oklch(0.623 0.188 259.815);+ --mono:"Geist Mono",ui-monospace,"SF Mono",Menlo,monospace;+ --panel:#101013; --code:#c9cbd6; --noise:#43434c; --nm:#c4b5fd; --ty:#93c5fd; --st:#a1a1aa;+ --wound-bg:rgba(248,113,113,.07); --worn-bg:rgba(251,191,36,.06);+ --soft:rgba(255,255,255,.08); --vbar:rgba(10,10,11,.92);+ --grid:rgba(255,255,255,.06); --grid-ink:rgba(255,255,255,.35);+ --dead-bg:rgba(248,113,113,.05); --dead-bd:rgba(248,113,113,.55);+ --orph-bd:rgba(251,191,36,.45); --orph-bg:rgba(251,191,36,.04);+ }+ *{box-sizing:border-box;margin:0;padding:0}+ html,body{height:100%}+ body{background:var(--bg);display:grid;place-items:center;+ font-family:Inter,-apple-system,"Segoe UI",sans-serif;color:var(--ink);overflow:hidden}+ #stage{width:1200px;height:675px;display:flex;flex-direction:column;padding:20px 26px 14px;gap:11px}++ header{display:flex;justify-content:space-between;align-items:center}+ header .t{font-size:15.5px;font-weight:600;letter-spacing:-.01em}+ header .t em{font-style:normal;font-weight:400;color:var(--muted)}+ header .m{font-family:var(--mono);font-size:9.5px;font-weight:500;letter-spacing:.08em;+ text-transform:uppercase;color:var(--muted);padding:4px 9px;border:1px solid var(--rule);border-radius:4px}++ #duo{flex:1;display:flex;gap:18px;min-height:0}+ .half{flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}+ .stamp{align-self:flex-start;font-family:var(--mono);font-size:10px;font-weight:600;+ letter-spacing:.08em;text-transform:uppercase;padding:4px 9px;border-radius:4px;+ background:var(--chip);color:var(--muted)}+ .half.ours .stamp{background:var(--pO);color:#0b0b0c}++ .panel{flex:1;position:relative;border-radius:14px;overflow:hidden;background:var(--panel);+ box-shadow:inset 0 0 0 1px var(--rule)}+ .half.ours .panel.done{box-shadow:inset 0 0 0 1px rgba(167,139,250,.35)}+ .code{position:absolute;inset:0;padding:15px 0;font:13px/1.95 var(--mono);color:var(--code);+ display:flex;flex-direction:column;justify-content:center;transition:opacity .55s}+ .code.gone{opacity:0;pointer-events:none}+ .cl{opacity:0;white-space:pre;padding:0 18px}+ .cl.on{opacity:1}+ .cl.noise{color:var(--noise)}+ .cl .lock{color:var(--code)}+ .cl .nm{color:var(--nm)}.cl .ty{color:var(--ty)}.cl .st{color:var(--st)}+ .cl.wound{background:var(--wound-bg);box-shadow:inset 2px 0 0 var(--bad)}+ .cl.worn{background:var(--worn-bg);box-shadow:inset 2px 0 0 var(--warn)}+ .cl .tag{float:right;font-size:9.5px;font-weight:500;letter-spacing:.02em}+ .cl.wound .tag{color:var(--bad)}+ .cl.worn .tag{color:var(--warn)}+ .scrn{position:absolute;inset:0;opacity:0;transition:opacity .5s;+ background:var(--s-bg);color:var(--s-ink);display:flex;flex-direction:column}+ .scrn.show{opacity:1}+ .chd{padding:12px 16px 10px;display:flex;align-items:center;justify-content:space-between;+ border-bottom:1px solid var(--s-border)}+ .chd .a{font-size:15px;font-weight:600;letter-spacing:-.1px}+ .chd .b{font-size:11px;color:var(--s-dim);margin-top:1px}+ .avatar{width:24px;height:24px;border-radius:9999px;background:var(--s-blue);+ display:grid;place-items:center;font-size:10px;font-weight:600}+ .sbody{flex:1;padding:12px 14px 34px;display:grid;grid-template-columns:1.12fr 1fr;+ grid-template-rows:96px 140px 1fr 30px;gap:9px;min-height:0}++ .g{border-radius:12px;background:var(--s-card);border:1px solid var(--s-border);+ box-shadow:0 1px 3px -2px rgba(0,0,0,.5);padding:12px 14px;overflow:hidden;position:relative;+ opacity:0;transform:translateY(10px);+ transition:opacity .45s ease var(--d,0ms), transform .55s cubic-bezier(.22,1,.36,1) var(--d,0ms)}+ .scrn.show .g{opacity:1;transform:none}+ .hd{font-size:11px;font-weight:500;color:var(--s-dim);margin-bottom:6px;display:flex;justify-content:space-between;align-items:baseline}+ .hd .hd2{font-size:10px;font-weight:400}++ .balc{grid-column:1;grid-row:1;background:linear-gradient(160deg,rgba(255,255,255,.10),rgba(255,255,255,0) 55%),var(--s-blue);border-color:transparent}+ .balc .k{font-size:11px;font-weight:500;color:rgba(255,255,255,.65)}+ .balc .v{font-size:25px;font-weight:600;letter-spacing:-.2px;margin-top:3px;font-variant-numeric:tabular-nums}+ .balc .tagch{position:absolute;right:12px;top:12px;font-size:10.5px;font-weight:500;+ padding:3px 8px;border-radius:6px;background:rgba(255,255,255,.14);color:#bbf7d0}+ .balc .cno{position:absolute;right:14px;bottom:10px;font-size:10px;letter-spacing:2px;color:rgba(255,255,255,.45)}++ .goalw{grid-column:2;grid-row:1;display:flex;min-height:0}+ .goalc{flex:1;border-radius:12px;background:var(--s-card);border:1px solid var(--s-border);+ box-shadow:0 1px 3px -2px rgba(0,0,0,.5);padding:12px 14px;position:relative;overflow:hidden}+ .goalc .r1{display:flex;justify-content:space-between;font-size:12px;font-weight:500}+ .goalc .r1 b{font-weight:600;color:var(--s-blue-hi);font-variant-numeric:tabular-nums}+ .goalc .r2{font-size:10.5px;color:var(--s-dim);margin:3px 0 10px}+ .ptrack{height:5px;border-radius:9999px;background:var(--soft);overflow:hidden}+ .pfill{height:100%;width:68%;border-radius:9999px;background:var(--s-blue);+ transform:scaleX(0);transform-origin:left;transition:transform .8s cubic-bezier(.22,1,.36,1) .6s}+ .scrn.show .pfill{transform:scaleX(1)}+ .chartc{grid-column:1/3;grid-row:2;display:flex;flex-direction:column}+ .cwrap{flex:1;position:relative;min-height:0}+ .cwrap svg{position:absolute;inset:0;width:100%;height:100%}+ .cline{stroke:var(--s-blue-hi);stroke-width:1.5;fill:none;stroke-linecap:round;+ stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset 1s cubic-bezier(.33,0,.2,1) .35s}+ .scrn.show .cline{stroke-dashoffset:0}+ .carea{opacity:0;transition:opacity .6s ease .9s}+ .scrn.show .carea{opacity:1}+ .cdot{position:absolute;width:6px;height:6px;border-radius:50%;background:#fff;+ box-shadow:0 0 0 3.5px oklch(0.623 0.188 259.815 / .25);transform:translate(-50%,-50%) scale(0);+ transition:transform .4s cubic-bezier(.22,1,.36,1) 1.15s}+ .scrn.show .cdot{transform:translate(-50%,-50%) scale(1)}+ .cx{display:flex;justify-content:space-between;font-size:9px;color:var(--s-dim);padding:5px 4px 0 34px}++ .txc{grid-column:1/3;grid-row:3;display:flex;flex-direction:column;min-height:0}+ .trow{display:flex;align-items:center;gap:10px;padding:5px 0;font-size:12px}+ .trow + .trow{border-top:1px solid var(--s-border)}+ .tico{width:24px;height:24px;border-radius:6px;display:grid;place-items:center;flex:0 0 24px;+ background:var(--soft);font-size:10px;font-weight:600;color:var(--s-dim)}+ .trow .n{font-weight:500}.trow .c{font-size:10px;color:var(--s-dim);margin-top:1px}+ .trow .amt{margin-left:auto;font-weight:500;font-variant-numeric:tabular-nums}++ .payw{grid-column:1/3;grid-row:4;display:flex;+ opacity:0;transform:translateY(10px);+ transition:opacity .45s ease var(--d,0ms), transform .55s cubic-bezier(.22,1,.36,1) var(--d,0ms)}+ .scrn.show .payw{opacity:1;transform:none}+ .pay{flex:1;border-radius:8px;background:var(--s-blue);display:grid;place-items:center;+ font-size:11.5px;font-weight:500;box-shadow:0 2px 6px -2px oklch(0.546 0.215 262.881 / .5)}+ .wlab{position:absolute;left:12px;bottom:8px;font-family:var(--mono);font-size:9.5px;+ letter-spacing:.02em;opacity:0;transition:opacity .5s;white-space:nowrap}+ .scrn.marked .wlab{opacity:1}+ .wlab.r{color:var(--bad)} .wlab.y{color:var(--warn)}+ .dead{background:var(--dead-bg);border:1px solid var(--dead-bd)}+ .dead > *:not(.wlab){opacity:.22;filter:saturate(.2)}+ .dead .cno{display:none}+ .torn .ghost{opacity:.18}+ .torn .wlab{left:auto;right:12px;bottom:10px}+ .orph{flex:1;display:flex;border:1px dashed var(--orph-bd);border-radius:12px;+ background:var(--orph-bg);padding:5px;position:relative}+ .orph .goalc{opacity:.2;border-color:transparent;box-shadow:none;background:transparent}+ .orph .wlab{left:10px;bottom:7px}+ .vbar{position:absolute;left:0;right:0;bottom:0;padding:8px 14px;z-index:5;+ font-family:var(--mono);font-size:10px;letter-spacing:.02em;+ background:var(--vbar);backdrop-filter:blur(6px);+ transform:translateY(100%);transition:transform .45s cubic-bezier(.22,1,.36,1)}+ .vbar.show{transform:none}+ .vbar.badv{color:var(--bad);border-top:1px solid rgba(248,113,113,.3)}+ .vbar.goodv{color:var(--good);border-top:1px solid rgba(74,222,128,.3)}++ footer{display:flex;justify-content:space-between;font-family:var(--mono);font-size:9.5px;+ letter-spacing:.03em;color:var(--muted)}+ #ctrl{position:fixed;top:8px;right:8px;opacity:0;transition:opacity .2s;z-index:99}+ body:hover #ctrl{opacity:1}+ #ctrl button{background:#18181b;color:var(--ink);border:1px solid var(--rule);border-radius:6px;+ padding:4px 10px;font-size:11px;cursor:pointer}+</style>+<style>+ :root[data-theme="light"]{+ --bg:#f4f4f6; --ink:#111114; --muted:#6b6b76;+ --rule:rgba(0,0,0,.09); --chip:rgba(0,0,0,.05);+ --bad:#dc2626; --warn:#b45309; --good:#15803d;+ --s-bg:#f7f7f8; --s-card:#ffffff; --s-border:rgba(0,0,0,.08);+ --s-ink:#111114; --s-dim:rgba(17,17,20,.55);+ --panel:#f7f7f8; --code:#2a2a33; --noise:#c6c6ce; --nm:#6d28d9; --ty:#1d4ed8; --st:#52525b;+ --wound-bg:rgba(220,38,38,.07); --worn-bg:rgba(217,119,6,.08);+ --soft:rgba(0,0,0,.06); --vbar:rgba(255,255,255,.92);+ --grid:rgba(0,0,0,.07); --grid-ink:rgba(0,0,0,.4);+ --dead-bg:rgba(220,38,38,.05); --dead-bd:rgba(220,38,38,.5);+ --orph-bd:rgba(180,83,9,.5); --orph-bg:rgba(180,83,9,.05);+ }+ :root[data-theme="light"] .panel{box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}+ :root[data-theme="light"] .balc,:root[data-theme="light"] .pay,:root[data-theme="light"] .avatar{color:#fff}+ :root[data-theme="light"] .g,:root[data-theme="light"] .goalc{box-shadow:0 1px 3px -2px rgba(0,0,0,.2)}+</style>+<script>+ (function(){+ var root=document.documentElement;+ function apply(dark){ root.dataset.theme = dark ? "dark" : "light"; }+ var q=new URLSearchParams(location.search).get("theme");+ if(q==="light"||q==="dark"){ apply(q==="dark"); return; }+ try{+ var pe=window.parent && window.parent.document && window.parent.document.documentElement;+ if(pe){+ var read=function(){ var c=pe.classList; var d=c.contains("dark") || (!c.contains("light") && matchMedia("(prefers-color-scheme: dark)").matches); apply(d); };+ read();+ new MutationObserver(read).observe(pe,{attributes:true,attributeFilter:["class","style","data-theme"]});+ matchMedia("(prefers-color-scheme: dark)").addEventListener("change",read);+ return;+ }+ }catch(e){}+ var mq=matchMedia("(prefers-color-scheme: dark)"); apply(mq.matches); mq.addEventListener("change",function(e){apply(e.matches)});+ })();+</script>+<style>+ #ctrl{display:none!important}+ body{display:block;overflow:hidden}+ #stage{position:fixed;left:0;top:0;transform-origin:top left}+</style>+</head>+<body>+<div id="stage">+ <header>+ <div class="t">“Build me a personal finance home screen” <em>· one brief, two models</em></div>+ <div class="m">DiffusionGemma 26B-A4B · text diffusion</div>+ </header>+ <div id="duo"></div>+ <footer><span>openui-lang · every UI is code</span><span id="note"></span></footer>+</div>+<div id="ctrl"><button onclick="restart()">↺ restart</button></div>+<script>+const q = new URLSearchParams(location.search);+const SPEED = +(q.get("speed") ?? 1);+const sleep = (ms) => new Promise(r => setTimeout(r, ms / SPEED));+const NOISE = "░▒▓@#$%&*+=?/\\|~^<>{}[]()aeioux0123456789";+const rnd = () => NOISE[Math.random()*NOISE.length|0];+const OK = [+ ['header ','CardHeader("Aura Banking", "Good evening, Maya")'],+ ['balance','Heading("$24,180.44", "h1")'],+ ['delta ','Tag("+$1,240 this month", null, null, "success")'],+ ['balCard','Card([balance, delta], "highlight")'],+ ['goal ','Progress(68, "Tokyo trip · $3,400 of $5,000")'],+ ['days ','["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]'],+ ['spend ','Series("Spending", [420, 380, 510, 300, 680, 720, 540])'],+ ['chart ','AreaChart(days, [spend], "natural")'],+ ['tx1 ','ListItem("Blue Bottle Coffee", "Food · today", "-$6.40")'],+ ['tx2 ','ListItem("Metro Card", "Transit · today", "-$32.00")'],+ ['tx3 ','ListItem("Figma", "Software · yesterday", "-$15.00")'],+ ['txList ','ListBlock([tx1, tx2, tx3])'],+ ['payBtn ','Button("Pay upcoming bills", null, "primary")'],+ ['root ','Card([header, balCard, goal, chart, txList, payBtn])'],+];+const BAD = [+ ['header ','CardHeader("Aura Banking", "Good evening, Maya")', ''],+ ['balance','Heading("$24,180.44", "h1")', ''],+ ['delta ','Tag("+$1,240 this month", null, null, "success")', ''],+ ['balCard','Card([balance, delta], "row", "xl", true)', 'wound|invalid args'],+ ['goal ','Progress(68, "Tokyo trip · $3,400 of $5,000")', 'worn|never attached'],+ ['days ','["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]', ''],+ ['spend ','Series("Spending", [420, 380, 510, 300, 680, 720, 540])', ''],+ ['chart ','AreaChart(days, [spend], "natural")', ''],+ ['tx1 ','ListItem("Blue Bottle Coffee", "Food · today", "-$6.40")', ''],+ ['tx2 ','ListItem("Metro Card", "Transit · today, "-$32.00")', 'wound|stray quote'],+ ['tx3 ','ListItem("Figma", "Software · yesterday", "-$15.00")', ''],+ ['txList ','ListBlock([tx1, tx2, tx3])', ''],+ ['payBtn ','Button("Pay upcoming bills", null, "primary")', ''],+ ['root ','Card([header, balCard, chart, txList, payBtn])', ''],+];++function makeHalf(key, cls, label){+ const h = document.createElement("div");+ h.className = "half " + cls;+ h.innerHTML = `<span class="stamp">${label}</span>+ <div class="panel" id="panel-${key}"><div class="code" id="code-${key}"></div>+ <div class="scrn" id="scrn-${key}"></div>+ <div class="vbar" id="vbar-${key}"></div></div>`;+ document.getElementById("duo").appendChild(h);+}+makeHalf("base","base","base model");+makeHalf("ours","ours","after finetuning on OpenUI");++function highlight(nm, expr, tag){+ const hi = expr.replace(/"([^"]*)"/g, "<span class='st'>\"$1\"</span>")+ .replace(/^([A-Z][\w]*)\(/, "<span class='ty'>$1</span>(");+ return `<span class="nm">${nm}</span>= ${hi}${tag?`<span class="tag">${tag}</span>`:""}`;+}+async function denoise(key, rows, blockSize, ticks, tickMs){+ const box = document.getElementById("code-"+key); box.innerHTML = "";+ const lines = rows.map(r=>{+ const [nm, expr, tag=""] = r;+ const [wcls, note] = tag ? tag.split("|") : ["",""];+ const ln = document.createElement("div"); ln.className = "cl";+ ln.dataset.plain = `${nm}= ${expr}`;+ ln.dataset.final = highlight(nm, expr, note);+ ln.dataset.wcls = wcls;+ box.appendChild(ln); return ln;+ });+ for (let b = 0; b < lines.length; b += blockSize){+ const block = lines.slice(b, b + blockSize);+ for (const ln of block){ ln.classList.add("on","noise"); ln.textContent = [...ln.dataset.plain].map(c=>c===" "?" ":rnd()).join(""); }+ await sleep(tickMs * 1.5);+ const locks = block.map(ln => new Array(ln.dataset.plain.length).fill(false));+ for (let t = 1; t <= ticks; t++){+ const p = t / ticks;+ block.forEach((ln, i) => {+ const plain = ln.dataset.plain;+ let html = "";+ for (let c = 0; c < plain.length; c++){+ if (plain[c] === " "){ html += " "; continue; }+ if (!locks[i][c] && Math.random() < p * p * 1.4) locks[i][c] = true;+ html += locks[i][c] ? `<span class="lock">${plain[c].replace(/[<>&]/g,x=>({"<":"<",">":">","&":"&"}[x]))}</span>` : rnd();+ }+ ln.innerHTML = html;+ });+ await sleep(tickMs);+ }+ for (const ln of block){+ ln.classList.remove("noise");+ ln.innerHTML = ln.dataset.final;+ if (ln.dataset.wcls) ln.classList.add(ln.dataset.wcls);+ }+ await sleep(tickMs);+ }+}+const CHART = (()=>{+ const d=[420,380,510,300,680,720,540];+ const W=500,H=86,L=34,R=8,T=8,B=6;+ const xs=d.map((_,i)=>L+i*(W-L-R)/(d.length-1));+ const ys=d.map(v=>T+(1-(v-260)/(780-260))*(H-T-B));+ const pts=d.map((_,i)=>[xs[i],ys[i]]);+ let p=`M ${pts[0][0].toFixed(1)},${pts[0][1].toFixed(1)}`;+ for(let i=0;i<pts.length-1;i++){+ const p0=pts[Math.max(0,i-1)],p1=pts[i],p2=pts[i+1],p3=pts[Math.min(pts.length-1,i+2)];+ const c1=[p1[0]+(p2[0]-p0[0])/6,p1[1]+(p2[1]-p0[1])/6];+ const c2=[p2[0]-(p3[0]-p1[0])/6,p2[1]-(p3[1]-p1[1])/6];+ p+=` C ${c1[0].toFixed(1)},${c1[1].toFixed(1)} ${c2[0].toFixed(1)},${c2[1].toFixed(1)} ${p2[0].toFixed(1)},${p2[1].toFixed(1)}`;+ }+ const grid=[{y:T,v:"$780"},{y:T+(H-T-B)/2,v:"$520"},{y:H-B,v:"$260"}];+ const peak=pts[5];+ return {W,H,line:p, area:p+` L ${xs[6].toFixed(1)},${H-B} L ${L},${H-B} Z`, grid,+ px:(peak[0]/W*100).toFixed(1), py:(peak[1]/H*100).toFixed(1)};})();++function chartSVG(broken){+ const g=CHART.grid.map(r=>+ `<line x1="34" y1="${r.y.toFixed(1)}" x2="${CHART.W-8}" y2="${r.y.toFixed(1)}" style="stroke:var(--grid)" stroke-width="1" vector-effect="non-scaling-stroke"/>+ <text x="26" y="${(r.y+3).toFixed(1)}" text-anchor="end" font-size="8.5" style="fill:var(--grid-ink)" font-family="Inter,sans-serif">${r.v}</text>`).join("");+ return `<svg viewBox="0 0 ${CHART.W} ${CHART.H}" preserveAspectRatio="none">+ <defs><linearGradient id="ag${broken?1:0}" x1="0" y1="0" x2="0" y2="1">+ <stop offset="5%" stop-color="oklch(0.546 0.215 262.881)" stop-opacity=".5"/>+ <stop offset="95%" stop-color="oklch(0.546 0.215 262.881)" stop-opacity="0"/></linearGradient></defs>+ ${g}+ <path class="carea" d="${CHART.area}" fill="url(#ag${broken?1:0})"/>+ <path class="cline" d="${CHART.line}" pathLength="1" vector-effect="non-scaling-stroke"/>+ </svg>+ <span class="cdot" style="left:${CHART.px}%;top:${CHART.py}%"></span>`;+}++function screenHTML(broken){+ const tx=(l,n,c,a,ghost)=>`<div class="trow${ghost?" ghost":""}"><span class="tico">${l}</span><span><div class="n">${n}</div><div class="c">${c}</div></span><span class="amt">${a}</span></div>`;+ const goalCard = `+ <div class="goalc"><div class="r1"><span>Tokyo trip</span><b>68%</b></div>+ <div class="r2">$3,400 of $5,000 saved</div>+ <div class="ptrack"><div class="pfill"></div></div></div>`;+ return `+ <div class="chd"><span><div class="a">Aura Banking</div><div class="b">Good evening, Maya</div></span><span class="avatar">M</span></div>+ <div class="sbody">+ <div class="g balc ${broken?"dead":""}" style="--d:0ms">+ <div class="k">Total balance</div><div class="v">$24,180.44</div>+ <span class="tagch">+$1,240 this month</span><span class="cno">•••• 4290</span>+ ${broken?`<span class="wlab r">balCard · invalid args · rejected</span>`:""}+ </div>+ <div class="goalw g" style="--d:70ms;background:none;border:none;box-shadow:none;padding:0;overflow:visible">+ ${broken?`<div class="orph">${goalCard}<span class="wlab y">goal · written, never attached</span></div>`:goalCard}+ </div>+ <div class="g chartc" style="--d:140ms">+ <div class="hd"><span>Spending</span><span class="hd2">last 7 days</span></div>+ <div class="cwrap">${chartSVG(broken)}</div>+ <div class="cx"><span>Mon</span><span>Tue</span><span>Wed</span><span>Thu</span><span>Fri</span><span>Sat</span><span>Sun</span></div>+ </div>+ <div class="g txc ${broken?"torn":""}" style="--d:210ms">+ <div class="hd"><span>Recent activity</span></div>+ ${tx("B","Blue Bottle Coffee","Food · today","-$6.40",false)}+ ${tx("M","Metro Card","Transit · today","-$32.00",broken)}+ ${tx("F","Figma","Software · yesterday","-$15.00",broken)}+ ${broken?`<span class="wlab r">tx2 · stray quote · parse stopped</span>`:""}+ </div>+ <div class="payw" style="--d:280ms"><div class="pay">Pay upcoming bills</div></div>+ </div>`;+}++async function run(){+ const note=document.getElementById("note");+ if(q.get("phase")==="snap"){ flip(); mark(); showVerdicts(); return; }+ note.textContent="blocks denoise in parallel · noise → code";+ await Promise.all([+ denoise("base", BAD, 5, 5, 95),+ denoise("ours", OK, 5, 5, 95),+ ]);+ await sleep(300);+ flip();+ note.textContent="the code becomes the UI";+ await sleep(1100);+ mark();+ await sleep(700);+ showVerdicts();+ await sleep(3000);+ restart();+}+function flip(){+ for(const k of ["base","ours"]){+ document.getElementById("code-"+k).classList.add("gone");+ const sc=document.getElementById("scrn-"+k);+ sc.innerHTML=screenHTML(k==="base");+ requestAnimationFrame(()=>requestAnimationFrame(()=>sc.classList.add("show")));+ }+}+function mark(){ document.getElementById("scrn-base").classList.add("marked"); }+function showVerdicts(){+ const vb=document.getElementById("vbar-base");+ vb.className="vbar badv show"; vb.textContent="✕ parser · 3 defects: balCard rejected · list torn · goal lost";+ setTimeout(()=>{const vo=document.getElementById("vbar-ours");+ vo.className="vbar goodv show"; vo.textContent="✓ parser · clean: 14/14 statements attached & rendered";+ document.getElementById("panel-ours").classList.add("done");},380/SPEED);+ document.getElementById("note").textContent="scored by the openui-lang parser";+}+function restart(){+ for(const k of ["base","ours"]){+ const c=document.getElementById("code-"+k); c.classList.remove("gone"); c.innerHTML="";+ const sc=document.getElementById("scrn-"+k); sc.className="scrn"; sc.innerHTML="";+ document.getElementById("vbar-"+k).className="vbar";+ document.getElementById("panel-"+k).classList.remove("done");+ }+ setTimeout(run,600/SPEED);+}+run();+</script>+<script>+const fit=()=>{const s=Math.min(innerWidth/1200,innerHeight/675);+ document.getElementById("stage").style.transform=+ `translate(${(innerWidth-1200*s)/2}px,${(innerHeight-675*s)/2}px) scale(${s})`;};+addEventListener("resize",fit);fit();+</script>+</body>+</html>diff --git a/docs/public/images/blog/oui-1.png b/docs/public/images/blog/oui-1.pngnew file mode 100644index 000000000..ddbf04a06Binary files /dev/null and b/docs/public/images/blog/oui-1.png differ