Index of every page on this site: llms.txt
All skills
Run it yourself

Essential tools for using JAX in machine learning and mathematical analysis, covering core concepts, transformations, ML specifics, control flow, and parallelism.

  • 7 files
  • 12.6 KB
  • Updated 10 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/yonesuke/skills/jax

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

reference.md

≈286 tokens on demand. Your agent reads this file only when SKILL.md points to it.

JAX Reference

1. Core Philosophy

  • Immutability: JAX arrays are immutable. x[0] = 1 raises error. Use x.at[0].set(1).
  • Functional: Functions should be Pure (Output depends only on input, no side effects).
  • Accelerated: Runs on XLA (Accelerated Linear Algebra) for GPU/TPU.

2. The Four Transformations

  1. jit: Compiles f(x) -> xla_f(x). Speedup.
  2. grad: Differentiates f(x) -> f'(x). Autograd.
  3. vmap: Vectorizes f(x) -> f(batch_x). Automatic Batching.
  4. pmap (Legacy) / sharding: Parallelizes across devices.

3. Control Flow

  • Python Control Flow (if x > 0): Logic is baked into the graph during tracing. x must be static (value known at compile time).
  • JAX Control Flow (lax.cond, lax.scan, lax.fori_loop): Logic remains in the graph. x can be dynamic (tracer).

4. Pytrees

JAX generic concept for "container of arrays". JAX ops work over pytrees seamlessly.

  • Supported: list, tuple, dict, NamedTuple, custom classes registered as nodes.
  • Common util: jax.tree.map(fn, tree) applies function to leaves.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 1e23d34. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 10 months ago

README badge

README badge for yonesuke/skills/jax