Skip to main content

PriX logo

GitHub license PRs Welcome

PriX is a JAX/XLA framework for Private Accelerated Transformers via Secure Multi-Party Computation (MPC), implementing Wavelet-encoded Look-Up Tables (Haar and Biorthogonal 2.2), [EGK+20] probabilistic truncation, and Fission hybrid plaintext evaluators.

Installation & Quickstart

Install from PyPI:

pip install prix-jax

Or install from source:

pip install -e .

To run the unit test suite on CPU:

JAX_PLATFORMS=cpu python3 -m unittest discover -s tests -q

To run the head-to-head benchmark suite against CuRL:

# On CPU
JAX_PLATFORMS=cpu python3 benchmarks/benchmark_prix_vs_curl.py --curl-root /path/to/curl --device cpu

# On GPU (CUDA)
python3 benchmarks/benchmark_prix_vs_curl.py --curl-root /path/to/curl --device cuda

Benchmarks: PriX (JAX) vs. CuRL (PyTorch/CrypTen)

1. GPU Benchmarks (NVIDIA Tesla T4, CUDA 13.0)

Private LLM Inference — Wavelet LUT Mode (ms)

Model CuRL (PyTorch, ms) PriX (JAX, ms) Speedup (CuRL / PriX)
BertTiny (2-Block, seq=16) 1857.90 1469.43 1.26x
BertBase (1-Block, seq=16) 1678.74 1089.91 1.54x
GPT2 (1-Block, seq=16) 1614.01 1109.09 1.46x
Llama (1-Block, d=768, seq=16) 1634.82 1012.78 1.61x
ModernBert (1-Block, seq=16) 1438.15 954.41 1.51x

Private LLM Inference — Fission Evaluator Mode (ms)

Model CuRL (PyTorch, ms) PriX (JAX, ms) Speedup (CuRL / PriX)
BertTiny (2-Block, seq=16) 395.51 152.61 2.59x
BertBase (1-Block, seq=16) 927.31 487.84 1.90x
GPT2 (1-Block, seq=16) 850.89 442.06 1.92x
Llama (1-Block, d=768, seq=16) 949.89 372.28 2.55x
ModernBert (1-Block, seq=16) 683.50 259.99 2.63x

MPC Primitives & Wavelet LUT Microbenchmarks on GPU (ms)

Benchmark CuRL (PyTorch, ms) PriX (JAX, ms) Speedup (CuRL / PriX)
Private MatMul (128x128) 17.92 8.82 2.03x
Private Mul (128x128) 10.17 7.77 1.31x
EGK TruncPr (128x128) 6.56 3.29 2.00x
Comparison / ReLU (32x64) 46.54 70.80 0.66x
Exp [Haar LUT] (32x64) 65.44 85.70 0.76x
Reciprocal [Haar LUT] (32x64) 34.99 14.90 2.35x
InvSqrt [Haar LUT] (32x64) 126.52 14.61 8.66x
GeLU [Haar LUT] (32x64) 23.17 15.46 1.50x
SiLU [Haar LUT] (32x64) 23.92 16.58 1.44x
Softmax [LUT] (4x32x32) 480.23 657.41 0.73x
LayerNorm [LUT] (4x32x64) 145.50 31.51 4.62x

2. CPU Benchmarks

Private LLM Inference — Wavelet LUT Mode (ms)

Model CuRL (PyTorch, ms) PriX (JAX, ms) Speedup (CuRL / PriX)
BertTiny (2-Block, seq=16) 991.20 548.53 1.81x
BertBase (1-Block, seq=16) 2402.88 677.29 3.55x
GPT2 (1-Block, seq=16) 2344.71 575.77 4.07x
Llama (1-Block, d=768, seq=16) 1797.25 578.70 3.11x
ModernBert (1-Block, seq=16) 1308.25 438.92 2.98x

Private LLM Inference — Fission Evaluator Mode (ms)

Model CuRL (PyTorch, ms) PriX (JAX, ms) Speedup (CuRL / PriX)
BertTiny (2-Block, seq=16) 253.73 118.94 2.13x
BertBase (1-Block, seq=16) 1594.26 398.84 4.00x
GPT2 (1-Block, seq=16) 2142.77 379.05 5.65x
Llama (1-Block, d=768, seq=16) 1573.41 326.26 4.82x
ModernBert (1-Block, seq=16) 1048.27 239.21 4.38x

MPC Primitives & Wavelet LUT Microbenchmarks on CPU (ms)

Benchmark CuRL (PyTorch, ms) PriX (JAX, ms) Speedup (CuRL / PriX)
Private MatMul (128x128) 28.12 7.90 3.56x
Private Mul (128x128) 8.35 7.20 1.16x
EGK TruncPr (128x128) 3.94 3.63 1.08x
Comparison / ReLU (32x64) 26.90 19.22 1.40x
Exp [Haar LUT] (32x64) 62.06 27.29 2.27x
Reciprocal [Haar LUT] (32x64) 41.72 10.56 3.95x
InvSqrt [Haar LUT] (32x64) 124.84 18.90 6.61x
GeLU [Haar LUT] (32x64) 26.80 6.10 4.39x
SiLU [Haar LUT] (32x64) 32.54 9.01 3.61x
Softmax [LUT] (4x32x32) 276.64 205.43 1.35x
LayerNorm [LUT] (4x32x64) 44.89 16.94 2.65x

Disclaimer

This is software for a research prototype and not production-ready code. This repository builds upon JAX.

Metadata

Release files for prix-jax 0.1.0

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

Source distribution (sdist)

Source distribution for prix-jax 0.1.0
File Size Uploaded Provenance Actions
prix_jax-0.1.0.tar.gz 65.6 kB With provenance Details for prix_jax-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for prix-jax 0.1.0
File Interpreter ABI Platform Actions
prix_jax-0.1.0-py3-none-any.whl Python 3 none any Details for prix_jax-0.1.0-py3-none-any.whl

Total release size: 132.8 kB

Release files / prix_jax-0.1.0.tar.gz

Download URL prix_jax-0.1.0.tar.gz
Size 65.6 kB
Tags Source
SHA-256 checksum
How to use checksums
27485ab4b48fdc2713f521efee27d3d0b7af288f3b389f8e0235580be8533991
BLAKE2b-256 checksum
How to use checksums
d24b57e4a87033b9d865f5bdb503a9b93014a98b025cc9ceceefa1d581c597f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / prix_jax-0.1.0-py3-none-any.whl

Download URL prix_jax-0.1.0-py3-none-any.whl
Size 67.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d36f8fa88a42a2177f31cc83f947c71df9da4ea9c53c353aa0e61162cb4db338
BLAKE2b-256 checksum
How to use checksums
1e30c611b99717dbf86f62d49c069b0637d0d28d020a1b36a3755cdb4c4a6b9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for prix-jax 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for prix_jax-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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