A spiking-neural-network (SNN) toolkit built on snnTorch and PyTorch. Loads MNIST-style and neuromorphic event datasets, encodes them into rate, latency, delta, and random spikes, and trains, validates, exports, and deploys LIF networks — with a live browser dashboard served over WebSockets.
Pre-1.0. Before trusting any number this produces, read Implications and boundaries.
git clone https://github.com/capsize-games/spikeforge.git
cd spikeforge
docker compose up --buildOpen http://localhost:8877 — the dashboard connects to the WebSocket on the same host and port. No separate backend or proxy to run.
Prefer a local install, a headless example, or the CLI tools instead? See
Usage and Quickstart
for every path (./install.sh, local dev with Vite, examples/, and the
eight spikeforge-* console scripts).
- Encoding — rate, latency, delta, and random spike coders.
- Training — fully-connected and convolutional LIF networks with surrogate-gradient cross-entropy, checkpointing, and opt-in AMP / gradient checkpointing / truncated BPTT / multi-GPU.
- Topologies —
fc_legacy,fc_small,conv_net,recurrent_net, plus the sequence presetssequence_mlpandsequence_attn. - Datasets — MNIST, Fashion-MNIST, KMNIST, QMNIST, USPS, EMNIST,
CIFAR-10, and (via the
eventsextra) N-MNIST, DVS128 Gesture, CIFAR10-DVS, and Spiking Speech Commands. - Interpreter spine — NIR export, an independent NIR interpreter, and numerical drift validation.
- Introspection — educational-mode
U[t]/I[t]/S[t]traces, trajectory metrics, and surrogate-derivative curves. - Deployment — a capability matrix, weight quantization, energy
accounting, and executable
reference,norse, andlava_loihi2backends. - Model hub — a curated, offline-first catalog plus optional live Hugging Face search.
- Dashboard — a React + TypeScript UI with training, introspection, analysis, targets, energy, and hub panels, and seven guided walkthroughs.
This repository is a single workspace that publishes four distributions:
| Distribution | Import root | Purpose |
|---|---|---|
spikeforge |
spikeforge |
Core package: encoders, topologies, training, simulator, NIR bridge, tracking |
spikeforge-targets |
spikeforge_targets |
Deployment targets, quantization, energy accounting, sparse event runtime |
spikeforge-hub |
spikeforge_hub |
Curated model hub and optional Hugging Face access |
spikeforge-server |
server |
FastAPI + WebSocket server and dashboard hosting |
This README stays short on purpose.
documentation/ is the full reference — install
paths, the CLI tools, architecture, module layout, and the dev workflow —
written for contributors and coding agents alike. Also see
COOKBOOK.md for copy-pasteable recipes,
examples/ for runnable end-to-end scripts, and
plans/ for design documents and the roadmap.
See CONTRIBUTING.md and rules.md before opening a pull request.
If spikeforge is useful in your research, please cite it — see CITATION.cff (GitHub renders a "Cite this repository" button from it automatically).
Released under the BSD 3-Clause License — see LICENSE and AUTHORS.
