speed: pre-warm models, reduce defaults, remove GitHub links (X-Frame-Options)
Browse files
experiments/demo_server.py
CHANGED
|
@@ -368,13 +368,13 @@ PAGE = r"""<!doctype html>
|
|
| 368 |
</section>
|
| 369 |
|
| 370 |
<section>
|
| 371 |
-
<div class="sn"><span class="n">02</span><h2 class="serif">The store at scale
|
| 372 |
<p class="lead">The same mechanism at scale: store up to 8,192 pairs in one 133,120-token
|
| 373 |
causal pass, overwrite half of them, then query. Measured recall: 1.0000.</p>
|
| 374 |
<div class="fig">
|
| 375 |
<div class="row">
|
| 376 |
<div class="rangewrap"><label style="margin:0">pairs</label>
|
| 377 |
-
<input id="np" type="range" min="64" max="
|
| 378 |
<div class="rangewrap"><label style="margin:0">filler/pair</label>
|
| 379 |
<input id="fl" type="range" min="0" max="14" value="14"><span class="rv" id="flv">14</span></div>
|
| 380 |
<div class="rangewrap"><label style="margin:0">changed mid-stream</label>
|
|
@@ -394,7 +394,7 @@ PAGE = r"""<!doctype html>
|
|
| 394 |
</section>
|
| 395 |
|
| 396 |
<section>
|
| 397 |
-
<div class="sn"><span class="n">03</span><h2 class="serif">Constant cost while memory grows
|
| 398 |
<p class="lead">Each token touches exactly nine memory cells, so per-token work cannot grow with
|
| 399 |
context. Measure it: the curve below runs the model at increasing stream lengths, live.</p>
|
| 400 |
<div class="fig">
|
|
@@ -406,7 +406,7 @@ PAGE = r"""<!doctype html>
|
|
| 406 |
</section>
|
| 407 |
|
| 408 |
<section>
|
| 409 |
-
<div class="sn"><span class="n">04</span><h2 class="serif">Inside one cell
|
| 410 |
<p class="lead">Where does a value physically live, and where does the <em>new</em> value go on
|
| 411 |
overwrite? Pick one fact from section 01 (or any name/value). The model’s learned address
|
| 412 |
for that key, the 3×3 cells it touches, and the before/after answers — same cells,
|
|
@@ -435,11 +435,11 @@ PAGE = r"""<!doctype html>
|
|
| 435 |
This is a <b>content-addressed associative mixer</b>, not a language model.
|
| 436 |
It stores key→value associations and retrieves them at constant per-token cost.
|
| 437 |
Perfect scores are on the synthetic MQAR distribution (see
|
| 438 |
-
|
| 439 |
Current demo is <b>2D</b> (9-cell neighborhood per token).
|
| 440 |
<b>3D</b> (27 cells) is supported by the kernel math without architectural change —
|
| 441 |
it reduces key density by 1000× and raises the estimated capacity from ~8K to ~495K keys
|
| 442 |
-
(
|
| 443 |
</p>
|
| 444 |
</div>
|
| 445 |
</section>
|
|
@@ -544,7 +544,7 @@ function drawCC(data){const c=$("cc"),x=c.getContext("2d");c.width=c.clientWidth
|
|
| 544 |
x.fillText("stream length (tokens, log scale)",W/2-80,H-2);
|
| 545 |
x.fillText("μs/token (blue, flat = constant) · cells (green) · attention O(T²) (dashed red)",P,16)}
|
| 546 |
$("cost").onclick=async()=>{$("cost").disabled=true;$("cost").textContent="measuring...";
|
| 547 |
-
try{const sizes=[64,256,
|
| 548 |
const d=await api("/api/cost",{sizes});drawCC(d)}catch(e){alert(e)}
|
| 549 |
$("cost").disabled=false;$("cost").textContent="measure the cost curve"};
|
| 550 |
/* section 04 */
|
|
|
|
| 368 |
</section>
|
| 369 |
|
| 370 |
<section>
|
| 371 |
+
<div class="sn"><span class="n">02</span><h2 class="serif">The store at scale ↗</h2></div>
|
| 372 |
<p class="lead">The same mechanism at scale: store up to 8,192 pairs in one 133,120-token
|
| 373 |
causal pass, overwrite half of them, then query. Measured recall: 1.0000.</p>
|
| 374 |
<div class="fig">
|
| 375 |
<div class="row">
|
| 376 |
<div class="rangewrap"><label style="margin:0">pairs</label>
|
| 377 |
+
<input id="np" type="range" min="64" max="2048" step="64" value="128"><span class="rv" id="npv">2048</span></div>
|
| 378 |
<div class="rangewrap"><label style="margin:0">filler/pair</label>
|
| 379 |
<input id="fl" type="range" min="0" max="14" value="14"><span class="rv" id="flv">14</span></div>
|
| 380 |
<div class="rangewrap"><label style="margin:0">changed mid-stream</label>
|
|
|
|
| 394 |
</section>
|
| 395 |
|
| 396 |
<section>
|
| 397 |
+
<div class="sn"><span class="n">03</span><h2 class="serif">Constant cost while memory grows ↗</h2></div>
|
| 398 |
<p class="lead">Each token touches exactly nine memory cells, so per-token work cannot grow with
|
| 399 |
context. Measure it: the curve below runs the model at increasing stream lengths, live.</p>
|
| 400 |
<div class="fig">
|
|
|
|
| 406 |
</section>
|
| 407 |
|
| 408 |
<section>
|
| 409 |
+
<div class="sn"><span class="n">04</span><h2 class="serif">Inside one cell ↗</h2></div>
|
| 410 |
<p class="lead">Where does a value physically live, and where does the <em>new</em> value go on
|
| 411 |
overwrite? Pick one fact from section 01 (or any name/value). The model’s learned address
|
| 412 |
for that key, the 3×3 cells it touches, and the before/after answers — same cells,
|
|
|
|
| 435 |
This is a <b>content-addressed associative mixer</b>, not a language model.
|
| 436 |
It stores key→value associations and retrieves them at constant per-token cost.
|
| 437 |
Perfect scores are on the synthetic MQAR distribution (see
|
| 438 |
+
PAPER.md).<br><br>
|
| 439 |
Current demo is <b>2D</b> (9-cell neighborhood per token).
|
| 440 |
<b>3D</b> (27 cells) is supported by the kernel math without architectural change —
|
| 441 |
it reduces key density by 1000× and raises the estimated capacity from ~8K to ~495K keys
|
| 442 |
+
(details).
|
| 443 |
</p>
|
| 444 |
</div>
|
| 445 |
</section>
|
|
|
|
| 544 |
x.fillText("stream length (tokens, log scale)",W/2-80,H-2);
|
| 545 |
x.fillText("μs/token (blue, flat = constant) · cells (green) · attention O(T²) (dashed red)",P,16)}
|
| 546 |
$("cost").onclick=async()=>{$("cost").disabled=true;$("cost").textContent="measuring...";
|
| 547 |
+
try{const sizes=[64,256,512,1024].map(n=>({n_pairs:n,filler:0}));
|
| 548 |
const d=await api("/api/cost",{sizes});drawCC(d)}catch(e){alert(e)}
|
| 549 |
$("cost").disabled=false;$("cost").textContent="measure the cost curve"};
|
| 550 |
/* section 04 */
|