Spaces:
Running on Zero
Running on Zero
Upload index.html with huggingface_hub
Browse files- index.html +26 -20
index.html
CHANGED
|
@@ -194,9 +194,15 @@
|
|
| 194 |
<div class="dateline"><span>Diffusion <span style="font-variant:normal">vs</span> Autoregression · June 2026</span></div>
|
| 195 |
<hr class="double-rule" />
|
| 196 |
<p class="standfirst">
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
</p>
|
| 201 |
</header>
|
| 202 |
|
|
@@ -215,7 +221,7 @@
|
|
| 215 |
</div>
|
| 216 |
</details>
|
| 217 |
<div class="controls">
|
| 218 |
-
<button class="run-btn" id="run">Correct
|
| 219 |
<label class="toggle">
|
| 220 |
<input type="checkbox" id="canvas-toggle" />
|
| 221 |
seed canvas with OCR text <em style="font-size:.78em">(experimental — barely edits)</em>
|
|
@@ -225,18 +231,18 @@
|
|
| 225 |
</section>
|
| 226 |
|
| 227 |
<nav class="tabs">
|
| 228 |
-
<button class="active" data-pane="pane-press">
|
| 229 |
-
<button data-pane="pane-compare">Side by
|
| 230 |
-
<button data-pane="pane-ledger">
|
| 231 |
</nav>
|
| 232 |
|
| 233 |
<section class="pane active" id="pane-press">
|
| 234 |
<div class="press-stage">
|
| 235 |
<div class="press-status">
|
| 236 |
-
<span id="press-label">
|
| 237 |
<span id="press-step"></span>
|
| 238 |
</div>
|
| 239 |
-
<div class="press-canvas settling" id="press-canvas"><span class="placeholder">Run a passage and watch DiffusionGemma
|
| 240 |
<div class="press-controls">
|
| 241 |
<button id="press-replay" disabled>replay</button>
|
| 242 |
<input type="range" id="press-slider" min="0" max="0" value="0" step="1" disabled />
|
|
@@ -261,19 +267,19 @@
|
|
| 261 |
<div class="columns">
|
| 262 |
<div class="col">
|
| 263 |
<div class="col-head">
|
| 264 |
-
<h2>
|
| 265 |
-
<div class="col-sub"><a href="https://huggingface.co/google/diffusiongemma-26B-A4B-it">
|
| 266 |
</div>
|
| 267 |
-
<div class="statline" id="stats-dg"><span class="placeholder">
|
| 268 |
-
<div class="proof" id="proof-dg"><span class="placeholder">Corrected
|
| 269 |
</div>
|
| 270 |
<div class="col">
|
| 271 |
<div class="col-head">
|
| 272 |
-
<h2>
|
| 273 |
-
<div class="col-sub"><a href="https://huggingface.co/google/gemma-4-E4B-it">
|
| 274 |
</div>
|
| 275 |
-
<div class="statline" id="stats-g4"><span class="placeholder">
|
| 276 |
-
<div class="proof" id="proof-g4"><span class="placeholder">Corrected
|
| 277 |
</div>
|
| 278 |
</div>
|
| 279 |
<div class="legend">
|
|
@@ -466,7 +472,7 @@ function renderCached(e) {
|
|
| 466 |
renderProofs();
|
| 467 |
pressLoad([], null);
|
| 468 |
$("press-canvas").classList.add("settling");
|
| 469 |
-
$("press-canvas").innerHTML = `<span class="placeholder">
|
| 470 |
$("press-stats").innerHTML = ""; $("press-step").textContent = "";
|
| 471 |
}
|
| 472 |
|
|
@@ -493,7 +499,7 @@ $("run").addEventListener("click", async () => {
|
|
| 493 |
switchTab("pane-press");
|
| 494 |
clearInterval(replayTimer);
|
| 495 |
$("press-canvas").classList.add("settling");
|
| 496 |
-
$("press-canvas").innerHTML = `<span class="spinner" style="font-style:italic;color:var(--oxblood)">the
|
| 497 |
$("press-step").textContent = ""; $("press-stats").innerHTML = "";
|
| 498 |
spinner($("proof-dg"), "denoising"); $("stats-dg").innerHTML = "";
|
| 499 |
spinner($("proof-g4"), "queued"); $("stats-g4").innerHTML = "";
|
|
@@ -515,7 +521,7 @@ $("run").addEventListener("click", async () => {
|
|
| 515 |
if (g4.error) showError($("proof-g4"), g4.error);
|
| 516 |
else { lastResults.g4 = g4; stats($("stats-g4"), g4); renderProofs(); }
|
| 517 |
} catch (err) {
|
| 518 |
-
$("press-canvas").innerHTML = `<div class="error-box">
|
| 519 |
} finally {
|
| 520 |
btn.disabled = false;
|
| 521 |
}
|
|
|
|
| 194 |
<div class="dateline"><span>Diffusion <span style="font-variant:normal">vs</span> Autoregression · June 2026</span></div>
|
| 195 |
<hr class="double-rule" />
|
| 196 |
<p class="standfirst">
|
| 197 |
+
<a href="https://huggingface.co/google/diffusiongemma-26B-A4B-it">DiffusionGemma</a> is an experimental
|
| 198 |
+
language model that generates text by <em>denoising</em> 256 tokens in parallel rather than writing one
|
| 199 |
+
token at a time. This demo uses it to correct noisy OCR from historical newspapers, head‑to‑head against a
|
| 200 |
+
conventional autoregressive model (<a href="https://huggingface.co/google/gemma-4-E4B-it">Gemma‑4‑E4B</a>).
|
| 201 |
+
</p>
|
| 202 |
+
<p class="standfirst" style="margin-top:.5rem">
|
| 203 |
+
<b>How to use it:</b> pick a passage below (or paste your own), press <b>Correct this text</b>, and watch the
|
| 204 |
+
correction emerge step by step. On a 75‑passage benchmark the diffusion model corrected <em>more accurately</em>
|
| 205 |
+
than the autoregressive baseline — and roughly 8× faster.
|
| 206 |
</p>
|
| 207 |
</header>
|
| 208 |
|
|
|
|
| 221 |
</div>
|
| 222 |
</details>
|
| 223 |
<div class="controls">
|
| 224 |
+
<button class="run-btn" id="run">Correct this text</button>
|
| 225 |
<label class="toggle">
|
| 226 |
<input type="checkbox" id="canvas-toggle" />
|
| 227 |
seed canvas with OCR text <em style="font-size:.78em">(experimental — barely edits)</em>
|
|
|
|
| 231 |
</section>
|
| 232 |
|
| 233 |
<nav class="tabs">
|
| 234 |
+
<button class="active" data-pane="pane-press">Watch it denoise</button>
|
| 235 |
+
<button data-pane="pane-compare">Side by side</button>
|
| 236 |
+
<button data-pane="pane-ledger">Benchmark results</button>
|
| 237 |
</nav>
|
| 238 |
|
| 239 |
<section class="pane active" id="pane-press">
|
| 240 |
<div class="press-stage">
|
| 241 |
<div class="press-status">
|
| 242 |
+
<span id="press-label">DiffusionGemma's intermediate output at each denoising step</span>
|
| 243 |
<span id="press-step"></span>
|
| 244 |
</div>
|
| 245 |
+
<div class="press-canvas settling" id="press-canvas"><span class="placeholder">Run a passage and watch DiffusionGemma refine all 256 tokens at once — from rough draft to corrected text in a handful of steps. The final step shows what changed, highlighted against the input.</span></div>
|
| 246 |
<div class="press-controls">
|
| 247 |
<button id="press-replay" disabled>replay</button>
|
| 248 |
<input type="range" id="press-slider" min="0" max="0" value="0" step="1" disabled />
|
|
|
|
| 267 |
<div class="columns">
|
| 268 |
<div class="col">
|
| 269 |
<div class="col-head">
|
| 270 |
+
<h2>DiffusionGemma</h2>
|
| 271 |
+
<div class="col-sub"><a href="https://huggingface.co/google/diffusiongemma-26B-A4B-it">26B‑A4B‑it</a> · diffusion: denoises 256 tokens in parallel</div>
|
| 272 |
</div>
|
| 273 |
+
<div class="statline" id="stats-dg"><span class="placeholder">no run yet</span></div>
|
| 274 |
+
<div class="proof" id="proof-dg"><span class="placeholder">Corrected text appears here.</span></div>
|
| 275 |
</div>
|
| 276 |
<div class="col">
|
| 277 |
<div class="col-head">
|
| 278 |
+
<h2>Gemma‑4‑E4B</h2>
|
| 279 |
+
<div class="col-sub"><a href="https://huggingface.co/google/gemma-4-E4B-it">E4B‑it</a> · autoregressive: one token at a time, greedy</div>
|
| 280 |
</div>
|
| 281 |
+
<div class="statline" id="stats-g4"><span class="placeholder">no run yet</span></div>
|
| 282 |
+
<div class="proof" id="proof-g4"><span class="placeholder">Corrected text appears here.</span></div>
|
| 283 |
</div>
|
| 284 |
</div>
|
| 285 |
<div class="legend">
|
|
|
|
| 472 |
renderProofs();
|
| 473 |
pressLoad([], null);
|
| 474 |
$("press-canvas").classList.add("settling");
|
| 475 |
+
$("press-canvas").innerHTML = `<span class="placeholder">A pre‑computed result for this example is in the Side by side tab — press “Correct this text” to run it live and watch the denoising here.</span>`;
|
| 476 |
$("press-stats").innerHTML = ""; $("press-step").textContent = "";
|
| 477 |
}
|
| 478 |
|
|
|
|
| 499 |
switchTab("pane-press");
|
| 500 |
clearInterval(replayTimer);
|
| 501 |
$("press-canvas").classList.add("settling");
|
| 502 |
+
$("press-canvas").innerHTML = `<span class="spinner" style="font-style:italic;color:var(--oxblood)">denoising (the steps will replay here when it finishes)</span>`;
|
| 503 |
$("press-step").textContent = ""; $("press-stats").innerHTML = "";
|
| 504 |
spinner($("proof-dg"), "denoising"); $("stats-dg").innerHTML = "";
|
| 505 |
spinner($("proof-g4"), "queued"); $("stats-g4").innerHTML = "";
|
|
|
|
| 521 |
if (g4.error) showError($("proof-g4"), g4.error);
|
| 522 |
else { lastResults.g4 = g4; stats($("stats-g4"), g4); renderProofs(); }
|
| 523 |
} catch (err) {
|
| 524 |
+
$("press-canvas").innerHTML = `<div class="error-box">Request failed: ${err.message || err}. Try again — the first request after a cold start can time out.</div>`;
|
| 525 |
} finally {
|
| 526 |
btn.disabled = false;
|
| 527 |
}
|