How mizup0905/neuromorphicai works
Neuromorphic AI is an experimental sequence-modeling repository centered on a C4 language-model workflow: obtain and tokenize C4 data, optionally prepare gate caches, train or evaluate LRP-SSM models, and inspect comparisons. Its model combines a low-rank path state-space core with routing; an SNN simulator provides spiking-neuron behavior. Separate experiment tooling compares LRP-SSM with attention and recurrent baselines, while calibration and router distillation support alternative gate-generation workflows. The tree and excerpts establish the core model and data responsibilities; some script internals were not sampled, so their connections are limited to indexed references or README documentation.
Main entry points: c4_lrp_lm.py C4 LRP Language Model · c4_build_cache.py Cache Builder · c4_train.py C4 Trainer · c4_eval.py C4 Evaluation
Components 19
C4 Data
- C4 Token Blocks
src/lm/c4_data.py - Cache Builder
scripts/c4_build_cache.py - Token and Gate Cache
- C4 Trainer
scripts/c4_train.py - C4 Evaluation
scripts/c4_eval.py
Sequence Model
- C4 LRP Language Model
src/lm/c4_lrp_lm.py - Low-Rank Path SSM
src/lrp_ssm/low_rank_path_ssm.py - Pyramidal Neuron Simulator
src/snn/pyramidal_neuron.py
Routing
- Router Calibration
experiments/fix_lrp_router_calibration.py - Router Distillation
scripts/c4_distill_router.py - Learned and Lightweight Routers
src/lm/c4_lrp_lm.py
Experiments
- Baseline Comparison
experiments/compare_all.py - Experiment Cache Data
experiments/data.py - Baseline Models
experiments/models.py - Single-Model Training
experiments/train_one.py - Experiment Reports
experiments/report.py - C4 Benchmark
scripts/c4_benchmark.py
Other components
- Researcher
- C4 Dataset
Connections 24
- C4 Dataset → C4 Token Blocks: provides text
src/lm/c4_data.py - Researcher → Cache Builder: builds caches
README.md - Cache Builder → C4 Token Blocks: tokenizes with
scripts/c4_build_cache.py - Cache Builder → Token and Gate Cache: writes caches
scripts/c4_build_cache.py - Researcher → C4 Trainer: trains model
README.md - C4 Trainer → Token and Gate Cache: loads caches
scripts/c4_train.py - C4 Trainer → C4 LRP Language Model: trains
scripts/c4_train.py - C4 LRP Language Model → Low-Rank Path SSM: runs sequence core
src/lm/c4_lrp_lm.py - Low-Rank Path SSM → Pyramidal Neuron Simulator: uses simulator
src/lrp_ssm/low_rank_path_ssm.py - C4 LRP Language Model → Learned and Lightweight Routers: uses routing
src/lm/c4_lrp_lm.py - Researcher → C4 Evaluation: evaluates
README.md - C4 Evaluation → Token and Gate Cache: loads caches
scripts/c4_eval.py - C4 Evaluation → C4 LRP Language Model: evaluates
scripts/c4_eval.py - Researcher → Router Calibration: calibrates gates
README.md - Router Calibration → Low-Rank Path SSM: calibrates router
experiments/fix_lrp_router_calibration.py - Researcher → Router Distillation: distills router
- Router Distillation → Learned and Lightweight Routers: trains lightweight router
scripts/c4_distill_router.py - Researcher → Baseline Comparison: compares models
README.md - Baseline Comparison → Single-Model Training: runs training
experiments/compare_all.py - Single-Model Training → Experiment Cache Data: loads cache data
experiments/train_one.py - Single-Model Training → Baseline Models: builds model
experiments/train_one.py - Baseline Models → C4 LRP Language Model: wraps LRP model
experiments/models.py - Baseline Comparison → C4 Benchmark: optionally benchmarks
experiments/compare_all.py - Researcher → Experiment Reports: generates report
experiments/report.py