{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreig45pm6uq2qposllnrs67orft3f7pq44qax4ar2zovdw5mwif2jii",
"uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mnwatpq3t742"
},
"path": "/t/shannon-prime-lattice/176466#post_10",
"publishedAt": "2026-06-10T08:04:02.000Z",
"site": "https://discuss.huggingface.co",
"tags": [
"@32k",
"@N"
],
"textContent": "## 1. What this is NOW\n\nThree things, in order:\n\n 1. **PPT-ARM is the load-bearing product.** A from-scratch transformer\nforward (the 13-step PPT substitution) plus the ARM memory architecture\n(Spinor-KV two-ring recall + offload), on a **discrete substrate** —\nintegers in `Z_q` (two frozen 30-bit Proth primes via CRT), where a\ntoken’s position/index/routing are exact arithmetic, not floating-point\nmetadata. **Bit-exact-when-disabled is the invariant floor; the value is\nthe envelope**: KV compression → long context, Ring-2 offload → context\nbeyond RAM, packed-integer pipes → speed, auditable latent memory.\n\n 2. **XBAR is the current campaign** — the Auditable Latent Crossbar: a\nfrozen **Exec** (gemma-4-12B, OK_Q4B) plus a small **Memo** curator share\nthe cyclotomic rings and communicate through **latent state, not tokens** ,\nevery write receipted, gated, and rewindable. Lanes: XBAR-P (probe /\nphysics), XBAR-C (curator), XBAR-M (modality), XBAR-N (NIGHTSHIFT).\nSpec: `papers/RFC-XBAR-auditable-latent-crossbar.md` (v1.1).\n\n 3. **Position Is Arithmetic is the public face** — the receipts-first paper\nseries and the master claims ledger. Nothing is public without a\n`LEDGER.md` row reproducible from a stated command.\n\n\n\n\nThe decentralized **Lattice** (Fibonacci-Prime DHT, CRT-shard mesh, PoUW\nreceipts network) is the longer arc the same primitives feed — background,\nnot the current work. The deployment ladder for all of it is the **stage\ntaxonomy** (Alpha … Eta, Omicron ο, Holon ⬢⃝) in `papers/PPT-LAT-STATE.md`\n§5.07.\n\n* * *\n\n## 2. The system — four-tier memory hierarchy + XBAR\n\nThe architecture grew from the proven two-ring core (CONTRACT-C2) into a\nfour-tier hierarchy (RFC-XBAR §3/§3.1). Status tags follow the project\nvocabulary: **[PROVEN]** evidence cited · **[WIRED]** built + gated ·\n**[DESIGN]** spec’d, unbuilt · **[TARGET]** a number to measure.\n\n\n ┌────────────────────────── VRAM / RAM (owned arena) ───────────────────────────┐\n │ │\n │ Exec (gemma-4-12B, OK_Q4B) [PROVEN] Memo (small curator) │\n │ causal forward, generates heuristic loop [PROVEN, C1-lite]; │\n │ │ ▲ trained compaction organ [TARGET] │\n │ ▼ write │ attend │ propose ▲ read │\n │ ┌─ Ring 1 ─────┐ ┌─ Ring 2 (hippocampus) ─┐ ▼ │ │\n │ │ working KV │ │ verbatim Spinor KV, │ ┌─ Ring 2′ (shadow) ────────┐ │\n │ │ window+sinks │ │ Optane episodic store │◄─│ proposals, promote-on- │ │\n │ │ [PROVEN] │ │ [PROVEN, qwen3 CPU │ │ accept or REWIND [PROVEN, │ │\n │ └──────────────┘ │ ring; Exec path = P3] │ │ C1-lite] │ │\n │ ▲ └────────────────────────┘ └──────────┬────────────────┘ │\n │ │ recall from BOTH │ promote (gated) │\n │ │ ┌─ Ring 3 (neocortex) ─────────┐◄──────┘ │\n │ └────────────│ adapter pseudo-tokens, │ G-R3-LOSS bounded │\n │ │ consolidated long-term │ (irreversible) [DESIGN] │\n │ └──────────────────────────────┘ │\n │ │\n │ modality lanes — one CRT prime per modality [DESIGN; audio first, │\n │ GNA 2.0 envelope pinned in SW-emu, HW bring-up kit staged] │\n └───────────────────────────────────────────────────────────────────────────────┘\n NIGHTSHIFT [DESIGN, v0 next]: idle-time consolidation — read aging Ring 2\n episodes → adapter compress n→k → propose to Ring 2′ → gate → promote to\n Ring 3. schtasks-owned, banner echoes getenv, every promotion receipted.\n\n\nTier | Substrate | Representation | Biological analogue | Status\n---|---|---|---|---\n**Ring 1** | RAM working window | verbatim KV, full attention | working memory | [PROVEN] — sink+W ring buffer, 910× resident shrink @32k (CONTRACT-C2 §C2.1)\n**Ring 2** | Optane raw episodic store | verbatim Spinor KV blocks | **hippocampus** | [PROVEN] on the qwen3 CPU ring (7.57 µs/read, byte-identical spill/recall); Exec (gemma4-CUDA) wiring = P3, pending\n**Ring 2′** | transient staging shadow | proposals awaiting the gate | (the audit mechanism) | [PROVEN] — C1-lite clone/gate/atomic-promote/rewind, tag `xbar-c1-lite-complete`\n**Ring 3** | Optane consolidated store | P2.b-adapter pseudo-tokens (n→k gist) | **neocortex** | [DESIGN] — under the irreversible-aware G-R3-LOSS gate\n\nBeneath the rings, the substrate everything rides on (all [PROVEN], see\nSTATE §1–§2): the 13-step PPT discrete forward (argmax bit-exact on Qwen3,\nQwen2.5, Gemma3, Gemma4-E2B, Qwen3.6-35B-A3B GDN+MoE) · NTT-CRT dual-prime\npoly-ring attention · Frobenius-lift Q4/Q8 packed arena + the **OK_Q4B**\nper-32-block-scaled format (the 12B GPU vehicle) · Spinor 63-byte KV block\n(0xA5 sentinel, one cache line) · KSTE encoder + `⪯_d` dominance · ±1\nRademacher recall router · PoUW receipt ledger · QUIC dual-prime residue\nmesh (loopback-proven).\n\n* * *\n\n## 3. Measured highlights (each number carries its receipt)\n\nResult | Number | Receipt\n---|---|---\n**Gemma-4-12B on one RTX 2060 12GB** | **26.1 tok/s @ wikitext PPL 5.12** (24/24 gates, CUDA-graph path EXACT 256/256, dp4a top-1 256/256); llama.cpp on the same card: 31.29 tok/s @ PPL **192–506** (broken artifacts); SP engine bandwidth 245 vs 207 GB/s (+18%) | public LEDGER **06-R10** · `CONTRACT-SPEED` · receipts `tests/gemma4_gold/`\n**The gemma-4 GGUF ecosystem ships broken weights** | hand-written gold reference forward = TRUE PPL **4.6776** ; every GGUF (incl. post-fix rebuilds) 192–506; llama.cpp’s _forward_ exonerated, the _artifacts_ convicted | LEDGER 06-R8 · `CONTRACT-SPEED` gold-instrument addendum · community fix `GEMMA4-QUANT-FIX.md` (public repo)\n**X-R1 — latent crossbar physics** | a 12B’s generation steered by **direct KV-cache transplant, no tokens** : 15/15 lexical incorporation (5×3 matrix), 15/15 selectivity (double dissociation), max 3.69-orders rank pull, measured dose-response, G0 null bit-identical | public LEDGER **X-R1** · `CONTRACT-XBAR-P1`\n**KV sparsification** | **8× at +0.69% PPL** (2×/4× go negative), NIAH 6/6 at ≤8× @N=2k, Möbius-pinned sinks | `CONTRACT-C2` §C2.1 G2 · paper 01\n**Resident KV shrink** | **910× @32k** (7.5 GB → 8.3 MB Ring-1), needle served off physical Optane at **7.57 µs/read** , bit-exact when off | `CONTRACT-C2` §C2.1 · paper 01\n**Reducing loader** | GGUF → `.sp-model` **~50% smaller** , zero-copy, bit-faithful forward, 6/6 E_FMT | paper 02 (`EXPECTED.md`)\n**C1-lite curator** | full propose→gate→promote/rewind loop on real recall: replay null 34/34, cold-evict 45/45 (lossless promotes, lossy rewinds) | `CONTRACT-XBAR-C1-lite` · tag `xbar-c1-lite-complete`\n**The honest 32k MISS** | the composed 32k Optane finale **completed and MISSed the needle** at the 64× selection budget (config regression + budget regime; infrastructure proven at 16.3 h / 16.6 TB scale) — kept on the record; Ring 3 is the architectural answer | STATE §5.11 · `CONTRACT-C2` §C2.4-CLOSURE\n\nHonest negatives stay attached on purpose (the 32k MISS, the falsified KSTE\nrecall router, the retired 34.2 tok/s headline whose artifact failed the PPL\ngate): they prove the gates discriminate. In-flight work (the P2.b capacity\narm) is **not** claimed here — no number lands before its run record.\n\n* * *\n\n## 4. Doc map — which file answers which question\n\nQuestion | Read\n---|---\nI’m an agent starting a session — how do I bootstrap? | `prompt.md` (then follow its procedure)\nWhat is PROVEN, with what evidence? | `papers/PPT-LAT-STATE.md` — **the proven ledger; trust it, build on it**\nWhat’s the current architecture (rings, XBAR, NIGHTSHIFT)? | `papers/RFC-XBAR-auditable-latent-crossbar.md`\nWhat’s the phase structure / forward plan? | `papers/PPT-LAT-Roadmap.md` — read its **AGENT NAVIGATION box** first; the 8,500-line body is largely historical\nWhat are the forward specs + run records per lane? | `papers/CONTRACT-*.md` (C1/C2/SPEED/XBAR-P1/P2/P2b/C1-lite) — contracts carry the gates and the run records\nWhat’s the math? | `papers/PPT-LAT-Theory.md` (13-step PPT, O_K, `⪯_d`, CRT-NTT, frozen Spinor/KSTE formats) — read before touching the substrate\nThe systems narrative / six-layer architecture? | `papers/PPT-LAT-Systems-v1.md` (supersedes v0 + the two standalone specs, now its Appendices A/B)\nThe frozen ABI / on-disk format? | `papers/PPT-LAT-L1-ABI-v0.md` + `papers/PPT-LAT-SP-MODEL-v0.md` (frozen), live header `shannon-prime-system/include/sp/sp_l1.h`\nWhat did a given sprint ship? | `papers/SESSION-CLOSED-*.md` (audit trail)\nHow does the cloud training loop work? | `papers/RUNBOOK-cloud-compute.md`\nThe public claims + reproduce commands? | `Position_Is_Arithmetic/LEDGER.md` + `METHODOLOGY.md`\n\nSupersession order when documents disagree: **STATE > contract run records >\nRoadmap amendments > Roadmap body**. The papers are scaffolding, not\nartifacts — amendable when reality contradicts them — except the L1 ABI and\n`.sp-model` specs, which are frozen.\n\n* * *\n\n## 5. Methodology (why the numbers are believable)\n\n 1. **Bit-exact when off.** Every mechanism is a flag, a strict no-op by\ndefault; the baseline is provably the unmodified model. On-state results\nare controlled deltas.\n 2. **No number without a command.** Nothing enters a paper, README, or\nledger unless it reproduces from a stated command (model, corpus, flags,\ngate, commit).\n 3. **Scope travels with the number.** Every figure carries its model, ctx,\ncorpus, and what it does NOT generalize to.\n 4. **No silent gate revisions.** If the implementation can’t meet a spec’d\ngate, surface upstream and amend the contract formally — never retune\nfixtures, retreat to a weaker claim, or footnote a PASS.\n 5. **Falsification pre-stated.** The kill condition is written before the\nrun; first run is telemetry, the gate is pinned after.\n 6. **Honest negatives stay.** Misses, falsified designs, and retired\nheadlines remain on the record with their receipts.\n\n\n\nStanding gates: **parity** (on-vs-off argmax identity), **deflection** (PPL\nvs full-attention baseline, <2%), **poison** (NaN-evict on offload so silent\nfallback fails loudly).\n\n* * *\n\n## 6. NIGHTSHIFT and the latent-space direction\n\n**NIGHTSHIFT** (RFC-XBAR §7) is the idle-time consolidation loop — the\nOptane subconscious. The substrate is already proven (byte-exact Ring-2\nspill/recall, 16.3 h unattended saturation, receipts end to end); NIGHTSHIFT\nadds episode persistence (a named `{K store, V store, manifest}` file set\nthat survives sessions), the offline consolidation pass (Memo walks an\nepisode non-causally: heuristic select/merge/evict in v0, P2.b-adapter n→k\nspan compression into Ring 3 in v1, always promote-on-accept), and the\noperational discipline (OS-owned runs, getenv-echo banners). The\nassociation-strength signal already exists — the measured LRU temporal-\nlocality telemetry. Status: [DESIGN], v0 next; episode bound ≤8k tokens\nuntil the B∝N recall-budget question is answered (the C2.4 lesson).\n\n**The latent-space direction.** XBAR’s premise is that inter-model memory\nshould be a thing with receipts: a block of internal state provably\nwell-formed (Spinor 0xA5 sentinel + Frobenius-lift bit-identity), every\nwrite gated through a shadow ring, promoted or rewound, auditable end to\nend. The discrete substrate detects _invalid_ blocks; it cannot detect\n_semantically-wrong-but-valid_ ones — which is why the coherence gate is\nload-bearing on every promotion, forever (RFC §4). The same structure is,\nincidentally, a defensive research direction the field lacks: deployed AI\nsafety scans text while cognition happens in latent space, and a substrate\nthat makes latent state verifiable and gated is a small proof that the\nlatent layer doesn’t have to be an unmonitored canvas (RFC §6.2). Recorded\nas motivation, not a project pivot.\n\n* * *\n\n## 7. Getting started\n\n\n git clone https://github.com/nihilistau/shannon-prime-lattice.git\n git clone https://github.com/nihilistau/shannon-prime-system.git\n git clone --recurse-submodules https://github.com/nihilistau/shannon-prime-system-engine.git\n\n\nThe engine bundles `shannon-prime-system` as a submodule under\n`lib/shannon-prime-system/` — that pin is what every engine build uses (and\nthe standalone math-core clone can sit behind it: `git fetch` + behind-check\nbefore building or committing).\n\n * **Run a model locally:** `shannon-prime-system-engine/README.md` — build,\ntranscode (`sp_transcode`; use `--st` Safetensors-Direct for gemma-4),\n`curl` the daemon.\n * **Understand the math:** `papers/PPT-LAT-Theory.md` →\n`papers/PPT-LAT-Systems-v1.md` → `papers/PPT-LAT-Roadmap.md`.\n * **Write a kernel against the frozen ABI:** `papers/PPT-LAT-L1-ABI-v0.md`\nthen `shannon-prime-system/include/sp/sp_l1.h`.\n * **Add a model family:** `papers/PPT-LAT-SP-MODEL-v0.md` +\n`shannon-prime-system-engine/tools/sp_transcode/`.\n\n\n\n* * *\n\n## 8. Repository layout\n\n\n shannon-prime-lattice/\n ├── papers/ # the project's papers — the source of truth\n │ ├── PPT-LAT-STATE.md # THE PROVEN LEDGER (read first)\n │ ├── PPT-LAT-Theory.md # math foundations + 13-step PPT substitution\n │ ├── PPT-LAT-Systems-v1.md # canonical systems narrative\n │ ├── PPT-LAT-Roadmap.md # phases (living; nav box at top, body historical)\n │ ├── RFC-XBAR-*.md # the current campaign's architecture\n │ ├── RFC-001 / CONTRACT-*.md # north-star + forward specs with run records\n │ ├── RUNBOOK-cloud-compute.md # cloud training mechanism\n │ ├── PPT-LAT-L1-ABI-v0 / -SP-MODEL-v0.md # frozen specs\n │ └── SESSION-CLOSED-*.md # per-sprint closure notes (audit trail)\n ├── tests/ # integration receipts (e.g. gemma4_gold/)\n ├── tools/ # lattice-scope tools (curator, xbar_p2b)\n ├── scripts/ # cross-repo helpers (m0_real SFT, render)\n ├── docs/superpowers/ # historical per-phase plan documents\n ├── frontends/ # HTML mock-ups (daemon UI concepts)\n ├── demos/ # phase demos\n └── prompt.md # session bootstrap (agents start here)\n\n\n* * *\n\n## 9. Hard rules\n\nBinding for any session that picks up the project:\n\n * **Anti-contamination.** Do NOT read, copy, or vendor code from the\narchived `shannon-prime/` or `shannon-prime-engine/` repos. The math\npapers under `papers/PPT-ARM/` are conceptual reference — theory only,\nnever code. The lattice is a clean rebuild.\n * **No silent gate revisions.** Surface upstream; amendments land formally\nwith rationale, never as footnotes on a PASS.\n * **Honest closure notes.** Every closure enumerates gates, actual results,\nwhat was bundled vs isolated, and deltas vs spec.\n * **One math object.** Features must touch a distinguishing primitive\n(§2’s substrate list / the ten heterogeneous-SoC CRT tricks); otherwise\nthey are drift.\n * **Terminology is load-bearing.** Lattice · `⪯_d` · KSTE · ARM · CRT-NTT ·\nSpinor block · Frobenius lift · OK_Q4B · Exec / Memo / Ring 1/2/2′/3 ·\nXBAR lanes P/C/M/N · NIGHTSHIFT · stage taxonomy (Alpha…Eta, Omicron ο,\nHolon ⬢⃝). Don’t invent new names or collapse two into one.\n * **Worktrees per concurrent agent.** 2+ agents on one repo → each in its\nown `git worktree add`.\n\n\n\n* * *\n\nThis is a living, changing project. Things that are done are done. Things that are not are not. I am not making and claims - Despite the loaded language this is a grounded, bottom up approach to creating a personal system. Everything is performed step by step and guarded by contracts, the ledger and the testing methods. Great pains are made to test everything thouroughly. This is as much about the process and using the new advanced tools we have available to us now. It is being done in public so that anyone who finds it useful or facinating can ride along.\n\n* * *\n\n_Don’t trust machine’s they’re just like us!_",
"title": "Shannon Prime Lattice"
}