talira

Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more

open sourceApache-2.0self-hostablefree

JAX is a Python library for accelerator-oriented array computation and program transformation, used for high-performance numerical computing and large-scale machine learning. It offers a NumPy-like API (jax.numpy) and composable function transformations: automatic differentiation through loops, branches and recursion in reverse and forward mode (grad), compilation with XLA (jit), automatic vectorization (vmap) and sharding across many devices. It runs on CPUs, NVIDIA and AMD GPUs and Google TPUs, with experimental Apple and Intel GPU support.

Problems it solves

  • compute gradients of arbitrary Python and NumPy functions automatically
  • run NumPy-style code on GPUs and TPUs with JIT compilation
  • train large models across many TPUs or GPUs with sharding
  • vectorize a function over a batch without rewriting it
  • high-performance scientific computing with automatic differentiation
  • research on new neural network architectures with a functional style

Features

  • NumPy-like API (jax.numpy)
  • reverse- and forward-mode automatic differentiation (grad)
  • JIT compilation with XLA (jit)
  • automatic vectorization (vmap)
  • sharding and parallelism across devices
  • CPU, NVIDIA GPU, AMD GPU and TPU backends

Limitations

  • No GPU support on native Windows: NVIDIA and AMD GPUs need Linux, or WSL2 where support is experimental1
  • Its makers call it a research project, not an official Google product, and warn of sharp edges1

Capabilities

Has official SDKsplan not known

Alternatives

The same job

These do what JAX does.

  1. TensorFlow An Open Source Machine Learning Framework for Everyone
  2. Burn A Rust tensor library and deep learning framework for training and inference on any hardware.
  3. PyTorch Tensors and dynamic neural networks in Python with strong GPU acceleration
  4. MLX An array framework for Apple silicon
  5. Keras Deep Learning for humans
  6. NumPy The fundamental package for scientific computing with Python

Compare JAX with the top 3