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.

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.dev0.tar.gz (7.8 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.dev0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: e1jax-0.1.0.dev0.tar.gz
  • Upload date:
  • Size: 7.8 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.dev0.tar.gz
Algorithm Hash digest
SHA256 26fa270462d3f6affbbbf97bc2abe014499d2acc46065b4afeac25e1e27fc1a0
MD5 c21c925e27ec8c741fb59b322474cd15
BLAKE2b-256 5dd918b07b9de2386a9f0b63c9b9d64bb95ff1e57ad7376441f2bd6375f05aca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: e1jax-0.1.0.dev0-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.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd6971751795cc16be05ef3019c05a953c208ccb192725466da058731c6b6e16
MD5 424ba5646277d1207c429068f51ef385
BLAKE2b-256 4faa07d12f82f54ad4e84a07ceb471f266163a21779839a999f134ca647bbe76

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