aashish1904 commited on
Commit
eab284b
·
verified ·
1 Parent(s): 348823d

Upload README.md with huggingface_hub

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