Equinox
JAX library that treats neural networks as PyTrees, with filtered transforms and PyTorch-style model classes.
About
Written by Patrick Kidger, Equinox fills the gaps around core JAX without wrapping it in a separate framework. A model is an ordinary Python class that subclasses eqx.Module, which registers it as a PyTree, so the same object can be handed straight to jax.jit, jax.grad, or vmap. Filtered transformations such as filter_jit and filter_grad decide which leaves are arrays to trace and which are static Python values, sparing much of the bookkeeping Flax or Haiku users do by hand. The eqx.nn package covers standard layers from linear and convolution to attention, recurrent cells, and stateful batch norm, while other modules add tree surgery with tree_at, runtime checks via error_if that survive compilation, and serialisation helpers. Worked examples include BERT, a vision transformer, and score-based diffusion. Installation is pip install equinox on Python 3.10 or newer, with hardware support inherited from JAX on CPU, GPU, or TPU. Apache-2.0 makes commercial use straightforward. It suits researchers and scientific computing users who like JAX but want PyTorch-style model code; the author's Diffrax builds on it.
Should you use Equinox?
Pick it when
Pick Equinox when you already work in JAX and want models as plain Python classes that pass cleanly through jit and grad, especially for scientific ML such as differential equation solvers, where libraries like Diffrax build on it.
Look elsewhere when
Skip it if you are new to JAX or want Google backing and the most examples, where Flax is the mainstream choice. If what you really want is a PyTorch-like experience, PyTorch itself has a far bigger ecosystem and less to learn.
Alternatives to Equinox
- Flax
Google maintained, used across Google research, with the NNX API for mutable objects, but a heavier framework than Equinox's plain PyTree approach.
- JAX
Raw JAX gives you transforms like jit and vmap with no module system at all; Equinox adds model structure while staying close to those semantics.
- PyTorch
Real PyTorch modules with a much larger ecosystem and eager debugging, the better pick unless you specifically need JAX's transforms and compilation.
- Keras
Keras 3 can run on a JAX backend with a high-level fit loop, easier to start, but with less low-level control than Equinox's filtered transforms.
Reviews (0)
Leave a Review
No reviews yet. Be the first to review!
Details
- Category
- AI Frameworks & Libraries
- Price
- Free
- Platform
- Local/Desktop
- Difficulty
- Advanced (4/5)
- License
- Apache-2.0
- Added
- Apr 3, 2026