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.2.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.2.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: e1jax-0.2.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","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.2.0.tar.gz
Algorithm Hash digest
SHA256 a3c9baed18f02517a15cb7942239db92e5369dc30340fb58b66620f9e2c859b1
MD5 a929d8b2b2fbd532f411b1a6cf9c7ecc
BLAKE2b-256 cb7ab94b9ceab5b66564b785db11ee38539a2825ab48a60a6cdf3d8cb2971bac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: e1jax-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a51b59d5be30dbb26c728b3cdb98c2295e4dd0cd67cea6c26a1138019216c4a
MD5 eda53cea7e156b4a50bfc96486403ece
BLAKE2b-256 8d89c1f90de964c2dad817d2526d95ef454112e48c06fbd768010463b19a1356

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