jax

Compose JAX function transformations for automatic differentiation, JIT compilation, and vectorization.

19|2|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/tondevrel/scientific-agent-skills --skill jax-tondevrel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: jax
Source: https://github.com/tondevrel/scientific-agent-skills/tree/main/skills/jax
Command: npx skills add https://github.com/tondevrel/scientific-agent-skills --skill jax-tondevrel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables high-performance scientific simulations and machine learning research by providing composable function transformations for automatic differentiation, JIT compilation, and parallelization across CPUs, GPUs, and TPUs.

Core Features & Use Cases

  • Automatic Differentiation: Compute gradients, Hessians, and higher-order derivatives of complex functions.
  • Just-In-Time (JIT) Compilation: Compile Python/NumPy code to highly optimized machine code for significant speedups.
  • Vectorization (vmap): Easily apply functions across batches of data without manual reshaping.
  • Parallelization (pmap): Distribute computations across multiple devices.
  • Use Case: Accelerate a physics simulation by using jax.jit and jax.grad to compute derivatives and optimize parameters, or train a deep learning model faster on a TPU using jax.pmap.

Quick Start

Use the jax skill to define a function f(x) = jnp.sin(x) + x**2, then compute its gradient using grad(f).

Frequently Asked Questions about jax

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compute gradients and higher-order derivatives for Python and NumPy programs?▼

You can compute gradients and higher-order derivatives of Python and NumPy programs using composable function transformations like `jax.grad` for automatic differentiation. This enables differentiable programming for complex scientific simulations and machine learning research.

What is the best way to accelerate scientific computing simulations using GPU and TPU hardware?▼

The best way to accelerate scientific computing simulations on GPUs and TPUs is by applying Just-In-Time (JIT) compilation and parallelization to Python and NumPy code. This compiles functions to optimized machine code and distributes computations across multiple devices for significant speedups.

How do I automatically batch and vectorize data processing without manual reshaping?▼

You can automatically batch and vectorize data processing without manual reshaping by applying function vectorization using `jax.vmap`. This composable transformation maps functions across batches of data natively within Python and NumPy programs.

Does JIT compilation work with automatic differentiation for machine learning research?▼

Yes, JIT compilation works seamlessly with automatic differentiation for machine learning research. You can compose `jax.jit` and `jax.grad` together to compile differentiated Python functions to optimized machine code, accelerating complex simulations and model training.

Can I distribute computations across multiple GPUs or TPUs for parallelization?▼

Yes, you can distribute computations across multiple GPUs or TPUs using `jax.pmap` for parallelization. This function transformation enables parallel execution of Python and NumPy programs across multiple devices, satisfying high-performance computing requirements.

How do I define and optimize a function using automatic differentiation in Python?▼

You define a function using `jax.numpy`, then compute its gradient using `jax.grad` for automatic differentiation. This allows you to optimize parameters in physics simulations or machine learning models by evaluating derivatives efficiently.