GitPedia

Spikingjelly

SpikingJelly is an open-source deep learning framework for Spiking Neural Network (SNN) based on PyTorch.

From fangwei123456·Updated June 28, 2026·View on GitHub·

- [Why SpikingJelly](#why-spikingjelly) - [Installation](#installation) - [Quick Start](#quick-start) - [Core Capabilities](#core-capabilities) - [Backend Performance](#backend-performance) - [Large-Scale SNN Systems](#large-scale-snn-systems) - [Datasets](#datasets) - [Interchange and Deployment](#interchange-and-deployment) - [Project Status and Version Notes](#project-status-and-version-notes) - [Acknowledgement](#acknowledgement) - [Contributing](#contributing) - [Citation](#citation) The project is written primarily in Python, distributed under the Other license, first published in 2019. It has gained significant community traction with 2,052 stars and 313 forks on GitHub. Key topics include: deep-learning, dvs, machine-learning, pytorch, snn.

SpikingJelly

中文 | English

PyPI
Python
Docs
GitHub contributors
repo size
Visitors

SpikingJelly demo

Contents

Why SpikingJelly

SpikingJelly is a PyTorch-native framework for spiking neural networks (SNNs), with support for large-scale SNN training and inference.

  • Beginner-friendly API
  • ANN2SNN conversion
  • Event-based datasets
  • Acceleration backends: torch, cupy, triton
  • Memory-efficient training, distributed execution, precision control
  • Hardware deployment and framework exchange

Installation

SpikingJelly is built on PyTorch. Install PyTorch, torchvision, and torchaudio first.

  • Python >=3.11
  • PyTorch >=2.6.0 (tested with 2.7.1)

Install the latest stable release 0.0.0.0.15:

bash
pip install spikingjelly

Install the latest development version from source:

bash
git clone https://github.com/fangwei123456/spikingjelly.git cd spikingjelly pip install .

Optional dependencies:

FeatureInstall
CuPy backendpip install cupy-cuda12x or pip install cupy-cuda11x
Triton backendpip install triton==3.3.1
NIR exchangepip install nir nirtorch
Lightning integrationpip install lightning jsonargparse[signatures]

Version note: SpikingJelly uses a 0.0.0.0.X scheme where odd X tracks development versions and even X tracks stable releases.

Quick Start

Define an SNN in the same way that you would define any PyTorch model:

python
from torch import nn from spikingjelly.activation_based import layer, neuron, surrogate net = nn.Sequential( layer.Flatten(), layer.Linear(28 * 28, 10, bias=False), neuron.LIFNode(tau=2.0, surrogate_function=surrogate.ATan()) )

Next steps:

Core Capabilities

AreaWhat SpikingJelly provides
SNN modelingActivation-based SNN components: spiking neurons, surrogate gradients, stateful and stateless modules. Predefined SNN models.
Training workflowsPyTorch-native training flows, online-learning utilities, and ANN2SNN conversion
Performancetorch, cupy, and triton backends, FlexSN for customized neuron kernels, and mixed-precision training utilities (e.g., fp8)
ScalingMemory-efficient training, and distributed training
DatasetsNeuromorphic datasets, and data preprocessing pipelines
AnalysisFLOPs / SynOps / memory-access profiling, and inference energy estimation
Interchange and deploymentNIR, Lava, and Lynxi-oriented exchange interfaces for neuromorphic workflows

Backend Performance

Spiking neuron models run on torch, cupy, or triton backends. The backend is set at neuron creation and can be changed later. All backends are compatible with torch.compile.

Below: execution time comparison for multi-step LIF neurons on torch vs cupy. Triton is covered in the backend tutorials.

<img src="./docs/source/_static/tutorials/11_cext_neuron_with_lbl/exe_time_fb.png" alt="Backend benchmark for multi-step LIF neurons" />

Large-Scale SNN Systems

For large-scale SNN systems, SpikingJelly provides:

  • Memory-efficient training with spike compression (memopt)
  • Experimental distributed execution for multi-GPU workloads
  • Precision policy tools for large-scale training and inference
  • Spiking transformer components

Datasets

SpikingJelly includes the following event-based and neuromorphic datasets:

Each dataset supports raw event access and frame representations. See the neuromorphic datasets tutorial for the full workflow.

Interchange and Deployment

Export SpikingJelly models to neuromorphic hardware or other frameworks:

Project Status and Version Notes

Development / release policy:

Odd version numbers track the development branch on GitHub / OpenI. Even version numbers are stable releases published to PyPI.

<details> <summary>Compatibility, migration, and older docs</summary>
  • From 0.0.0.0.14, modules including clock_driven and event_driven were renamed. See Migrate From Old Versions.
  • The default documentation points to the latest development version.
  • If you rely on an older release, check bugs.md and switch to the matching documentation version.

Historical documentation:

</details>

Acknowledgement

Maintainers

Current maintainers (since July 2024):

Previous core maintainers (before July 2024):

Contributors

The full contributor list is on the contributors page.

<a href="https://github.com/fangwei123456/spikingjelly/graphs/contributors"> <img src="https://contrib.rocks/image?repo=fangwei123456/spikingjelly" alt="contributors" /> </a>

Institutes

The main institutions behind SpikingJelly are Multimedia Learning Group, Institute of Digital Media (NELVT), Peking University and Peng Cheng Laboratory.

<p align="center"> <img src="./docs/source/_static/logo/pku.png" alt="PKU" width="160" /> <img src="./docs/source/_static/logo/pcl.png" alt="PCL" width="160" /> </p>

Contributing

We welcome issues, pull requests, documentation improvements, and translations.

  • Read the Contributing Guide.
  • Check issues for ongoing work.
  • API docs are not fully bilingual yet; translation contributions are especially welcome.

Citation

Publications using SpikingJelly are listed on the documentation page. The source of truth in this repository is publications.json.

If you use SpikingJelly in your work, please cite:

bibtex
@article{ doi:10.1126/sciadv.adi1480, author = {Wei Fang and Yanqi Chen and Jianhao Ding and Zhaofei Yu and Timothee Masquelier and Ding Chen and Liwei Huang and Huihui Zhou and Guoqi Li and Yonghong Tian}, title = {SpikingJelly: An open-source machine learning infrastructure platform for spike-based intelligence}, journal = {Science Advances}, volume = {9}, number = {40}, pages = {eadi1480}, year = {2023}, doi = {10.1126/sciadv.adi1480}, url = {https://www.science.org/doi/abs/10.1126/sciadv.adi1480}, eprint = {https://www.science.org/doi/pdf/10.1126/sciadv.adi1480} }

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from fangwei123456/spikingjelly via the GitHub API.Last fetched: 6/29/2026