JAX is a Python package for accelerator-oriented array work and program transformation, aimed at numerical computing and large-scale machine learning.
Overview
JAX offers a NumPy-style API while targeting high-performance runs on CPUs, GPUs, TPUs, and other accelerators. It treats user code as a system of composable function transformations rather than only imperative array ops.
Core transformations include automatic differentiation (reverse and forward modes, composable to high order), JIT compilation via XLA, and vectorization with vmap. Grad, jit, and vmap can be combined—for example to obtain Jacobian matrices or per-example gradients efficiently.
For scaling across many devices, JAX supports compiler-based automatic parallelization with a global programming view, explicit sharding with inspectable types, and manual per-device programming with explicit collectives.
Installation is via pip on Linux, macOS, and Windows with optional extras for NVIDIA GPU, Google TPU, AMD ROCm, and Intel oneAPI. Docker-based installation is mentioned in the docs. An ecosystem of ML and numerics libraries is built around JAX for neural networks, optimizers, probabilistic programming, and related workloads.
Key features
- NumPy-style familiar API
- Reverse- and forward-mode autodiff
- XLA JIT compilation
- Auto-vectorization with vmap
- Multi-device scaling modes
- Runs on CPU, GPU, and TPU
- Composable function transformations
- Differentiation through control flow
Use cases
- Large-scale machine learning research
- High-performance numerical computing
- Custom differentiable models
- Accelerator-backed NumPy workflows
- Distributed array computations