branding: paper title, neutral wording, no personal names in defaults
Browse files- experiments/demo_server.py +20 -20
experiments/demo_server.py
CHANGED
|
@@ -117,7 +117,7 @@ def run_cost(sizes: list) -> list:
|
|
| 117 |
@torch.no_grad()
|
| 118 |
def run_custom(doc_text: str, pairs: list, seed: int) -> dict:
|
| 119 |
"""Stream the USER's own text with the USER's own named key->value pairs,
|
| 120 |
-
some
|
| 121 |
the model's token space (shown in the response); the model only ever sees
|
| 122 |
ids -- exactly the MQAR regime it was trained on."""
|
| 123 |
from mulattice.protocol import logits_at
|
|
@@ -265,7 +265,7 @@ def run_cellview(name: str, value: str, new_value: str, seed: int) -> dict:
|
|
| 265 |
PAGE = r"""<!doctype html>
|
| 266 |
<html lang="en"><head><meta charset="utf-8">
|
| 267 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
| 268 |
-
<title>μLattice
|
| 269 |
<style>
|
| 270 |
:root{--ink:#1c1e26;--mut:#6b7280;--hair:#e5e7eb;--bg:#fcfcfa;--card:#ffffff;
|
| 271 |
--acc:#2547d0;--ok:#0e8a5f;--bad:#c2413b;--upd:#b07807;--soft:#f4f4f0}
|
|
@@ -325,21 +325,22 @@ PAGE = r"""<!doctype html>
|
|
| 325 |
</style></head><body>
|
| 326 |
|
| 327 |
<header>
|
| 328 |
-
<div class="kicker">Tensorbend Research ·
|
| 329 |
<h1 class="serif">μLattice: the growing memory, running</h1>
|
| 330 |
-
<p class="dek serif">A
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
|
|
|
|
|
|
| 334 |
</header>
|
| 335 |
<main>
|
| 336 |
|
| 337 |
<section>
|
| 338 |
<div class="sn"><span class="n">01</span><h2 class="serif">Stream your own document</h2></div>
|
| 339 |
-
<p class="lead">Paste any text. Define
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
<em>latest</em> value — last write wins.</p>
|
| 343 |
<div class="fig">
|
| 344 |
<div class="grid2">
|
| 345 |
<div>
|
|
@@ -363,16 +364,15 @@ PAGE = r"""<!doctype html>
|
|
| 363 |
|
| 364 |
<section>
|
| 365 |
<div class="sn"><span class="n">02</span><h2 class="serif">The store at scale</h2></div>
|
| 366 |
-
<p class="lead">The same mechanism
|
| 367 |
-
half of them
|
| 368 |
-
own learned addresses — distinct keys spread, exactly as the design intends.</p>
|
| 369 |
<div class="fig">
|
| 370 |
<div class="row">
|
| 371 |
<div class="rangewrap"><label style="margin:0">pairs</label>
|
| 372 |
<input id="np" type="range" min="64" max="8192" step="64" value="2048"><span class="rv" id="npv">2048</span></div>
|
| 373 |
<div class="rangewrap"><label style="margin:0">filler/pair</label>
|
| 374 |
<input id="fl" type="range" min="0" max="14" value="14"><span class="rv" id="flv">14</span></div>
|
| 375 |
-
<div class="rangewrap"><label style="margin:0">
|
| 376 |
<input id="ow" type="range" min="0" max="50" value="50"><span class="rv" id="owv">50%</span></div>
|
| 377 |
<button class="sec" id="run" style="margin-top:0">stream & query</button>
|
| 378 |
</div>
|
|
@@ -383,7 +383,7 @@ PAGE = r"""<!doctype html>
|
|
| 383 |
<table id="qr"></table></div>
|
| 384 |
</div>
|
| 385 |
<div class="figcap">Left: learned addresses of 400 stored keys from this run (grid scale shown).
|
| 386 |
-
Right: 64 sampled queries; gold rows marked <span class="pill">
|
| 387 |
re-written later in the stream — the store must answer with the new value.</div>
|
| 388 |
</div>
|
| 389 |
</section>
|
|
@@ -439,7 +439,7 @@ function stats(el,d){el.style.display="grid";
|
|
| 439 |
el.innerHTML=s.map(x=>`<div class="stat"><b>${x[1]}</b><span>${x[0]}</span></div>`).join("")}
|
| 440 |
/* section 01 */
|
| 441 |
const DEF=[["the vault password","swordfish","bluedragon"],
|
| 442 |
-
["
|
| 443 |
["the meeting time","3pm","4pm"],["the favorite meal","stew",""]];
|
| 444 |
function prow(n,v,nv){const d=document.createElement("div");d.className="prow";
|
| 445 |
d.innerHTML=`<input placeholder="name" value="${esc(n)}">
|
|
@@ -465,7 +465,7 @@ $("runc").onclick=async()=>{$("runc").disabled=true;$("runc").textContent="readi
|
|
| 465 |
<td>${r.updated?`<span class="pill">was ${esc(r.old)}</span>`:""}${r.ok?"":" ✗"}</td></tr>`).join("");
|
| 466 |
$("cres").style.display="block";
|
| 467 |
$("ccap").innerHTML=`${d.n_pairs} of your facts stored in ${d.T.toLocaleString()} tokens of your text`+
|
| 468 |
-
(d.n_upd?`, ${d.n_upd}
|
| 469 |
` · key ids: `+Object.entries(d.keymap).slice(0,4).map(([n,k])=>`${esc(n)}=${k}`).join(", ")+`…`;
|
| 470 |
}catch(e){alert(e)}$("runc").disabled=false;$("runc").textContent="Read, store, overwrite — and answer"};
|
| 471 |
/* section 02 */
|
|
@@ -485,10 +485,10 @@ $("run").onclick=async()=>{$("run").disabled=true;$("run").textContent="streamin
|
|
| 485 |
overwrite_frac:+$("ow").value/100,seed:(Math.random()*1e6)|0});
|
| 486 |
$("meta").textContent=`capacity8k.pt · scale ${d.scale} · ${d.params.toLocaleString()} params · ${d.device} · run ${d.ts}`;
|
| 487 |
stats($("st"),d);drawLatt(d.addr_points,d.scale);
|
| 488 |
-
$("qr").innerHTML=`<tr><th>
|
| 489 |
d.rows.map(r=>`<tr><td>${r.key}</td><td class="${r.ok?"y":"n"}">${r.pred}</td>`+
|
| 490 |
`<td class="${r.updated?"updv":""}">${r.gold}</td>`+
|
| 491 |
-
`<td>${r.updated?'<span class="pill">
|
| 492 |
}catch(e){alert(e)}$("run").disabled=false;$("run").textContent="stream & query"};
|
| 493 |
/* section 03 */
|
| 494 |
function drawCC(data){const c=$("cc"),x=c.getContext("2d");c.width=c.clientWidth*2;c.height=600;
|
|
|
|
| 117 |
@torch.no_grad()
|
| 118 |
def run_custom(doc_text: str, pairs: list, seed: int) -> dict:
|
| 119 |
"""Stream the USER's own text with the USER's own named key->value pairs,
|
| 120 |
+
some changed mid-stream mid-stream, then query. Names map deterministically into
|
| 121 |
the model's token space (shown in the response); the model only ever sees
|
| 122 |
ids -- exactly the MQAR regime it was trained on."""
|
| 123 |
from mulattice.protocol import logits_at
|
|
|
|
| 265 |
PAGE = r"""<!doctype html>
|
| 266 |
<html lang="en"><head><meta charset="utf-8">
|
| 267 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
| 268 |
+
<title>μLattice: Breaking the Quadratic Memory Barrier in AI</title>
|
| 269 |
<style>
|
| 270 |
:root{--ink:#1c1e26;--mut:#6b7280;--hair:#e5e7eb;--bg:#fcfcfa;--card:#ffffff;
|
| 271 |
--acc:#2547d0;--ok:#0e8a5f;--bad:#c2413b;--upd:#b07807;--soft:#f4f4f0}
|
|
|
|
| 325 |
</style></head><body>
|
| 326 |
|
| 327 |
<header>
|
| 328 |
+
<div class="kicker">Tensorbend Research · October 2026 · live proof · real weights</div>
|
| 329 |
<h1 class="serif">μLattice: the growing memory, running</h1>
|
| 330 |
+
<p class="dek serif">A sequence mixer with dynamically allocated memory. Each token reads and writes
|
| 331 |
+
exactly 9 cells on a 2D lattice; memory grows with content while per-token cost
|
| 332 |
+
stays constant. Measured: recall of 1.0000 at 8,192 pairs; 0.9980 on overwrite
|
| 333 |
+
queries; 1.0000 on real-text retrieval at 259K tokens. This page runs three
|
| 334 |
+
trained checkpoints. Every number is a live forward pass.</p>
|
| 335 |
+
<div class="meta" id="meta">Tensorbend Research · Eric E. · October 2026</div>
|
| 336 |
</header>
|
| 337 |
<main>
|
| 338 |
|
| 339 |
<section>
|
| 340 |
<div class="sn"><span class="n">01</span><h2 class="serif">Stream your own document</h2></div>
|
| 341 |
+
<p class="lead">Paste any text. Define facts as <em>name → value</em> pairs. Mark any to be
|
| 342 |
+
<strong>changed mid-stream mid-stream</strong>. The model reads the stream, stores the facts,
|
| 343 |
+
and returns the <em>latest</em> value for each.</p>
|
|
|
|
| 344 |
<div class="fig">
|
| 345 |
<div class="grid2">
|
| 346 |
<div>
|
|
|
|
| 364 |
|
| 365 |
<section>
|
| 366 |
<div class="sn"><span class="n">02</span><h2 class="serif">The store at scale</h2></div>
|
| 367 |
+
<p class="lead">The same mechanism at scale: store up to 8,192 pairs in one 133,120-token
|
| 368 |
+
causal pass, overwrite half of them, then query. Measured recall: 1.0000.</p>
|
|
|
|
| 369 |
<div class="fig">
|
| 370 |
<div class="row">
|
| 371 |
<div class="rangewrap"><label style="margin:0">pairs</label>
|
| 372 |
<input id="np" type="range" min="64" max="8192" step="64" value="2048"><span class="rv" id="npv">2048</span></div>
|
| 373 |
<div class="rangewrap"><label style="margin:0">filler/pair</label>
|
| 374 |
<input id="fl" type="range" min="0" max="14" value="14"><span class="rv" id="flv">14</span></div>
|
| 375 |
+
<div class="rangewrap"><label style="margin:0">changed mid-stream</label>
|
| 376 |
<input id="ow" type="range" min="0" max="50" value="50"><span class="rv" id="owv">50%</span></div>
|
| 377 |
<button class="sec" id="run" style="margin-top:0">stream & query</button>
|
| 378 |
</div>
|
|
|
|
| 383 |
<table id="qr"></table></div>
|
| 384 |
</div>
|
| 385 |
<div class="figcap">Left: learned addresses of 400 stored keys from this run (grid scale shown).
|
| 386 |
+
Right: 64 sampled queries; gold rows marked <span class="pill">changed mid-stream</span> were
|
| 387 |
re-written later in the stream — the store must answer with the new value.</div>
|
| 388 |
</div>
|
| 389 |
</section>
|
|
|
|
| 439 |
el.innerHTML=s.map(x=>`<div class="stat"><b>${x[1]}</b><span>${x[0]}</span></div>`).join("")}
|
| 440 |
/* section 01 */
|
| 441 |
const DEF=[["the vault password","swordfish","bluedragon"],
|
| 442 |
+
["the project name","Tensorbend",""],["the car's color","red",""],
|
| 443 |
["the meeting time","3pm","4pm"],["the favorite meal","stew",""]];
|
| 444 |
function prow(n,v,nv){const d=document.createElement("div");d.className="prow";
|
| 445 |
d.innerHTML=`<input placeholder="name" value="${esc(n)}">
|
|
|
|
| 465 |
<td>${r.updated?`<span class="pill">was ${esc(r.old)}</span>`:""}${r.ok?"":" ✗"}</td></tr>`).join("");
|
| 466 |
$("cres").style.display="block";
|
| 467 |
$("ccap").innerHTML=`${d.n_pairs} of your facts stored in ${d.T.toLocaleString()} tokens of your text`+
|
| 468 |
+
(d.n_upd?`, ${d.n_upd} changed mid-stream mid-stream`:"")+` · recall <b>${d.acc}</b> · ${d.us_per_token} μs/token`+
|
| 469 |
` · key ids: `+Object.entries(d.keymap).slice(0,4).map(([n,k])=>`${esc(n)}=${k}`).join(", ")+`…`;
|
| 470 |
}catch(e){alert(e)}$("runc").disabled=false;$("runc").textContent="Read, store, overwrite — and answer"};
|
| 471 |
/* section 02 */
|
|
|
|
| 485 |
overwrite_frac:+$("ow").value/100,seed:(Math.random()*1e6)|0});
|
| 486 |
$("meta").textContent=`capacity8k.pt · scale ${d.scale} · ${d.params.toLocaleString()} params · ${d.device} · run ${d.ts}`;
|
| 487 |
stats($("st"),d);drawLatt(d.addr_points,d.scale);
|
| 488 |
+
$("qr").innerHTML=`<tr><th>key</th><th>model output</th><th>expected</th><th></th></tr>`+
|
| 489 |
d.rows.map(r=>`<tr><td>${r.key}</td><td class="${r.ok?"y":"n"}">${r.pred}</td>`+
|
| 490 |
`<td class="${r.updated?"updv":""}">${r.gold}</td>`+
|
| 491 |
+
`<td>${r.updated?'<span class="pill">changed mid-stream</span>':""}${r.ok?"":" ✗"}</td></tr>`).join("");
|
| 492 |
}catch(e){alert(e)}$("run").disabled=false;$("run").textContent="stream & query"};
|
| 493 |
/* section 03 */
|
| 494 |
function drawCC(data){const c=$("cc"),x=c.getContext("2d");c.width=c.clientWidth*2;c.height=600;
|