SPIRA v2: entropy-patch tokenization + hierarchical dopamine-gated spiking cortex + hippocampal one-shot memory with replay consolidation
032a961 verified |
Download web/README.md from thefinalboss/SPIRA: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/thefinalboss/SPIRA/resolve/main/web/README.md
- Command line
-
hf download hf://thefinalboss/SPIRA/web/README.md
-
curl -L -o README.md https://huggingface.co/thefinalboss/SPIRA/resolve/main/web/README.md
1.57 kB
SPIRA β web demo (Next.js)
Interactive browser demo of the SPIRA architecture. No backend required β the full v2 model runs client-side:
src/lib/spira/β TypeScript port of the Python prototype: same FNV-1a-64 / splitmix64 / mulberry32 specs, reservoir regenerated from the same seed, and the hierarchical slow area (windowed spike volleys, variance-matched top-down fusion with the learned gain Ξ²). Loadspublic/spira_deploy.json(~29 MB, format v2, exported bypython -m spira.export_deploy).src/components/spira/β four tabs:- Tokenizer β live entropy-patch segmentation with surprisal bars
- Generate β closed-loop generation from the hierarchical spiking cortex
- One-shot memory β teach any text in a single pass + recall with 0β3 corrupted context slots (CA3-style completion)
- Brain activity β spike-raster playback of the recorded reservoir
Run
npm install # or: bun install
npm run dev # http://localhost:3000
Build for production: npm run build && npm start.
Regenerating the deploy artifact
cd ../python
python3 -m spira.export_deploy --model artifacts/spira_model.npz \
--out ../web/public/spira_deploy.json --am-cap 100000 --am-min-count 1
The spike raster (public/spira_raster.json) is exported from
artifacts/spira_model.npz.raster.npz recorded during training.
Hippocampal replay (consolidation) is a Python-side capability β see
../python/README.md; the browser demo keeps the one-pass teach + recall loop.