language, library_name, pipeline_tag, license, base_model, tags, model-index
language
library_name
pipeline_tag
license
base_model
tags
model-index
transformers
text-generation
apache-2.0
Qwen/Qwen3-4B-Instruct-2507
web-generation
html
css
tailwind-css
ui-generation
web-design
small-model
qwen3
transformers
name
results
UIGEN-FX-4B-Preview
<style>
/* ===== Adaptive Theme (works on dark blue or white backdrops) ===== */
:root{
color-scheme: light dark;
/* Dark-default (great over navy/charcoal) */
--bg: transparent;
--panel: rgba(15,17,23,.55);
--panel-solid: #0f1117;
--ink: #eaf0ff;
--muted: #a9b3c7;
--brand: #5b8cff; /* indigo */
--brand-2: #45e7c6; /* mint */
--border: rgba(255,255,255,.14);
--glow: rgba(91,140,255,.28);
--code-bg: #0b1220;
--code-br: #15233d;
--pill: rgba(255,255,255,.05);
--radius: 16px;
}
@media (prefers-color-scheme: light){
:root{
/* Light-overrides (great over white/light backdrops) */
--panel: rgba(255,255,255,.66);
--panel-solid: #ffffff;
--ink: #0b0c0f;
--muted: #4a5568;
--brand: #3b6dff;
--brand-2: #22c6a3;
--border: rgba(0,0,0,.12);
--glow: rgba(59,109,255,.20);
--code-bg: #f6f8ff;
--code-br: #e4e8f7;
--pill: rgba(0,0,0,.04);
}
}
/* Fallback: force light palette if host ignores color-scheme */
.on-light{
--panel: rgba(255,255,255,.66) !important;
--panel-solid: #ffffff !important;
--ink: #0b0c0f !important;
--muted: #4a5568 !important;
--brand: #3b6dff !important;
--brand-2: #22c6a3 !important;
--border: rgba(0,0,0,.12) !important;
--glow: rgba(59,109,255,.20) !important;
--code-bg: #f6f8ff !important;
--code-br: #e4e8f7 !important;
--pill: rgba(0,0,0,.04) !important;
}
/* ===== Layout & Components ===== */
*{ box-sizing:border-box }
.wrap{
background: var(--bg);
padding: 28px; border-radius: 18px;
}
.hero{
background:
radial-gradient(600px 240px at 20% 0%, color-mix(in oklab, var(--brand) 18%, transparent), transparent 60%),
radial-gradient(600px 240px at 80% 10%, color-mix(in oklab, var(--brand-2) 14%, transparent), transparent 60%);
border:1px solid var(--border);
border-radius:20px; padding:28px;
backdrop-filter: saturate(120%) blur(10px);
}
.alert{
border:1px dashed var(--border); border-radius:14px; padding:12px 14px; margin-bottom:14px;
background: color-mix(in oklab, var(--brand) 10%, var(--panel));
color: var(--ink); font-weight:700;
}
.kicker{ display:inline-block; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); font-size:.75rem; margin-bottom:.5rem }
h1,h2,h3{ color:var(--ink); margin:0 0 .4rem 0; line-height:1.1 }
h1{ font-size:2.25rem; font-weight:800 }
h2{ font-size:1.3rem; font-weight:700; margin-top:1.25rem }
h3{ font-size:1.05rem; font-weight:700 }
p,li{ color:var(--muted); line-height:1.6 }
hr{ border:none; height:1px; background:var(--border); margin:28px 0 }
.tagline{ font-size:1.05rem; color: color-mix(in oklab, var(--ink) 78%, var(--muted)); }
a.btn{
display:inline-block; padding:.7rem 1rem; border-radius:12px;
background: linear-gradient(180deg,var(--brand), color-mix(in oklab, var(--brand) 65%, #2b50ff));
color:#fff; text-decoration:none; font-weight:600;
box-shadow: 0 10px 30px var(--glow);
}
a.btn.ghost{
background:transparent; color:var(--ink);
border:1px solid var(--border);
}
.pill{
display:inline-flex; align-items:center; gap:.4rem;
padding:.35rem .6rem; border-radius:999px; border:1px dashed var(--border);
background: var(--pill); color: color-mix(in oklab, var(--ink) 70%, var(--muted));
}
.grid{ display:grid; gap:18px }
.grid-2{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
@media(max-width:900px){ .grid-2,.grid-3{ grid-template-columns:1fr } }
.card{
background: linear-gradient(180deg, color-mix(in oklab, var(--panel) 92%, transparent), transparent);
border:1px solid var(--border);
border-radius: var(--radius);
padding:16px;
backdrop-filter: blur(6px) saturate(120%);
}
.codeblock{
background: var(--code-bg); border:1px solid var(--code-br); border-radius:12px; padding:8px; overflow:auto;
margin: 1rem 0;
}
.codeblock pre{ margin:0; font-size:.92rem }
figure.screens{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:16px 0 0 0 }
figure.screens img{ width:100%; border-radius:12px; border:1px solid var(--border) }
table{ width:100%; border-collapse:collapse }
th,td{ text-align:left; padding:10px; border-bottom:1px solid var(--border); color:var(--muted) }
th{ color: color-mix(in oklab, var(--brand) 70%, var(--ink)); }
/* Badges */
.badge{ display:inline-flex; align-items:center; gap:.5rem; padding:.35rem .6rem; border:1px solid var(--border); border-radius:999px; color:var(--muted); font-size:.85rem }
</style>
What is FX?
UIGEN-FX-4B-Preview is a 4B parameter UI generation model tuned to behave like a
frontend engineer across 22 Frameworks.
Why 4B?
Small enough for laptops and fast iteration, while keeping strong structure and visual consistency.
FX emphasizes layout rhythm, spacing, and component composition to reduce cleanup work.
Quickstart
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Tesslate/UIGEN-FX-4B-Preview"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
prompt = """Make a single-file landing page for 'LatticeDB'.
Style: modern, generous whitespace, Tailwind, rounded-xl, soft gradients.
Sections: navbar, hero (headline + 2 CTAs), features grid, pricing (3 tiers),
FAQ accordion, footer. Constraints: semantic HTML, no external JS."""
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=2200, temperature=0.6, top_p=0.9)
print(tok.decode(out[0], skip_special_tokens=True))
vLLM
vllm serve Tesslate/UIGEN-FX-4B-Preview \
--host 0.0.0.0 --port 8000 \
--max-model-len 65536 \
--gpu-memory-utilization 0.92
sglang
python -m sglang.launch_server \
--model-path Tesslate/UIGEN-FX-4B-Preview \
--host 0.0.0.0 --port 5000 \
--mem-fraction-static 0.94 \
--attention-backend flashinfer \
--served-model-name UIGEN-FX-4B-Preview
Tip: Lower temperature (0.4– 0.6) yields stricter, cleaner markup; raise it for more visual variety.
Suggested Inference Settings
Param Value Notes
temperature0.6 Balance creativity & consistency (lower if quantized)
top_p0.9 Nucleus sampling
top_k40 Optional vocab restriction
max_new_tokens1200– 2500 Single-file sites often fit < 1800
repetition_penalty1.08– 1.15 Reduces repetitive classes/markup
Prompts that work well
Starter
Make a single-file landing page for "RasterFlow" (GPU video pipeline).
Style: modern tech, muted palette, Tailwind, rounded-xl, subtle gradients.
Sections: navbar, hero (big headline + 2 CTAs), logos row, features (3x cards),
code block (copyable), pricing (3 tiers), FAQ accordion, footer.
Constraints: semantic HTML, no external JS. Return ONLY the HTML code.
Design-strict
Use an 8pt spacing system. Palette: slate with indigo accents.
Typography scale: 14/16/18/24/36/56. Max width: 1200px.
Avoid shadows > md; prefer borders/dividers; keep line-length ~68ch.
Quantization & VRAM (example)
Format Footprint Notes
BF16 ~8.1 GB Fastest, best fidelity
GGUF Q5_K_M ~2.9 GB Great quality/size trade-off
GGUF Q4_K_M ~2.5 GB Laptop-friendly
Intended Use & Scope
Primary: React, Tailwind, Javascript, Static Site generators, Python Frontend WebUI
Secondary: Component blocks (hero, pricing, FAQ) for manual composition
Limitations
Accessibility: headings/labels are encouraged; ARIA coverage may need review.
Complex widgets: JS kept minimal unless requested; consider post-edit for heavy interactivity.
Ethical Considerations
Use rights-cleared assets when adding logos/images.
Curate prompts responsibly; review outputs before production use.
Training Summary (research preview)
Base: Qwen/Qwen3-4B-Instruct-2507
Objective: Web-only bias; reward semantic structure, spacing rhythm, responsive blocks; improved visual polish vs earlier UIGEN releases.
Data: Curated HTML/CSS/Tailwind snippets, component libraries, synthetic page specs & layout constraints.
Recipe: SFT with format constraints → instruction tuning → preference optimization on style/structure.
Context: effective ~64k; default generations sized for practical single-file pages.
Community
“FX aims to ship what a frontend engineer would: clean structure first, pretty pixels second.” — Tesslate Team
Citation
@misc{tesslate_uigen_fx_4b_2025,
title = {UIGEN-FX-4B-Preview: Frontend Engineer-tuned web generation (Research Preview)},
author = {Tesslate Team},
year = {2025},
url = {https://huggingface.co/Tesslate/UIGEN-FX-4B-Preview}
}