Skip to main content

JAX Models

license-shield

release-shield

python-shield

code-style

Table of Contents
    <li>
    
      <a href="#about-the-project">About The Project</a>
    
    </li>
    
    <li>
    
      <a href="#getting-started">Getting Started</a>
    
      <ul>
    
        <li><a href="#prerequisites">Prerequisites</a></li>
    
        <li><a href="#installation">Installation</a></li>
    
        <li><a href="#usage">Usage</a></li>
    
      </ul>
    
    </li>
    
    <li><a href="#contributing">Contributing</a></li>
    
    <li><a href="#license">License</a></li>
    
    <li><a href="#contact">Contact</a></li>
    

About The Project

The JAX Models repository aims to provide open sourced JAX/Flax implementations for research papers originally without code or code written with frameworks other than JAX. The goal of this project is to make a collection of models, layers, activations and other utilities that are most commonly used for research. All papers and derived or translated code is cited in either the README or the docstrings. If you think that any citation is missed then please raise an issue.

All implementations provided here are available on Papers With Code.


Available model implementations for JAX are:

  1. MetaFormer is Actually What You Need for Vision (Weihao Yu et al., 2021)

  2. Augmenting Convolutional networks with attention-based aggregation (Hugo Touvron et al., 2021)

  3. MPViT : Multi-Path Vision Transformer for Dense Prediction (Youngwan Lee et al., 2021)

  4. MLP-Mixer: An all-MLP Architecture for Vision (Ilya Tolstikhin et al., 2021)

  5. Patches Are All You Need (Anonymous et al., 2021)

  6. SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers (Enze Xie et al., 2021)

  7. A ConvNet for the 2020s (Zhuang Liu et al., 2021)

  8. Masked Autoencoders Are Scalable Vision Learners (Kaiming He et al., 2021)

  9. Swin Transformer: Hierarchical Vision Transformer using Shifted Windows (Ze Liu et al., 2021)

  10. Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions (Wenhai Wang et al., 2021)

  11. Going deeper with Image Transformers (Hugo Touvron et al., 2021)

  12. Visual Attention Network (Meng-Hao Guo et al., 2022)


Available layers for out-of-the-box integration:

  1. DropPath (Stochastic Depth) (Gao Huang et al., 2021)

  2. Squeeze-and-Excitation Layer (Jie Hu et al. 2019)

  3. Depthwise Convolution (François Chollet, 2017)

Prerequisites

Prerequisites can be installed separately through the requirements.txt file in the main directory using:

pip install -r requirements.txt

The use of a virtual environment is highly recommended to avoid version incompatibilites.

Installation

This project is built with Python 3 for the latest JAX/Flax versions and can be directly installed via pip.

pip install jax-models

If you wish to use the latest version then you can directly clone the repository too.

git clone https://github.com/DarshanDeshpande/jax-models.git

Usage

To see all model architectures available:

from jax_models import list_models

from pprint import pprint



pprint(list_models())

To load your desired model:

from jax_models import load_model

load_model('swin-tiny-224', attach_head=True, num_classes=1000, dropout=0.0, pretrained=True)

Note: It is necessary to pass attach_head=True and num_classes while loading pretrained models.

Contributing

Please raise an issue if any implementation gives incorrect results, crashes unexpectedly during training/inference or if any citation is missing.

You can contribute to jax_models by supporting me with compute resources or by contributing your own resources to provide pretrained weights.

If you wish to donate to this inititative then please drop me a mail here.


License

Distributed under the Apache 2.0 License. See LICENSE for more information.

Contact

Feel free to reach out for any issues or requests related to these implementations

Darshan Deshpande - Email | Twitter | LinkedIn

Metadata

Release files for jax-models 0.0.5

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

Source distribution (sdist)

Source distribution for jax-models 0.0.5
File Size Uploaded Provenance Actions
jax_models-0.0.5.tar.gz 34.3 kB Without provenance Details for jax_models-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jax-models 0.0.5
File Interpreter ABI Platform Actions
jax_models-0.0.5-py3-none-any.whl Python 3 none any Details for jax_models-0.0.5-py3-none-any.whl

Total release size: 80.5 kB

Release files / jax_models-0.0.5.tar.gz

Download URL jax_models-0.0.5.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fa287d315abdadd8320cda4571f41719fef76c32fca4e0b815ed0b110388209d
BLAKE2b-256 checksum
How to use checksums
7fac6ceb15fec6b329717e125fd714f479400d3542d52e6913a020cf77d86e64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.7

Release files / jax_models-0.0.5-py3-none-any.whl

Download URL jax_models-0.0.5-py3-none-any.whl
Size 46.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42de33bbd3cb2dbf24dfbf662af9a0f8c0b6b38cf0b20df20d365bf639b529d1
BLAKE2b-256 checksum
How to use checksums
1d8072d0e626af62eea972fa127b75fd58cffb13add076df69edd0118282601e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.7

Security for jax-models 0.0.5

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.

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