Skip to main content

Parallax

Parallax is a library for automatically scaling JAX models. It simplifies the process of training large models by offering automatic parallelism strategies and memory optimizations, allowing you to focus on your model architecture rather than sharding configurations.

Parallax helps you:

  • Automatically shard your JAX models and functions without manually defining PartitionSpecs.
  • Apply advanced parallelism strategies like Fully Sharded Data Parallel (FSDP) and Distributed Data Parallel (DDP) with ease.
  • Optimize memory usage through model offloading (keeping weights in CPU RAM) and rematerialization.

With Parallax, you can scale off-the-shelf JAX models to run on larger hardware configurations or fit larger models on existing hardware without extensive code modifications.

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

Installation

You can install Parallax using pip:

pip install google-parallax

Usage

Parallax integrates seamlessly with Flax NNX models. Here is a simple example of how to use auto-sharding:

import parallax
from flax import nnx
import jax
import jax.numpy as jnp

model  = parallax.create_sharded_model(
    model_or_fn=lambda: Model(...),
    sample_inputs=(jnp.ones((1, 32)),),
    strategy=parallax.ShardingStrategy.AUTO,
    data_axis_name='fsdp',
    model_axis_name='tp',
)

Features

  • AutoSharding: Automatically discover optimal sharding strategies.
  • FSDP & DDP: Ready-to-use implementations of common parallel training strategies.
  • Model Offloading: Stream model weights from CPU to device memory to train larger models.
  • Rematerialization: Automatic activation recomputation to save memory.

Contributing

We welcome contributions! Please check docs/contributing.md for details on how to submit pull requests and report bugs.

Support

If you encounter any issues, please report them on our GitHub Issues page.

Citing Parallax

To cite Parallax please use this citation:

@software{parallax2026,
  title = {{Parallax}},
  author = {Carpenter, Jeff and Yan, Stella and Liu, Dangyi and others},
  year = {2026},
  url = {https://github.com/google/parallax},
}

Metadata

Release files for google-parallax 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for google-parallax 0.0.2
File Size Uploaded
google_parallax-0.0.2.tar.gz 20.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for google-parallax 0.0.2
File Interpreter ABI Platform
google_parallax-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 49.1 kB

Release files / google_parallax-0.0.2.tar.gz

Download URL google_parallax-0.0.2.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f0320793718ac811f7640dd2a176b6fddcfd04e4b93c9899a94323c218d7fe5c
BLAKE2b-256 checksum
How to use checksums
3b05205af485370bb8055eceb53a3beb1ace126e0f434a22eecc112dd0c206c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Release files / google_parallax-0.0.2-py3-none-any.whl

Download URL google_parallax-0.0.2-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aea1e7c65d6f3e7426b9ab34dc80af0d29f381134420095fce12e376445ca3c4
BLAKE2b-256 checksum
How to use checksums
301a96ccbb3e6c2aa4303e773bb3cc38ead5ed5aa97a6b2d8c6ae2a908ecfc39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page