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},
}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gigalens-2.0.1.tar.gz.
File metadata
- Download URL: gigalens-2.0.1.tar.gz
- Upload date:
- Size: 335.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b854369bf6cc68ccaf5f0991bbd697f78c48d648ab57321a2ed87b05ae4a25be
|
|
| MD5 |
72d9d920119cae2333dcff32d93515e5
|
|
| BLAKE2b-256 |
7ab58bcda77ed1435cdf08f2958ab83de6521ea2a86fe5d2d7721bfca8542585
|
File details
Details for the file gigalens-2.0.1-py3-none-any.whl.
File metadata
- Download URL: gigalens-2.0.1-py3-none-any.whl
- Upload date:
- Size: 345.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7a0dc0a0a9af1af3ed36ec41bcb372a7adafbfeece3955259362c7bcb841146
|
|
| MD5 |
5a51389f75e5cdb462f7edcc37be0f8a
|
|
| BLAKE2b-256 |
975642574106e8f1f8408e61c6b7ccf1572a20ec34309f490b2f0784222bcdd7
|