JAX

New
License: Apache License 2.0 · Updated 2026-11-16
Evidence: Primary sourceVerified: 2026-11-166 sourcesView evidenceHide evidence
Scope and limits

Verification covers the licence and maintenance state of the official repository, the release timeline, the PyPI version and Python requirement, the reachability of the official documentation site, and a reproducible source for the monthly download count. Version 0.12.0.1 was uploaded to PyPI on 21 October 2026 and published on GitHub on 22 October 2026; the 23 October date previously recorded in the entry is supported by neither channel and has been replaced with the two channel-specific dates. The operator-level changes of the 0.12.0 line were not re-verified item by item, and the performance and ecosystem comparison conclusions are outside the scope of this verification.

#SourceTypePublished / Accessed
1JAX official code repositoryGitHubRepository2018-10-25 / 2026-11-16
2JAX release record (0.12.0.1, 22 October 2026)GitHubRepository2026-10-22 / 2026-11-16
3JAX LICENSE (Apache License 2.0)GitHubRepositoryNot stated / 2026-11-16
4jax release record (0.12.0.1, 21 October 2026, Python 3.12 and newer)Python Package IndexDatabase2026-10-21 / 2026-11-16
5JAX official documentationJAX projectDocumentationNot stated / 2026-11-16
6jax PyPI downloads in the last month (12,013,296)pypistatsDatabaseNot stated / 2026-11-16

The verification date covers only what was checked in that pass; it does not mean every figure on this page was independently verified.

My rating

1. Overview

JAX is Google's open-source numerical computing library, first released in 2018 under the Apache-2.0 licence. It binds two ideas together: describing numerical programs in a NumPy-like style, and compiling those programs for accelerators through XLA. The first keeps research code readable; the second makes the same code execute as fused operators on CPU, GPU or TPU.

For physics AI, JAX matters because it is the runtime substrate under the differentiable-programming approach, not a physics solver in its own right. JAX-CFD provides differentiable Navier-Stokes discretisations and JAX-Fluids builds a GPU-native differentiable CFD framework; both sit on JAX's autodiff and JIT foundation. Neural-operator and physics-informed work leans on the same composable gradient machinery. Understanding JAX's transformation model and its cost model is what lets you tell whether a limitation you observe comes from the algorithm or from the execution model underneath it.

After reading you should be able to answer three questions: what each of the four core transformations actually solves for, where a port of an existing solver will meet resistance, and which part of a multi-device simulation becomes the real bottleneck. The site discusses the cost boundary of differentiable solvers in the classical-solver cost-boundary guide and neural-operator selection in the neural operator selection guide. Version and capability statements were verified against the repository, release records and official documentation on 16 November 2026; claims that are the project's own description rather than an independent measurement are labelled as such in Section 9.

2. How It Works

JAX is built on a function-transformation model: programs are pure Python functions, and transformations act on functions and return new functions. Four primitives carry most of the work. jax.grad provides automatic differentiation, reverse-mode by default, with jax.jacfwd and jax.jacrev for Jacobians. jax.jit traces a function into an XLA computation graph and compiles it into accelerator-executable form, delivering operator fusion and constant folding. jax.vmap auto-vectorises over a batch axis so you do not hand-write the loop. jax.pmap and jax.shard_map handle cross-device parallelism and explicit sharding.

These transformations compose arbitrarily. jax.jit(jax.vmap(jax.grad(f))) yields a compiled, batched, differentiated function, and that composability is the substantive difference from a conventional numerical library: the same solver source serves a forward solve, produces design gradients, and evaluates a thousand operating conditions in one call.

Three execution constraints deserve emphasis. First, shapes are static: jit traces with abstract values, so input shapes must be determined at compile time and a shape change triggers re-tracing and recompilation; data-dependent branching must be written as jax.lax.cond or jax.lax.scan rather than Python if or for. Second, functions must be pure: arrays are immutable, updates return new arrays via .at[].set(), and randomness is threaded through explicit PRNG keys, which is what makes the transformations semantically sound. Third, JAX operates on PyTrees, nested containers of arrays; transformations map over the leaves automatically, so model parameters can be an arbitrarily nested structure.

