tablinum-loop / README.md
chadstthomas's picture
Initial release of Tablinum-Loop: TBLR v1 34-table hierarchical router (210M passages), EngramBench atom shards, and Mode A/B prototypes
3f51d96 verified
|
Raw History Blame Contribute Delete
3.81 kB
---
license: mit
task_categories:
- question-answering
- text-retrieval
language:
- en
tags:
- tablinum
- tablinum-loop
- engram
- moe
- looped-transformer
- moon-beam
- terrabeam
- research-preview
pretty_name: Tablinum-Loop (Engram Router & Atom Shards for Looped MoE)
---
# Tablinum-Loop (`schema: 2`)
**Tablinum-Loop** is the loop-native companion dataset and routing pack for [Moon-Beam-2-8B-A1B-Research-Preview](https://huggingface.co/tablinum/Moon-Beam-2-8B-A1B-Research-Preview) and [`terrabeam`](https://github.com/chadstthomas-svg/terrabeam), released openly to **foster open-source frontier discovery** in external memory + looped MoE reasoning.
---
## What Is Included
| Artifact | Description | Size |
|---|---|---:|
| `domain_router.bin` | `TBLR` v1 binary hierarchical router (`34` real Tablinum-3 tables × `8` normalized `256`-d centroids) for Rust `engram::router::TableRouter` | `272.4 KB` |
| `domain_router.npz` | NumPy archive of the same `34 × 8 × 256` centroid matrix for Python callers | `274.3 KB` |
| `atoms_engrambench.parquet` | `5,000` distilled atom-then-expand shards (`atom_id`, `pid`, `table`, `title`, `section`, `atom_text`, `parent_text`) built from EngramBench retrieval pools | `2.75 MB` |
| `router_manifest.json` | Table inventory across `209,998,995` indexed Tablinum-3 passages + routing benchmark metrics | — |
| `packs.json` | `schema: 2` pack definitions (`lite` and `all` with hierarchical `top_tables=5`) | — |
| `tablinum_loop_engine.py` | Reference Python implementation (`HierarchicalTableRouter`, `AtomStore`, `TwoStageEngramLoop` Mode A) | — |
| `midband_engram.py` | Reference PyTorch Mode B latent bridge (`MidBandEngramBridge`, zero-init identity for `loopmb.LoopBand`) | — |
| `ARCHITECTURE.md` | Design spec covering Mode A (Two-Stage + Early Exit), Mode B (Latent Bridge), and Rust integration | — |
| `examples/moonbeam2_tablinum_v2.json` | Schema v2 `tablinum.json` manifest for Moon-Beam 2 Research Preview | — |
---
## Real Indexed Coverage & Routing Telemetry
Built directly from **`34` real FAISS IVF-SQ8 tables** spanning **`209,998,995` indexed passages** (`wiki, apps, cdcj, cli, ecfr, eulex, fdalabel, finreg, health, healthp, homerepair, humprim, humref, law, math, oer, papers_bio, papers_eng, papers_fin, papers_hum, papers_humft, papers_sci, philo, psych, scicode, sedev, sefin, sehum, selaw, sestem, sesys, software, uscode, web`):
- **Routing speed:** **`24.9 µs/query`** (`0.1–0.3 ms` to score all `34 × 8` centroids on CPU)
- **Top-5 table recall (`1,000` IVF centroid queries):** **`97.7%`** (`Top-10`: **`99.1%`**)
- **Candidate reduction vs. flat `Pool::Global`:** `306 → 45` candidates (`6.8×` fewer cross-encoder pairs on `M=5` tables)
---
## Quickstart
### Rust (`terrabeam` / `engram` crate)
```rust
use engram::{Engram, Pool, router::TableRouter};
let router = TableRouter::open("domain_router.bin".as_ref())?;
let mut eg = Engram::open(engram_root, &tables, embed_dir, 128, 48)?
.with_router(router);
eg.pool = Pool::hierarchical(48, 5);
let hits = eg.retrieve("Which Finnish club did Kevin Czuczman sign with?", 3, &tables)?;
```
### Python
```python
from tablinum_loop_engine import HierarchicalTableRouter
router = HierarchicalTableRouter.load("domain_router.npz")
top_tables = router.route(query_vec, top_m=5)
```
---
## Links & Attribution
- **Model:** [tablinum/Moon-Beam-2-8B-A1B-Research-Preview](https://huggingface.co/tablinum/Moon-Beam-2-8B-A1B-Research-Preview) · [GGUF + Lite-Beam v2](https://huggingface.co/tablinum/Moon-Beam-2-8B-A1B-GGUF-Research-Preview)
- **Sidecar Runtime:** [chadstthomas-svg/terrabeam](https://github.com/chadstthomas-svg/terrabeam)
- **Full Library:** [tablinum/tablinum-3](https://huggingface.co/datasets/tablinum/tablinum-3)
- **License:** MIT