Ex0bit commited on
Commit
5bc2e00
·
verified ·
1 Parent(s): 303f41f

speed: pre-warm models, reduce defaults, remove GitHub links (X-Frame-Options)

Browse files
Files changed (1) hide show
  1. experiments/demo_server.py +7 -7
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 <a href="https://github.com/eelbaz/mLattice/blob/main/PAPER.md#42-results" style="font-size:14px;color:#2547d0;text-decoration:none">&nearr;</a></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="8192" step="64" value="2048"><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,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 <a href="https://github.com/eelbaz/mLattice/blob/main/PAPER.md#43-cost-measurements-head-to-head-with-attention" style="font-size:14px;color:#2547d0;text-decoration:none">&nearr;</a></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,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 <a href="https://github.com/eelbaz/mLattice/blob/main/PAPER.md#31-architecture" style="font-size:14px;color:#2547d0;text-decoration:none">&nearr;</a></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&rsquo;s learned address
412
  for that key, the 3&times;3 cells it touches, and the before/after answers &mdash; 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
- <a href="https://github.com/eelbaz/mLattice/blob/main/PAPER.md" style="color:#2547d0">PAPER.md</a>).<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&times; and raises the estimated capacity from ~8K to ~495K keys
442
- (<a href="https://github.com/eelbaz/mLattice/blob/main/PAPER.md#47-address-space-scaling-3d-analysis" style="color:#2547d0">details</a>).
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("&mu;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,1024,2048,4096,8192].map(n=>({n_pairs:n,filler:14}));
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 &nearr;</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 &nearr;</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 &nearr;</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&rsquo;s learned address
412
  for that key, the 3&times;3 cells it touches, and the before/after answers &mdash; 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&times; 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("&mu;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 */