Compilation is performed by XLA, now maintained under the OpenXLA community, with CPU, CUDA, ROCm, Metal and TPU backends. Version 0.12.0 added an IFRT Proxy backend that can connect to remote proxy services such as Pathways on Cloud, along with jax.lax.polynomial for polynomial evaluation - described upstream as faster and less memory-hungry during gradient computation - and custom rematerialisation controls such as jax.custom_vjp.defremat.

3. Scope and Assumptions

JAX assumes your computation can be expressed as a shape-stable pure function. Code that leans on mutable state, in-place mutation, dynamic shapes or heavy Python object encapsulation carries a high porting cost. This follows directly from the execution model rather than from stylistic preference: the tracing phase cannot execute Python branches that depend on array values, and the static-shape assumption cannot be talked around.

Precision is an easily missed precondition. JAX defaults to 32-bit floats and silently downcasts 64-bit literals; physical simulation usually has a real need for double precision, which requires explicitly enabling jax.config.update("jax_enable_x64", True). That setting changes memory footprint and compilation output, so it belongs in the setup decisions rather than in a later fix.

Version coupling is another precondition. jax and jaxlib must match, because jaxlib carries the compiled XLA backend and a mismatch fails at import. GPU support arrives through plugins such as jax[cuda12] and jax[cuda13], whose compatibility matrix needs checking before deployment; NVIDIA's NGC container lines likewise pin JAX, XLA, Flax and TransformerEngine versions together.

The division of labour in the ecosystem matters for planning. JAX itself stays deliberately minimal, offering arrays and transformations; neural-network layers live in Flax, Haiku and Equinox, optimisers in Optax, checkpointing in Orbax, and testing utilities in Chex. Adopting JAX therefore means assembling more components yourself, and the pretrained-model and tooling ecosystem at large centres on PyTorch.

One further precondition is frequently skipped: JAX's asynchronous dispatch semantics. Calls into a jit-compiled function return immediately, so timing code that does not explicitly wait for the device measures dispatch overhead rather than computation. This semantics accumulates into a measurable discrepancy across a long simulation loop, so any performance comparison built on JAX must fix the synchronisation strategy before drawing speed conclusions.

4. Getting Started

The shortest route starts from a pure function you already trust, not from an empty repository. Install the combination matching your hardware - jax alone for CPU, or jax[cuda12] and equivalents for GPU - and confirm detection with jax.devices(). First write a plain implementation with no accelerator involvement, such as one step of a 1D heat-diffusion scheme or the residual of a Burgers solve, and check jax.grad against a central finite difference: gradient errors are considerably more insidious than shape errors.

Second, bring in jit. This is where the first real friction appears - the static-shape assumption, and data-dependent branches that must become jax.lax control flow. Apply jit to hot functions only at first, and separate compile time from execution time in any timing, since operations dispatch asynchronously and a naive wall-clock measurement records dispatch rather than compute.

Third, introduce vmap, batching operating conditions, boundary conditions or sample points. For simulation workloads this is where the direct payoff appears. Fourth, consider device parallelism and sharding, deciding explicitly how data is partitioned; jax.sharding with explicit placement is easier to debug in multi-node settings than automatic partitioning.

Throughout, keep a classical solver as the reference. Run the same case in the existing code and compare intermediate and final quantities step by step; the point where the two diverge is the boundary where the JAX port introduced an error. The physics simulation primer and the physics knowledge machine learning survey on this site provide the surrounding methodology.

5. Comparison with Alternatives

The comparison with PyTorch is unavoidable, and both target the same hardware; the difference is the programming model. PyTorch executes imperatively with mutable tensors, offers straightforward debugging and a broad third-party ecosystem with ready pretrained models and production tooling. JAX transforms pure functions, keeps arrays immutable, and imposes tracing restrictions, but composes transformations, supports higher-order derivatives natively and provides explicit sharding and mesh abstractions. PyTorch 2.x introduced torch.compile, torch.export, compiled autograd and FSDP2, so the older summary of JAX as compiled and PyTorch as eager no longer describes the landscape accurately.

In the physics-AI context, JAX's differentiated advantages concentrate in three places: composable transformations enabling higher-order derivatives and custom gradient logic; vmap giving near-free batched evaluation, which matters for uncertainty quantification and parameter sweeps; and the TPU-oriented large-scale training path, for which the XLA compiler and Shardy partitioner were purpose-built. PyTorch's advantages are ecosystem inertia, the availability of pretrained models and the cost of getting a team up to speed.

