Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Scale SciPy with jax.shard_map - jax.shard_mapで...

Avatar for tsho tsho
January 24, 2026

Scale SciPy with jax.shard_map - jax.shard_mapで SciPy をスケール

SciPyData2026でLT登壇した内容です. https://scipydata.connpass.com/event/364718/

Avatar for tsho

tsho

January 24, 2026
Tweet

More Decks by tsho

Other Decks in Technology

Transcript

  1. Self-Introduction © Sho Tanaka 3 tsho / 田中 翔 (Sho

    Tanaka) Snowflake, Lead Developer Advocate Demonstrating & Developing: ML/AI, Data projects Private - Google Developer Expert AI/ML - MLOps community organizer - AI/ML Advisor
  2. 0. Context for Today’s Topic Let’s give it a try!!!

    © Sho Tanaka 3 MLOps/LLMOps professionalist however didn’t use JAX so far…
  3. 0. Today’s Topic © Sho Tanaka 3 *MathJax, GPJax etc.

    are NUMFOCUS’s project. ** JAX 0.9 was released 3 days ago
  4. 1. Shift from pmap © Sho Tanaka 3 Available for

    distributed and parallel execution since the initial JAX release. An API that requires specifying the number of devices upfront for sharding, which began to conflict with the JAX trends jax.pmap
  5. 1. Shift to shard_map © Sho Tanaka 3 No need

    to define device num Always use global array, explicitly define divided num, easily extended to other API jax.shard_map Special page for migration of jap.pmap v0.8.0+
  6. 2. Example: Distributed Gaussian Process Regressor © Sho Tanaka 3

    f(x) = sin(x**5) + cos(x ** 2) + (0.5 * x)
  7. © Sho Tanaka 3 pmap - Define distribution number from

    device (CPU/GPU/TPU) - Insert jax.pmap into as var of predict_pmap 2. pmap: Distributed Gaussian Process Regressor Prep - Define Kernel - Scipy: Cholesky decomposition - Scipy: Solve triangular - Scipy: α=(K**-1) y
  8. 2. shard_map: Distributed Gaussian Process Regressor © Sho Tanaka 3

    shard_map Prep, same as pmap - Define Kernel - Scipy: Cholesky decomposition - Scipy: Solve triangular - Scipy: α=(K**-1) y Decorator with jax.shard_map and calculates Gaussian process Really readable!