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},
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google_parallax-0.0.2.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

google_parallax-0.0.2-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file google_parallax-0.0.2.tar.gz.

File metadata

  • Download URL: google_parallax-0.0.2.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for google_parallax-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f0320793718ac811f7640dd2a176b6fddcfd04e4b93c9899a94323c218d7fe5c
MD5 c7b169f4f6cd05d9e5e5e99f28330a9e
BLAKE2b-256 3b05205af485370bb8055eceb53a3beb1ace126e0f434a22eecc112dd0c206c3

See more details on using hashes here.

File details

Details for the file google_parallax-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for google_parallax-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aea1e7c65d6f3e7426b9ab34dc80af0d29f381134420095fce12e376445ca3c4
MD5 a10f97fd8d7b4eefb4e203aed22663cc
BLAKE2b-256 301a96ccbb3e6c2aa4303e773bb3cc38ead5ed5aa97a6b2d8c6ae2a908ecfc39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page