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.3.0.tar.gz (8.0 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.3.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: e1jax-0.3.0.tar.gz
  • Upload date:
  • Size: 8.0 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.3.0.tar.gz
Algorithm Hash digest
SHA256 a8caf4be2521479ca37ced25152532add2c7fa49a5537cf0d9c019c53752631f
MD5 d788f3fea29bc15919e9ba3ac28dd299
BLAKE2b-256 2940401b0f3d2741fb199c6b74c8d876aef280863d3dfddc2b75c60274f8e8f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: e1jax-0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5664975fd429ce9e6b68caec2561cc59a6adcc4eebde519a0c9950c08cf095d6
MD5 806c0c490d8d834e7b47070208a8eb1d
BLAKE2b-256 5c60352a752e364e7249b9084f4c001c2de5d547e36029fab8012d258baa0a3c

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