How to Deploy a PyTorch Model to Loihi 2
The traditional route from PyTorch to Loihi 2 ran through Intel's Lava-DL and SLAYER, gated behind INRC membership - and that toolchain is now archived. Here is the practical path that still works in 2026.
If you have a trained PyTorch model and want to run it on Intel's Loihi 2 neuromorphic chip, you'll quickly run into two separate gates: Intel Neuromorphic Research Community (INRC) membership to get hardware access at all, and a conversion toolchain that, as of 2026, is archived. This guide covers both the traditional path and a way to validate your model's behavior against Loihi 2's actual neuron model before you ever need physical hardware.
The traditional path: Lava-DL, SLAYER, NetX
Intel's documented workflow for getting a model onto Loihi 2 looked roughly like this:
- Train or fine-tune a spiking model using Lava-DL's SLAYER module, which implements surrogate-gradient training for spiking layers in a PyTorch-like API.
- Export the trained network to HDF5 format.
- Use NetX to convert the HDF5 network description into Lava Processes.
- Run the Lava network on
Loihi2SimCfgfor simulation, orLoihi2HwCfgfor physical hardware, the latter requiring active INRC membership and an allocated hardware slot.
As covered in our piece on Lava's archival, the lava-nc repositories that implement this entire chain are now archived, with no public successor SDK yet. Existing projects on this path still run, but it is not a workflow you can newly adopt with confidence in 2026.
An alternative path: convert and validate first, seek hardware second
NeuroCUDA separates these two concerns. You can convert and fully validate a PyTorch model's spiking behavior using only a GPU or CPU, with no INRC membership required, and only need hardware access for the final physical deployment step.
Step 1: Install
pip install neurocuda
Step 2: Convert the trained PyTorch model
import neurocuda snn_model = neurocuda.convert(your_pytorch_model, train_loader) sparsity = neurocuda.measure_sparsity(snn_model, test_loader)
This applies QCFS (quantization-clip-floor-shift) calibration to align the model's ReLU activations with spiking integrate-and-fire neuron dynamics, then fine-tunes with backpropagation-through-time (BPTT) to recover accuracy lost in the conversion.
Step 3: Validate against Loihi 2's published neuron equations
neurocuda.compile(snn_model, target="loihi2_sim")
This runs the converted model through a simulator that implements Loihi 2's published IF-neuron equations directly, not a wrapper around Intel's Lava SDK. NeuroCUDA's simulator has been checked against those equations across more than 100,000 comparisons with zero deviations - a spec-conformance check, explicitly not a claim of running on Intel's Lava SDK or physical Loihi 2 silicon.
Step 4: Export to NIR for portability
neurocuda.to_nir(snn_model, "model.nir")
Exporting to NIR (Neuromorphic Intermediate Representation) means the validated model isn't locked to one tool's format if your deployment target changes later. NeuroCUDA's NIR executor is verified bit-exact (0.000000 maximum absolute difference) on residual architectures like ResNet-18, a case that commonly trips up reference NIR tooling.
What accuracy to expect
| Architecture / dataset | SNN accuracy | ANN baseline | Gap |
|---|---|---|---|
| 3-layer CNN / N-MNIST | 99.88% ± 0.02% | 99.70% ± 0.00% | SNN +0.18% |
| ResNet-18 / CIFAR-10 | 94.61% ± 0.14% | 95.56% ± 0.11% | 0.95% |
| MLP / MNIST | 97.4% | 97.8% | 0.4% |
Where physical Loihi 2 hardware still comes in
This validation path tells you whether your converted model behaves correctly against Loihi 2's neuron-level math. It does not substitute for running on the actual chip - timing characteristics, on-chip memory constraints, and power measurements still require physical hardware access through INRC. What this approach buys you is confidence and a fully tested model before you spend time pursuing that hardware allocation, rather than discovering conversion problems after you already have chip access.
Sources & further reading
- Intel Neuromorphic Research Community (INRC) membership and hardware access requirements
lava-nc/lava-dlGitHub repository, archived status observed June 2026- NeuroCUDA source and verified benchmark results, github.com/Krishnav1/neurocuda
Frequently asked questions
How do I deploy a PyTorch model to Loihi 2?
The traditional path used Intel's Lava-DL with SLAYER training, HDF5 export, and NetX conversion to Lava Processes, then ran on Loihi2HwCfg with INRC hardware access. That toolchain is now archived. An alternative is converting the model with NeuroCUDA, which uses QCFS calibration and BPTT fine-tuning, then validates execution against Loihi 2's published neuron equations in simulation.
Do I need Intel Neuromorphic Research Community membership to use Loihi 2?
Yes, to run on physical Loihi 2 hardware you need an active INRC membership and hardware allocation. You do not need INRC membership to develop and validate spiking neural network behavior against Loihi 2's published neuron equations using a simulator.
Can I test Loihi 2 compatibility without physical hardware?
Yes. NeuroCUDA includes a Loihi 2 IF-neuron simulator backend that has been checked against Intel's own published neuron equations across more than 100,000 comparisons with zero deviations, which lets you validate neuron-level numerical behavior before seeking physical hardware access.
What accuracy can I expect after converting a PyTorch model for Loihi 2?
It depends on the architecture and conversion method. Using NeuroCUDA's QCFS calibration plus BPTT fine-tuning, a 3-layer CNN on N-MNIST reached 99.88% accuracy versus a 99.70% ANN baseline, and a ResNet-18 on CIFAR-10 converted with a 0.95 percentage point accuracy gap.