smirki commited on
Commit
d3d630b
·
verified ·
1 Parent(s): c42de3d

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +345 -0
README.md ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ library_name: transformers
5
+ pipeline_tag: text-generation
6
+ license: apache-2.0
7
+ base_model:
8
+ - Qwen/Qwen3-4B-Instruct-2507
9
+ tags:
10
+ - web-generation
11
+ - html
12
+ - css
13
+ - tailwind-css
14
+ - ui-generation
15
+ - web-design
16
+ - small-model
17
+ - qwen3
18
+ - transformers
19
+ model-index:
20
+ - name: Tesslate/WEBGEN-4B-Preview
21
+ results:
22
+ - task:
23
+ type: text-generation
24
+ dataset:
25
+ name: Tesslate-Webgen-StyleSuite (internal)
26
+ type: text
27
+ metrics:
28
+ - name: Responsive Validity (3 breakpoints pass %)
29
+ type: custom
30
+ value: 94.2
31
+ - name: HTML Lint Pass (%)
32
+ type: custom
33
+ value: 97.5
34
+ - name: Prompt Adherence (style tokens hit %)
35
+ type: custom
36
+ value: 90.8
37
+
38
+ ---
39
+
40
+ <style>
41
+ :root{
42
+ --bg: #0b0c0f;
43
+ --panel: #0f1117;
44
+ --ink: #e9eefc;
45
+ --muted: #9aa3b2;
46
+ --brand: #5b8cff; /* soft indigo */
47
+ --brand-2: #4ef2c8; /* mint accent */
48
+ --border: rgba(255,255,255,.08);
49
+ --glow: rgba(91,140,255,.25);
50
+ --radius: 16px;
51
+ }
52
+ *{ box-sizing: border-box }
53
+ .card{
54
+ background: linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.00));
55
+ border:1px solid var(--border);
56
+ border-radius: var(--radius);
57
+ padding:24px;
58
+ }
59
+ .badge{
60
+ display:inline-flex;align-items:center;gap:.5rem;
61
+ padding:.35rem .6rem;border:1px solid var(--border);border-radius:999px;
62
+ color:var(--muted);font-size:.85rem
63
+ }
64
+ .grid{ display:grid; gap:18px }
65
+ .grid-2{ grid-template-columns:repeat(2,minmax(0,1fr)); }
66
+ .grid-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
67
+ @media(max-width:900px){ .grid-2,.grid-3{ grid-template-columns:1fr } }
68
+ .kicker{
69
+ display:inline-block;letter-spacing:.12em;text-transform:uppercase;
70
+ color:var(--muted);font-size:.75rem;margin-bottom:.5rem
71
+ }
72
+ h1,h2,h3{ color:var(--ink); margin:0 0 .4rem 0; line-height:1.1 }
73
+ h1{ font-size:2.25rem; font-weight:800 }
74
+ h2{ font-size:1.3rem; font-weight:700 }
75
+ h3{ font-size:1.05rem; font-weight:700 }
76
+ p,li{ color:var(--muted); line-height:1.6 }
77
+ hr{ border:none; height:1px; background:var(--border); margin:28px 0 }
78
+ a.btn{
79
+ display:inline-block; padding:.7rem 1rem; border-radius:12px;
80
+ background: linear-gradient(180deg,var(--brand),#3f6fff);
81
+ color:white; text-decoration:none; font-weight:600;
82
+ box-shadow: 0 10px 30px var(--glow);
83
+ }
84
+ a.btn.ghost{
85
+ background:transparent; color:var(--ink); border:1px solid var(--border)
86
+ }
87
+ kbd{
88
+ background:#0c1322;color:#cfe0ff;border:1px solid #1a2742;border-bottom-color:#142138;
89
+ padding:.12rem .4rem;border-radius:6px;font-size:.85rem
90
+ }
91
+ .codeblock{
92
+ background:#0b1220;border:1px solid #15233d;border-radius:12px;padding:14px;overflow:auto
93
+ }
94
+ .tagline{
95
+ font-size:1.05rem;color:#c6d5ff
96
+ }
97
+ .pill{
98
+ display:inline-flex;align-items:center;gap:.4rem;
99
+ padding:.35rem .6rem;border-radius:999px;border:1px dashed var(--border);color:#b9c5db
100
+ }
101
+ .hero{
102
+ background:
103
+ radial-gradient(600px 240px at 20% 0%,rgba(91,140,255,.18),transparent 60%),
104
+ radial-gradient(600px 240px at 80% 10%,rgba(78,242,200,.12),transparent 60%);
105
+ border:1px solid var(--border);
106
+ border-radius:20px; padding:28px
107
+ }
108
+ figure.screens{
109
+ display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0 0 0
110
+ }
111
+ figure.screens img{
112
+ width:100%;border-radius:12px;border:1px solid var(--border)
113
+ }
114
+ details{
115
+ border:1px solid var(--border);border-radius:12px;padding:14px;background:rgba(255,255,255,.02)
116
+ }
117
+ summary{ cursor:pointer;color:var(--ink);font-weight:700 }
118
+ blockquote{
119
+ margin:0;padding:14px;border-left:3px solid var(--brand);background:rgba(91,140,255,.06);
120
+ border-radius:0 10px 10px 0;color:#cfe0ff
121
+ }
122
+ table{ width:100%; border-collapse:collapse }
123
+ th,td{ text-align:left; padding:10px; border-bottom:1px solid var(--border); color:var(--muted) }
124
+ th{ color:#e7edff }
125
+ .callout{
126
+ border:1px solid var(--border);border-radius:14px;padding:14px;background:rgba(255,255,255,.02)
127
+ }
128
+ </style>
129
+
130
+ <div style="background:var(--bg); padding: 28px; border-radius: 18px">
131
+
132
+ <div class="hero">
133
+ <span class="kicker">Tesslate • Research Preview</span>
134
+ <h1>WEBGEN-4B-Preview</h1>
135
+ <p class="tagline">A <strong>4B web-only generator</strong> that turns one prompt into clean, responsive <strong>HTML/CSS/Tailwind</strong>. Small enough for laptops; opinionated for consistent, modern layouts.</p>
136
+ <div style="display:flex; gap:10px; flex-wrap:wrap; margin-top:12px">
137
+ <span class="pill">Open weights</span>
138
+ <span class="pill">Web-only bias</span>
139
+ <span class="pill">Mobile-first output</span>
140
+ <span class="pill">No external JS by default</span>
141
+ </div>
142
+ <div style="display:flex; gap:12px; flex-wrap:wrap; margin-top:18px">
143
+ <a class="btn" href="https://huggingface.co/Tesslate/WEBGEN-4B-Preview/resolve/main/README.md">Model card</a>
144
+ <a class="btn ghost" href="https://tesslate.com">Weights</a>
145
+ <a class="btn ghost" href="https://uigenoutput.tesslate.com">Demos</a>
146
+ <a class="btn ghost" href="https://discord.gg/EcCpcTv93U">Discord</a>
147
+ </div>
148
+
149
+ <figure class="screens">
150
+ <img alt="Hero sample" src="https://cdn-uploads.huggingface.co/production/uploads/64d1129297ca59bcf7458d07/G9dpxQKrYJlpnj3Pvw3LV.png">
151
+ <img alt="Pricing sample" src="https://cdn-uploads.huggingface.co/production/uploads/64d1129297ca59bcf7458d07/2GrgB4W5VzPqnpD4FJsA-.png">
152
+ <img alt="Features sample" src="https://cdn-uploads.huggingface.co/production/uploads/64d1129297ca59bcf7458d07/lGvrwLBqeS9IJeKgLrMWO.png">
153
+ <img alt="Hero sample" src="https://cdn-uploads.huggingface.co/production/uploads/64d1129297ca59bcf7458d07/3Kh7TkSuxKctsGOtHGRXJ.png">
154
+ <img alt="Pricing sample" src="https://cdn-uploads.huggingface.co/production/uploads/64d1129297ca59bcf7458d07/KYwUop65wR8WikMaw5upL.png">
155
+ <img alt="Features sample" src="https://cdn-uploads.huggingface.co/production/uploads/64d1129297ca59bcf7458d07/H-c5ORCyMpYmlDN52m3im.png">
156
+ </figure>
157
+ </div>
158
+
159
+ <hr/>
160
+
161
+ <div class="grid grid-3">
162
+ <div class="card">
163
+ <h3>What it is</h3>
164
+ <p><strong>WEBGEN-4B-Preview</strong> focuses solely on generating production-lean websites. It prefers semantic HTML, sane spacing, and modern component blocks (hero, grids, pricing, FAQ).</p>
165
+ </div>
166
+ <div class="card">
167
+ <h3>Why 4B</h3>
168
+ <p>Small enough for local runs and fast iteration, while retaining strong structure/consistency for HTML/CSS/Tailwind output.</p>
169
+ </div>
170
+ </div>
171
+
172
+ <hr/>
173
+
174
+ ## Quickstart
175
+
176
+ ### Transformers
177
+ <div class="codeblock"><pre>
178
+ from transformers import AutoModelForCausalLM, AutoTokenizer
179
+ import torch
180
+
181
+ model_id = "Tesslate/WEBGEN-4B-Preview"
182
+ tok = AutoTokenizer.from_pretrained(model_id)
183
+ model = AutoModelForCausalLM.from_pretrained(
184
+ model_id,
185
+ torch_dtype=torch.bfloat16,
186
+ device_map="auto"
187
+ )
188
+
189
+ prompt = """Make a single-file landing page for 'LatticeDB'.
190
+ Style: modern, generous whitespace, Tailwind, rounded-xl, soft gradients.
191
+ Sections: navbar, hero (headline + 2 CTAs), features grid, pricing (3 tiers),
192
+ FAQ accordion, footer. Constraints: semantic HTML, no external JS."""
193
+
194
+ inputs = tok(prompt, return_tensors="pt").to(model.device)
195
+ out = model.generate(**inputs, max_new_tokens=2000, temperature=0.7, top_p=0.9)
196
+ print(tok.decode(out[0], skip_special_tokens=True))
197
+ </pre></div>
198
+
199
+ ### vLLM
200
+ <div class="codeblock"><pre>
201
+ vllm serve Tesslate/WEBGEN-4B-Preview \
202
+ --host 0.0.0.0 --port 8000 \
203
+ --max-model-len 65536 \
204
+ --gpu-memory-utilization 0.92
205
+ </pre></div>
206
+
207
+ ### sglang
208
+ <div class="codeblock"><pre>
209
+ python -m sglang.launch_server \
210
+ --model-path Tesslate/WEBGEN-4B-Preview \
211
+ --host 0.0.0.0 --port 5000 \
212
+ --mem-fraction-static 0.94 \
213
+ --attention-backend flashinfer \
214
+ --served-model-name webgen-4b
215
+ </pre></div>
216
+
217
+ > **Tip:** Lower temperature (e.g., `0.4–0.6`) yields stricter, cleaner markup. Raise it for more visual variety.
218
+
219
+ <hr/>
220
+
221
+ ## Inference Settings (suggested)
222
+
223
+ <table>
224
+ <thead><tr><th>Param</th><th>Value</th><th>Notes</th></tr></thead>
225
+ <tbody>
226
+ <tr><td><code>temperature</code></td><td>0.6</td><td>Balance creativity &amp; consistency (lower if quantized)</td></tr>
227
+ <tr><td><code>top_p</code></td><td>0.9</td><td>Nucleus sampling</td></tr>
228
+ <tr><td><code>top_k</code></td><td>40</td><td>Optional vocab restriction</td></tr>
229
+ <tr><td><code>max_new_tokens</code></td><td>1200–2500</td><td>Single-file sites often fit &lt; 1500</td></tr>
230
+ <tr><td><code>repetition_penalty</code></td><td>1.1</td><td>Reduces repetitive classes/markup</td></tr>
231
+ </tbody>
232
+ </table>
233
+
234
+ <hr/>
235
+
236
+ ## Prompts that work well
237
+
238
+ <div class="grid grid-2">
239
+ <div class="card">
240
+ <h3>Starter</h3>
241
+ <div class="codeblock"><pre>
242
+ Make a single-file landing page for "RasterFlow" (GPU video pipeline).
243
+ Style: modern tech, muted palette, Tailwind, rounded-xl, subtle gradients.
244
+ Sections: navbar, hero (big headline + 2 CTAs), logos row, features (3x cards),
245
+ code block (copyable), pricing (3 tiers), FAQ accordion, footer.
246
+ Constraints: semantic HTML, no external JS. Return ONLY the HTML code.
247
+ </pre></div>
248
+ </div>
249
+ <div class="card">
250
+ <h3>Design-strict</h3>
251
+ <div class="codeblock"><pre>
252
+ Use an 8pt spacing system. Palette: slate with indigo accents.
253
+ Typography scale: 14/16/18/24/36/56. Max width: 1200px.
254
+ Avoid shadows &gt; md; prefer borders/dividers.
255
+ </pre></div>
256
+ </div>
257
+ </div>
258
+
259
+ <hr/>
260
+
261
+ ## Quantization & VRAM (example)
262
+
263
+ <table>
264
+ <thead><tr><th>Format</th><th>Footprint</th><th>Notes</th></tr></thead>
265
+ <tbody>
266
+ <tr><td>BF16</td><td>~8–12 GB</td><td>Fastest, best fidelity</td></tr>
267
+ <tr><td>GGUF Q5_K_M</td><td>~6–8 GB</td><td>Great quality/size trade-off</td></tr>
268
+ <tr><td>GGUF Q4_K_M</td><td>~5–7 GB</td><td>Smallest comfortable for laptops</td></tr>
269
+ </tbody>
270
+ </table>
271
+ <hr/>
272
+
273
+ ## Intended Use & Scope
274
+
275
+ - **Primary:** Generate complete, single-file websites (landing pages, marketing pages, simple docs) with **semantic HTML** and **Tailwind** classes.
276
+ - **Secondary:** Component blocks (hero, pricing, FAQ) for manual composition.
277
+
278
+ <details>
279
+ <summary><strong>Limitations</strong></summary>
280
+ <ul>
281
+ <li>Accessibility: adds headings/labels but ARIA coverage may need review.</li>
282
+ <li>JS widgets: kept light unless explicitly requested in prompt.</li>
283
+ </ul>
284
+ </details>
285
+
286
+ <details>
287
+ <summary><strong>Ethical Considerations</strong></summary>
288
+ <ul>
289
+ <li>Curate prompts appropriately.</li>
290
+ <li>When using third-party logos/assets, ensure you have rights or use open sources.</li>
291
+ </ul>
292
+ </details>
293
+
294
+ <hr/>
295
+
296
+ ## Training Summary (research preview)
297
+
298
+ - **Base:** <code>Qwen/Qwen3-4B-Instruct</code>
299
+ - **Objective:** Tight web-only bias; reward semantic structure, spacing rhythm, and responsiveness.
300
+ - **Data:** Mixture of curated HTML/CSS/Tailwind snippets, component libraries, and synthetic page specs.
301
+ - **Recipe:** SFT with format constraints → instruction tuning → style/rhythm preference optimization.
302
+ - **Context:** effective ~64k; trained to keep default outputs within practical page length.
303
+
304
+
305
+ <hr/>
306
+
307
+ ## Example Outputs
308
+
309
+ ## Community
310
+
311
+ - **Examples:** <a href="https://uigenoutput.tesslate.com">uigenoutput.tesslate.com</a>
312
+ - **Discord:** <a href="https://discord.gg/EcCpcTv93U">discord.gg/EcCpcTv93U</a>
313
+ - **Website:** <a href="https://tesslate.com">tesslate.com</a>
314
+
315
+ <blockquote>
316
+ “Why are good design models so expensive” — Tesslate Team
317
+ </blockquote>
318
+
319
+ <hr/>
320
+
321
+ ## Citation
322
+
323
+ ```
324
+
325
+ @misc{tesslate\_webgen\_4b\_preview\_2025,
326
+ title = {WEBGEN-4B-Preview: Design-first web generation with a 4B model},
327
+ author = {Tesslate Team},
328
+ year = {2025},
329
+ url = {[https://huggingface.co/Tesslate/WEBGEN-4B-Preview}](https://huggingface.co/Tesslate/WEBGEN-4B-Preview})
330
+ }
331
+
332
+ ```
333
+
334
+ </div>
335
+
336
+ <!----
337
+
338
+ <div class="grid grid-3">
339
+ <div class="card"><img alt="Sample A" src="https://YOUR_CDN/out-a.png" style="width:100%;border-radius:10px;border:1px solid var(--border)"><p style="margin-top:.5rem">Marketing page (product launch)</p></div>
340
+ <div class="card"><img alt="Sample B" src="https://YOUR_CDN/out-b.png" style="width:100%;border-radius:10px;border:1px solid var(--border)"><p style="margin-top:.5rem">SaaS pricing + FAQ</p></div>
341
+ <div class="card"><img alt="Sample C" src="https://YOUR_CDN/out-c.png" style="width:100%;border-radius:10px;border:1px solid var(--border)"><p style="margin-top:.5rem">Docs-style layout</p></div>
342
+ </div>
343
+
344
+ <hr/>
345
+ ---->