Tesseract-JAX
Tesseract-JAX is a lightweight extension to Tesseract Core that makes Tesseracts look and feel like regular JAX primitives, and makes them jittable, differentiable, and composable.
Read the docs | Explore the examples | Report an issue | Talk to the community | Contribute
The API of Tesseract-JAX consists of a single function, apply_tesseract(tesseract_client, inputs), which is fully traceable by JAX. This enables end-to-end autodifferentiation and JIT compilation of Tesseract-based pipelines:
@jax.jit
def vector_sum(x, y):
res = apply_tesseract(vectoradd_tesseract, {"a": {"v": x}, "b": {"v": y}})
return res["vector_add"]["result"].sum()
jax.grad(vector_sum)(x, y) # 🎉
Quick start
-
Install Tesseract-JAX and get the example Tesseracts:
$ pip install tesseract-jax $ git clone https://github.com/pasteurlabs/tesseract-jax
-
Use a Tesseract as part of a JAX program via the JAX-native
apply_tesseractfunction:import jax import jax.numpy as jnp from tesseract_core import Tesseract from tesseract_jax import apply_tesseract # Serve the Tesseract in its own process (its environment is built on first use) t = Tesseract.from_source("tesseract-jax/examples/simple/vectoradd_jax/tesseract_api.py") t.serve() # Run it with JAX x = jnp.ones((1000,)) y = jnp.ones((1000,)) def vector_sum(x, y): res = apply_tesseract(t, {"a": {"v": x}, "b": {"v": y}}, vmap_method="sequential") return res["vector_add"]["result"].sum() vector_sum(x, y) # success! # You can also use it with JAX transformations like JIT and grad vector_sum_jit = jax.jit(vector_sum) vector_sum_jit(x, y) vector_sum_grad = jax.grad(vector_sum) vector_sum_grad(x, y) # vmap requires an explicit vmap_method — "sequential" is safe but slow # while "auto_experimental" or "expand_dims" is more efficient for Tesseracts that support batching. # See https://docs.pasteurlabs.ai/projects/tesseract-jax/latest/content/vmap-methods.html vector_sum_vmap = jax.vmap(vector_sum) vector_sum_vmap(x.reshape(10, 100), y.reshape(10, 100))
-
To share or deploy the Tesseract, build the same folder into a container image (this step requires Docker) and replace
from_sourcewithfrom_image:$ tesseract build tesseract-jax/examples/simple/vectoradd_jax
t = Tesseract.from_image("vectoradd_jax")
Use
Tesseract.from_url(...)to reach a Tesseract that is already running elsewhere.apply_tesseractworks the same way with all three.
Sharp edges
- Additional required endpoints: Tesseract-JAX requires the
abstract_evalTesseract endpoint to be defined to enable JAX tracing and FFI dispatch. To run a Tesseract that has noabstract_evalendpoint, call it directly through the Tesseract client instead. Additionally, many gradient transformations likejax.gradrequirevector_jacobian_productto be defined.
- Non-array outputs come from
abstract_eval: anOutputSchemafield that is not an array, such as astror abool, cannot enter a traced computation. As such, non-array outputs returned byapplyare ignored and their value is instead taken fromabstract_eval.apply_tesseractwarns when the two differ; passcheck_static_outputs=Falseor setTESSERACT_JAX_CHECK_STATIC_OUTPUTS=0to skip the comparison. A field whose value depends on the input values belongs in the schema as an array.
License
Tesseract-JAX is licensed under the Apache License 2.0 and is free to use, modify, and distribute (under the terms of the license).
Tesseract is a registered trademark of Pasteur Labs, Inc. and may not be used without permission.
Metadata
Release files for tesseract-jax 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tesseract_jax-0.5.1.tar.gz | 68.0 kB | With provenance | Details for tesseract_jax-0.5.1.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tesseract_jax-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for tesseract_jax-0.5.1-py3-none-any.whl |
| tesseract_jax-0.5.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details for tesseract_jax-0.5.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
| tesseract_jax-0.5.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl | CPython 3.12 | abi3 | Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 | Details for tesseract_jax-0.5.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
Total release size: 558.3 kB
Release files / tesseract_jax-0.5.1.tar.gz
| Download URL | tesseract_jax-0.5.1.tar.gz |
|---|---|
| Size | 68.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
682531dfe0cb72f3f949e66d510b679871911a662909ed3276e7cae74d1fd07a
|
|
BLAKE2b-256 checksum How to use checksums |
c90beefd57ac4fed089678cfd5e18056f21e575318db7237f7277ed351be6d43
|
| 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 26, 2026.
Transparency logRelease files / tesseract_jax-0.5.1-py3-none-any.whl
| Download URL | tesseract_jax-0.5.1-py3-none-any.whl |
|---|---|
| Size | 64.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ba120201945764855071ae815ecc378ef583baf6f4c4ebbf149ad2b6ed7772a
|
|
BLAKE2b-256 checksum How to use checksums |
a27a0cdfce904070f7fc97deb5250fa672096b9df4b72e786d91df56ccd78860
|
| 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 26, 2026.
Transparency logRelease files / tesseract_jax-0.5.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tesseract_jax-0.5.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 220.9 kB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
655386d128d3e28467c6b8cb1c8d077006c6ee48a0f74c22c4a890cba326a8c3
|
|
BLAKE2b-256 checksum How to use checksums |
6cf0d0e6eda39fdd3b856c9cf27aed43adfe38fd04d756b3de0afe25afbda44c
|
| 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 26, 2026.
Transparency logRelease files / tesseract_jax-0.5.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | tesseract_jax-0.5.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 205.2 kB |
| Tags | CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
afdb89a6f07d4c3376361c4a8ac6432a751a0acb1fc11612efb97267be805c5d
|
|
BLAKE2b-256 checksum How to use checksums |
faa0cbce744e7751e829acb92844c3051defa5897dbb41dbce01f327c921d3b8
|
| 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 26, 2026.
Transparency logSecurity for tesseract-jax 0.5.1
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
All 4 files in this release have been uploaded with provenance metadata.
Attestation for tesseract_jax-0.5.1.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 26, 2026.
Transparency logA 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.