Skip to main content
Repo·github.com
numerical-computationautomatic-differentiationxlamachine-learningpythonjax

JAX

Learn JAX, a powerful numerical computation library with automatic differentiation and XLA compilation, ideal for high-performance machine learning research and custom model development.

beginner60 minutes5 steps
The play
  1. Install JAX
    Install JAX with CPU support using pip. For GPU or TPU support, follow the official JAX installation guide for specific instructions.
  2. Basic JAX Operations
    Explore basic JAX operations like array creation and manipulation, similar to NumPy.
  3. Automatic Differentiation with JAX
    Use `jax.grad` to automatically compute gradients of functions.
  4. JIT Compilation with JAX
    Use `jax.jit` to compile functions for faster execution using XLA.
  5. Vectorization with `jax.vmap`
    Use `jax.vmap` to automatically vectorize functions over array axes.
Starter code
Start by installing JAX and exploring basic array operations. Then, dive into automatic differentiation and JIT compilation to understand the core strengths of JAX.
Source
JAX — Action Pack