Gradient Informed, GPU Accelerated Lens modelling (GIGA-Lens) is a package for fast and rigorous Bayesian inference on strong gravitational lenses, with support for multi-device and multi-node GPU acceleration for large-scale inference workloads. For details, please see our original paper and our latest paper. Documentation is provided here.
Note: Documentation follows our Github release, which will be updated pending paper acceptance
Installation
GIGA-Lens can be installed via pip:
pip install gigalens[cuda]
If you wish to test the installation, tests can be run simply by running tox in the root directory.
If you don’t have access to institutional GPUs, one easy way is to use GPU on Google Colab. Please remember the very first cell should have !pip install gigalens[cuda].
If you do have access to institutional GPUs, you can set up a notebook to run on GPU. For example, at NESRC, for running GIGA-Lens on a single GPU node, you can choose the kernel tensorflow-2.6.0, and include in the first cell: !pip install gigalens[cuda].
Demo Notebooks
The notebooks below demonstrate some examples of lens modeling with JAX and Tensorflow respectively. For the quickstart notebooks, you can run them directly using Google Colab.
Requirements
Python Version >= 3.12
The following packages are requirements for GIGA-Lens. However, we recommend using pip to avoid issues with subpackage dependencies.
jax==0.6.2
tensorflow-probability==0.25.0
lenstronomy>=1.13.2,<2.0.0
optax>=0.2.6,<0.3.0
objax>=1.8.0,<2.0.0
numpy>=2.0.2
tqdm>=4.67.1,<5.0.0
Cite:
@misc{huang2026gigalens20stronglensmodeling,
title={GIGA-Lens 2.0: Strong-Lens Modeling on Multiple GPU Nodes},
author={Xiaosheng Huang and Linus Upson and Nicolas Ratier-Werbin and Harry Lu and Sean Xu and Elden Yap and Evan Odell and Ansel Parke and Harsh Ambardekar and Saul Baltasar and Nestor Demeure and Bradley Richardson and Andi Gu and Yuan-Ming Hsu and Junyi Liu},
year={2026},
eprint={2606.30633},
archivePrefix={arXiv},
primaryClass={astro-ph.CO},
url={https://arxiv.org/abs/2606.30633},
}
Metadata
Release files for gigalens 2.0.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 |
|---|---|---|---|---|
| gigalens-2.0.1.tar.gz | 335.8 kB | Without provenance | Details for gigalens-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gigalens-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for gigalens-2.0.1-py3-none-any.whl |
Total release size: 681.1 kB
Release files / gigalens-2.0.1.tar.gz
| Download URL | gigalens-2.0.1.tar.gz |
|---|---|
| Size | 335.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b854369bf6cc68ccaf5f0991bbd697f78c48d648ab57321a2ed87b05ae4a25be
|
|
BLAKE2b-256 checksum How to use checksums |
7ab58bcda77ed1435cdf08f2958ab83de6521ea2a86fe5d2d7721bfca8542585
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / gigalens-2.0.1-py3-none-any.whl
| Download URL | gigalens-2.0.1-py3-none-any.whl |
|---|---|
| Size | 345.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7a0dc0a0a9af1af3ed36ec41bcb372a7adafbfeece3955259362c7bcb841146
|
|
BLAKE2b-256 checksum How to use checksums |
975642574106e8f1f8408e61c6b7ccf1572a20ec34309f490b2f0784222bcdd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for gigalens 2.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.