spikingjelly: a PyTorch-native framework for large-scale spiking neural network training and inference
spikingjelly: a PyTorch-native framework for large-scale spiking neural network training and inference
What it solves
SpikingJelly is a PyTorch-native framework designed to simplify the development, training, and deployment of Spiking Neural Networks (SNNs). It provides the necessary infrastructure to handle the unique temporal dynamics of spiking neurons, which differ from traditional artificial neural networks (ANNs), while remaining compatible with the PyTorch ecosystem.
How it works
The framework integrates spiking neuron models (like LIFNode) and surrogate gradients to allow SNNs to be trained using standard gradient-based optimization. It supports multiple acceleration backends—torch, cupy, and triton—to optimize the execution of neuron kernels. For users moving from traditional AI, it offers ANN2SNN conversion tools to transform existing artificial neural networks into spiking versions.
Who it’s for
It is aimed at researchers and developers working on neuromorphic computing, spike-based intelligence, and energy-efficient AI, as well as those looking to integrate event-based datasets into their machine learning workflows.
Highlights
- PyTorch-native API: Define SNNs using familiar PyTorch
nn.Sequentialand module patterns. - High-performance backends: Support for
cupyandtritonfor faster neuron execution. - Neuromorphic Data Support: Built-in access to a wide variety of event-based datasets (e.g., ASL-DVS, N-MNIST).
- Deployment Ready: Interfaces for exporting models to neuromorphic hardware via NIR, Lava, and Lynxi.
- Scaling Tools: Includes memory-efficient training (
memopt) and distributed execution for multi-GPU workloads.
Sources
- undefinedfangwei123456/spikingjelly