The ecosystem difference is equally concrete. Differentiable CFD frameworks such as JAX-Fluids and JAX-CFD choose JAX because they need to wrap an entire solver as one differentiable operator. XLB, a differentiable lattice Boltzmann library, demonstrates a different path, using lax.ppermute for inter-GPU communication and mapping collide-and-stream directly onto a device mesh. NVIDIA Warp offers a kernel-centric alternative, and Taichi provides another programming abstraction aimed at MPM and differentiable simulation. The choice turns on whether you want composable transformations or high-performance kernels.

6. Benchmarks and Evidence

Independent measurements of JAX performance are limited, and that limitation should shape the evaluation. One published result covers XLB scaling to 512 NVIDIA A100 GPUs across 64 nodes, handling more than 67 billion fluid cells at a peak of roughly 220 billion lattice updates per second, with inter-card communication handled by lax.ppermute. Such figures come from a specific algorithm on specific hardware and do not extrapolate to a general CFD solver.

On resource usage, one HPC-oriented practice summary reports a memory footprint favouring JAX over the PyTorch equivalent in the described scenario, with pmap scaling efficiently up to 64 GPUs and communication overhead rising noticeably beyond 128 nodes; compute-bound tasks such as eigenvalue solves can gain an order of magnitude, while I/O-bound workflows gain little without a supporting data pipeline. These conclusions are strongly scenario-dependent, and the accompanying cost estimates are scaled from particular supercomputer pricing, useful only for order-of-magnitude orientation.

A reproducible engineering fact carries more weight than cross-framework leaderboards: JAX timing must separate compilation from execution, and because operations dispatch asynchronously, naive wall-clock measurement understates real cost. Across thousands of iterations on the same case, compilation amortises and the gap to an interpreted path changes substantially, which means neither "JAX is always faster" nor "JAX is always slower" holds.

This section deliberately omits a universal cross-framework benchmark table. Such numbers are highly sensitive to case, precision, hardware and compile-warmup assumptions, and any table detached from those conditions misleads. The reliable approach is to take your own representative case and compare on target hardware at equal precision under equal convergence criteria.

7. Role in Physics-AI Workflows

JAX plays three roles in a physics-AI workflow. It is the runtime for differentiable solvers: JAX-CFD implements a differentiable Navier-Stokes discretisation on it and JAX-Fluids builds GPU-native differentiable CFD kernels, with JAX's jit, vmap and grad forming the interface contract. It is the training frontend for neural operators and surrogates: frameworks such as PhysicsNeMo and NeuralOperator commonly use JAX as the training backend, because operator learning itself requires differentiating through an operator. And it is the optimisation engine for inverse problems: embedding a PDE solver as a differentiable operator inside an optimisation loop lets design variables, boundary conditions or constitutive parameters become optimisation targets, which is the basis of inverse design and parameter identification.

A workflow that has been validated repeatedly is solver-as-data-engine: a differentiable solver generates data, a surrogate is trained on it, and the surrogate serves fast evaluation. JAX provides compute on both sides - the solver side because vmap produces large labelled batches cheaply, the surrogate side because jit and sharding train efficiently. The precondition is that the solver is differentiable and that the discretisation used in training matches the one used to generate data, so that residuals carry physical meaning.

In coupled multiphysics and optimisation settings, JAX's higher-order differentiation adds distinct value. When the quantity being optimised is itself a PDE solution - treating a transient flow trajectory as a control variable, say - what is needed is a second derivative of the solution, which imperative autodiff frameworks generally require you to construct by hand.

8. Limitations and Failure Modes

The most characteristic failure is recompilation triggered by shape changes. Adaptive mesh refinement, variable-resolution simulation and data-dependent loop lengths all force jit to re-trace repeatedly, and compilation overhead can exceed the compute saved, with observed latency increases of several times. Common mitigations are abstracting shapes with jax.ShapeDtypeStruct or padding batches to a common maximum size; another route is training at fixed shape and accepting a one-off compilation cost at deployment.

A second class is broken gradient chains from non-differentiable operations. Integer indexing, discrete decisions in particle tracking, and implicit stop_gradient all sever the autodiff path. The usual remedy is a differentiable surrogate for discrete choices, such as a Gumbel-Softmax relaxation, or an explicit stop_gradient where no gradient is needed.

