Skip to content
ncas-tumPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

3 watching

Forks

Repository files navigation

Lint Docs Ruff License: MIT

ELEANOR (fErroelectric Leaky-intEgrate And fire Neural mOdel simulatoR)

ELEANOR is a simulator for Ferroelectric Leaky-Integrate-and-Fire (FeLIF) neurons. It provides the FeLIF, Bruno, and Heracles neuron models with two backends:

  • JAX (eleanor.jax), built on Equinox.
  • PyTorch (eleanor.torch), with C++/CUDA kernels compiled as a PyTorch extension.

Documentation: https://ncas-tum.github.io/ELEANOR/

Installation

ELEANOR needs Python 3.11–3.14 and is installed as eleanor-ncas (the import name stays eleanor). Pick one hardware variant; it selects the matching PyTorch and JAX builds.

Prebuilt wheels (Linux x86_64, macOS arm64)

Each variant has its own package index. Add it next to PyPI, and pip or uv installs ELEANOR with the matching PyTorch and JAX:

Variant Hardware Index
cpu CPU only (Linux and macOS) https://ncas-tum.github.io/ELEANOR/whl/cpu
cu126 NVIDIA GPU, CUDA 12.6 (Linux) https://ncas-tum.github.io/ELEANOR/whl/cu126
cu130 NVIDIA GPU, CUDA 13.0 (Linux) https://ncas-tum.github.io/ELEANOR/whl/cu130
mps Apple Silicon, with JAX on Metal https://ncas-tum.github.io/ELEANOR/whl/mps

The macOS wheels need Apple Silicon and macOS 14 or newer.

pip install eleanor-ncas --extra-index-url https://ncas-tum.github.io/ELEANOR/whl/cpu

or, in a uv project:

uv add eleanor-ncas --index https://ncas-tum.github.io/ELEANOR/whl/cpu

Use --extra-index-url (pip) or --index (uv), not --index-url: the index only holds ELEANOR and PyTorch, and everything else comes from PyPI. On Python 3.12 and newer, one dependency (expelliarmus, via tonic) is compiled during installation, so a C compiler is needed.

The wheels are also attached to every GitHub release.

From source (uv)

Building from source compiles the PyTorch extension, so you need a C++20 compiler with OpenMP, and nvcc for the CUDA variants. The variant is selected with an extra (cpu, cuda12, cuda13 or mps):

git clone https://github.com/ncas-tum/ELEANOR.git
cd ELEANOR
uv sync --extra cpu        # or cuda12 / cuda13 / mps

The extension is compiled against the PyTorch of the selected extra. Once synced, uv run pytest and other uv run commands keep that PyTorch. Always pass the extra to uv sync: a plain uv sync removes PyTorch.

Development container

Dockerfile.dev and .devcontainer/ provide a ready-made environment with the toolchain installed. Inside the container, run dev-sync for an editable install.

Quick check

import eleanor

print(eleanor.__version__)

Contributing

uv sync --extra cpu also installs the development tools. Code is linted and formatted with Ruff (uvx ruff check eleanor, uvx ruff format eleanor), and the docs are built with uv run sphinx-build -b html docs/source docs/_build. See CHANGELOG.md for recent changes.

License

MIT; see LICENSE.txt. Contributors are listed in AUTHORS.rst.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages