umapjax
UMAP, but accelerated. (Experimental implementation)
umapjax inherits the API of umap-learn. The UmapJax class is a drop-in replacement for umap.UMAP, with a few key differences:
umapjaxdoes not supportdensmap.umapjaxdoes not supportoutput_metricother thaneuclidean.
Note: umapjax does not fully replicate umap-learn and care should be used when interpreting results.
This package implements the following backends (despite being named umapjax):
torch(PyTorch)mx(MLX)jax(JAX)
Getting started
import umapjax
layout_backend: Literal["jax", "mx", "torch"] = "jax"
spectral_backend: Literal["jax", "scipy", "torch"] = "scipy"
batch_size: int | None = None # Defaults to X.shape[0]
model = umapjax.UmapJax(
n_neighbors=15,
layout_backend=layout_backend,
spectral_backend=spectral_backend
)
embedding = model.fit_transform(X)
If the optimization is slow, try increasing the batch size as a multiple of X.shape[0]. All backends will automatically use accelerated hardware if available.
If using "torch", you can set umapjax.layouts.torch.TORCH_DEVICE and umapjax.spectral.torch.TORCH_DEVICE to control the default device used for the layout and spectral embedding, respectively.
Implementation details
The implementaion used in umapjax is very similar to the one used in umap-learn; however, rather than a single step updating one single point, we update a set of points in parallel using jax. The gradients of the points are weighted by edge weights, which control sampling frequencies in the original algorithm. If results look strange, try changing n_epochs or batch_size. The batch_size argument can also be used to control acceleration on GPUs/TPUs.
Installation
You need to have Python 3.11 or newer installed on your system. If you don't have Python installed, we recommend installing uv.
There are several alternative options to install umapjax:
- Install the latest release of
umapjaxfrom PyPI with a preferred backend:
pip install "umapjax[jax,mlx,torch]"
- Install the latest development version:
pip install "umapjax[jax,mlx,torch] @ git+https://github.com/adamgayoso/umapjax.git@main"
Contact
If you found a bug, please use the issue tracker.
Citation
t.b.a
Release files for umapjax 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| umapjax-0.1.0.tar.gz | 127.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| umapjax-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:154.1 kB
Release files / umapjax-0.1.0.tar.gz
| Download URL | umapjax-0.1.0.tar.gz |
|---|---|
| Size | 127.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fc8b994bbaf155d7d08d27d3ee79ef6189d8ab5e46e8b24d3664cb331d07471
|
|
BLAKE2b-256 checksum How to use checksums |
63b43ead1e48a4df5908ddda2c1cf5ae91fcb36b3cc204df048ab669fbc53c36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 30, 2026.
Transparency logRelease files / umapjax-0.1.0-py3-none-any.whl
| Download URL | umapjax-0.1.0-py3-none-any.whl |
|---|---|
| Size | 26.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c06e5ba443d8a28f10c4908355839349402a23c69ef492a1be7b3cc876e999eb
|
|
BLAKE2b-256 checksum How to use checksums |
00bcdc42366d5f3d13cff3b2513c94524f5393984d4b9806a27fdcfaba168dbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 30, 2026.
Transparency log