A third class is gradient overflow and numerical instability. Large timesteps in stiff ODEs or explosive reactions produce NaN gradients. Diagnostic practice is to print intermediates with jax.debug.print during tracing and cross-check with finite differences; in engineering settings, applying stop_gradient to constant parameters or clipping gradients removes a large share of instabilities.

A fourth is memory pressure from mismatched sharding. When data is unevenly distributed across devices, the partitioning assumed by pmap conflicts with the actual layout and surfaces as out-of-memory errors. The fix is explicit placement with jax.device_put and validating the sharding logic on small batches first.

Finally there are cases that do not suit JAX at all. Legacy Fortran or C++ solvers wrapped in an imperative interface can cost more to port than to keep. Likewise, for supervised learning tasks with a fixed architecture and a need for many ready pretrained weights, JAX's ecosystem disadvantage is material, and tooling on the PyTorch side such as PyTorch Geometric offers more convenience.

9. Version and Source Notes

As of 16 November 2026, the latest JAX release is still 0.12.0.1, uploaded to PyPI on 21 October 2026 and published as a GitHub release on 22 October 2026, following 0.12.0 (19 October 2026) and 0.11.0 (16 July 2026). The project runs a fast 0.x release cadence, so pin versions and keep jax and jaxlib in lockstep. One caveat: the version information observed from PyPI and the repository at different points during authoring differed, and the project release page is the authority.

Verifiable changes in the 0.12.0 line include the addition of jax.scipy.special.erfcinv; the new jax.lax.polynomial primitive, described upstream as faster and less memory-hungry when computing gradients; jax.custom_vjp.defremat for customising rematerialisation; an mxfp4 option in jax.nn.get_scaled_dot_general_config, executed natively on AMD gfx950 GPUs with a dequantise-and-dot fallback elsewhere; registration of an IFRT Proxy backend reachable via JAX_PLATFORMS=proxy and JAX_BACKEND_TARGET; a jax.sharding.no_collectives context manager that raises at trace time when an explicit-sharding operation introduces a collective across a mesh axis; and generalised Hermitian eigenproblem support in jax.scipy.linalg.eigh.

On the ecosystem side, Flax supplies network layers, Equinox is an alternative modular abstraction, Optax handles gradient processing and optimisers, Orbax handles checkpointing, and Chex provides testing utilities; mpi4jax provides MPI interoperability. NVIDIA's NGC line, JAX Release 26.01, pins JAX 0.8.1 with CUDA 13.1.1, Flax 0.12.1 and TransformerEngine 2.11, which shows that production deployments align to container versions rather than to the newest upstream tag.

Statement of provenance: the version numbers, dates and change entries above come from the project's release records and official release notes. The performance magnitudes in Sections 3 and 6 come from third-party practice summaries and project technical reports, and reflect measurements under specific configurations rather than all hardware and cases. The entry's first-release year remains 2018, which is consistent with the currently maintained release line.

10. References

  1. JAX project repository and official documentation, github.com/jax-ml/jax and docs.jax.dev, concept guide and transformation API reference.
  1. JAX release records: 0.12.0 (19 October 2026), 0.12.0.1 (PyPI upload 21 October 2026, GitHub release 22 October 2026), 0.11.0 (16 July 2026), verified 16 November 2026.
  1. OpenXLA project documentation, XLA compiler operator fusion, constant folding and multi-backend support.
  1. JAX-Fluids project documentation and paper, a differentiable GPU-native CFD framework with implementation and case validation.
  1. JAX-CFD project documentation and paper, Google's differentiable Navier-Stokes solver.
  1. XLB paper, a differentiable massively parallel lattice Boltzmann library, including 512-A100 scaling and throughput figures.
  1. NVIDIA JAX Release Notes, version pairing of JAX, XLA, Flax, TransformerEngine and CUDA in the NGC containers.
  1. JAX common-gotchas documentation, static shapes, functional purity, enabling 64-bit precision, asynchronous dispatch and first-call compilation latency.
  1. mpi4jax project documentation, the JAX-MPI interoperability layer and its version compatibility requirements.
  1. Documentation for the JAX ecosystem components Flax, Equinox, Optax, Orbax and Chex, their responsibilities and how they fit together.
Tags: