google/jax

Created Dec 22, 2020 · View the google/jax repository page

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

Want this for your repo?

Render a free sample of any GitHub repo in seconds.

Visualize your own →

Contributors

256

Lines of Code

11,132

From

Nov 18, 2018

To

Dec 21, 2020

About google/jax

JAX is a Python library for high-performance numerical computing and machine learning that brings composable program transformations to NumPy-like array computation. Built on top of XLA, it enables developers to write code in familiar NumPy style while automatically compiling to run on TPUs, GPUs, and other hardware accelerators. The library is designed to handle large-scale computations through its flexible scaling modes, from automatic compiler-based parallelization to explicit per-device programming.

The core of JAX consists of three key transformations: automatic differentiation via `jax.grad` for computing gradients efficiently through arbitrary Python code including loops and recursion, just-in-time compilation with `jax.jit` for end-to-end XLA compilation, and `jax.vmap` for automatic vectorization that pushes loops down to primitive operations for performance gains. These transformations can be freely composed with each other and applied to the same functions multiple times, enabling sophisticated operations like computing Jacobians or per-example gradients.

JAX is a research project from Google that supports multiple platforms including Linux, macOS, and Windows across CPU, NVIDIA GPU, Google TPU, AMD GPU, Apple Silicon, and Intel GPU backends. The library provides flexible scaling strategies for distributed computing across thousands of devices and includes extensive documentation alongside a reference to address known gotchas and sharp edges that users should be aware of when using the system.

Share this video

More from google

See all →