Skip to main content

An implementation of the E1 protein language model family with Jax/Equinox.

Project description

e1-jax

A minimal implementation of the E1 protein language model family with Jax/Equinox. Logits and embeddings match those given by authors repository.

Dependencies are managed with uv. To install them, run uv sync.

Currently, only single sequence inference is supported.

Installation

Requires Python 3.10+.

pip install e1jax

Example

The implementation is compatible with equinox.filter_{vmap, jit} for batched and jitted inference.

The model can be one of E1-150m, E1-300m, E1-600m.

import e1jax

seq = "AAAAA?C"
pad_length = 10
tokenized = e1jax.tokenize(seq)
tokenized = e1jax.pad_and_mask(tokenized, pad_length=pad_length)

model = e1jax.E1.from_pretrained("E1-300m")

logits, embeddings = model(**tokenized._asdict())

# to remove boundary tokens and padding
lb, rb = 2, -2-pad_length
logits, embeddings = logits[lb:rb], embeddings[lb:rb]

assert logits.shape[0] == len(seq)
assert embeddings.shape[0] == len(seq)

Citations

 @article{Jain_Beazer_Ruffolo_Bhatnagar_Madani_2025,
    title={E1: Retrieval-Augmented Protein Encoder Models},
    url={https://www.biorxiv.org/content/early/2025/11/13/2025.11.12.688125},
    DOI={10.1101/2025.11.12.688125},
    journal={bioRxiv},
    publisher={Cold Spring Harbor Laboratory},
    author={Jain, Sarthak and Beazer, Joel and Ruffolo, Jeffrey A and Bhatnagar, Aadyot and Madani, Ali},
    year={2025}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

e1jax-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

e1jax-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file e1jax-0.1.0.tar.gz.

File metadata

  • Download URL: e1jax-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for e1jax-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4e2f7b5c6e042feabc36c8dfa4858cbec3f06fe8635e7b1fbc0d39380e31121d
MD5 fbdb3c1c6f937814eec5dcb299badb22
BLAKE2b-256 dfff85ede0a8a6b8c5279e86011d0080f43cd8fd0d8154e142bc35fd7e43480a

See more details on using hashes here.

File details

Details for the file e1jax-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: e1jax-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for e1jax-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce6c69794dfd4f50f3bbd63d6db4f018d822d41a3db54f17012c75f09b914920
MD5 d81d3fe5df9616dbd5caf6d7fbb4a59c
BLAKE2b-256 b59f3951384c5b014a703e0d3c4d396483a43386d8e1f4b5f9f601d104a024d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page