jax (jax-ml/jax)

Searching Database…

36.7K ·GitHub
What is this?JAX is a Python library for accelerator-oriented array computation and program transformation, built for high-performance numerical computing and large-scale machine learning.
Is JAX a library I import into my own Python code, or a separate program?It is a library you import, not a standalone app: you write ordinary Python and NumPy functions, and JAX transforms them — differentiating, compiling and vectorizing — while your code stays plain Python.
What should I watch out for when writing JAX code?jax.jit restricts the Python control flow a compiled function can use, and the README keeps a Gotchas Notebook for sharp bits. The project also bills itself as research, not an official Google product — expect rough edges.
What can it actually do to my code?Three composable transformations: jax.grad computes reverse-mode gradients (backprop), jax.jit compiles functions end-to-end with XLA, and jax.vmap auto-vectorizes by pushing loops down into matrix operations. Compose them freely — vmap over grad yields efficient per-example gradients.
Can it differentiate regular Python code, not just formulas?Yes — jax.grad differentiates native Python and NumPy functions through loops, branches, recursion and closures, and you can take derivatives of derivatives to any order, mixing forward- and reverse-mode arbitrarily.
How does it scale to many devices?Three composable styles: compiler-driven auto-parallelism (you program a single global machine), explicit sharding you can inspect with jax.typeof, and manual per-device programming with explicit collectives. The README targets scaling across thousands of devices.
Is JAX an official Google product?No — the README calls it a research project with sharp edges and asks users to try it, report bugs and share feedback. The core ideas (autodiff plus XLA compilation) were first described in a SysML 2018 paper.
Creator
jax-ml
Size
200.9 MB
Stars
36.7K
Age
8y
Commits · 90 Days