Skip to main content

OPLM

One open project, two models:

  • OPLM is a protein language model. Give it protein sequences and it gives back per-residue and per-protein embeddings, plus amino-acid logits.
  • OPLMFold predicts protein structure on top of OPLM.

The weights, the exact training data and how it was built, and the full recipe are all open (weights and data are being published now).

Install

pip install oplm

Python 3.11 or newer. That is all you need for embeddings. OPLMFold will ship as an install extra once it is ready.

Quickstart

Embed sequences

import torch
from oplm import LogitsConfig, OplmForMaskedLM

# Placeholder: this name does not work yet. Until checkpoints are published,
# point at a local model directory.
model = OplmForMaskedLM.from_pretrained("brineylab/oplm-170M").eval()

sequences = ["MSHHWGYGKHNGPEHWHKDFPIAKGERQSPVDIDTHTAKYDPSLKPLSVSYDQATSLRIL", "MEEPQSDPSVEPPLSQ"]
with torch.no_grad():
    out = model.logits(sequences, LogitsConfig(return_embeddings=True))

out.embeddings  # (B, T, hidden_size) per residue, each sequence wrapped as <cls> ... <eos>
per_protein = torch.stack(
    [out.embeddings[i, 1 : 1 + len(s)].mean(0) for i, s in enumerate(sequences)]
)  # (B, hidden_size): the mean over each sequence's residues

out.sequence_logits holds the per-residue amino-acid logits. The slice assumes each sequence fits the model's context (model.config.max_position_embeddings - 2 residues); for longer ones see the length limit in docs/inference.md. Batching, GPUs, pooling options and the transformers Auto* classes are covered in docs/inference.md.

Coming from ESM-C? The API mirrors it: the same LogitsConfig and LogitsOutput, and the same 33-token vocabulary. The differences are listed in docs/inference.md, Coming from ESM-C?.

Predict a structure

Coming soon. OPLMFold is not usable yet. This section will hold the structure-prediction quickstart when it ships.

Models

OPLM

Coming soon. Trained checkpoints will be listed here, with the Hugging Face Hub name for each.

Pending: published OPLM checkpoints on the Hugging Face Hub (waiting on #62).

OPLMFold

Coming soon.

What you can do today, and what's coming

Today:

Coming:

Training and reproducing

The configs and recipe are in this repo, and the exact training data and checkpoints will be published too (some steps are still pending), so you can retrain OPLM yourself. docs/reproduce.md walks through it in order, from data to evaluation. Training at full scale needs a multi-node GPU cluster. Starting from a published checkpoint, for example to try a different decay phase, is much cheaper and has its own section there. OPLMFold training will get its own path later.

Documentation

docs/README.md lists every doc by what you want to do. The model itself is described in docs/architecture.md. Contributors start with AGENTS.md.

Citation

A paper is coming. Until then, cite the repository URL, https://github.com/briney/oplm, and the commit you used.

License

MIT. See LICENSE.

Metadata

Release files for oplm 0.5.0

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

Source distribution (sdist)

Source distribution for oplm 0.5.0
File Size Uploaded Provenance Actions
oplm-0.5.0.tar.gz 19.2 MB With provenance Details for oplm-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oplm 0.5.0
File Interpreter ABI Platform Actions
oplm-0.5.0-py3-none-any.whl Python 3 none any Details for oplm-0.5.0-py3-none-any.whl

Total release size: 19.7 MB

Release files / oplm-0.5.0.tar.gz

Download URL oplm-0.5.0.tar.gz
Size 19.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e966d7d2e16aac0a0f68c4de97d516dbb2c8f3e89138f846c0acfe24c1c7485c
BLAKE2b-256 checksum
How to use checksums
8bd2750a5a5123a88aa384be83aba5ed30509a2da7458fba7121aa6aaeeb0817
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / oplm-0.5.0-py3-none-any.whl

Download URL oplm-0.5.0-py3-none-any.whl
Size 529.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c9b72cce13292438f257edebb484e8be248dd832ed046586916cb6c154b13e3
BLAKE2b-256 checksum
How to use checksums
b9ac4c6d7fefe1f1f8c50c4e3b3c1cc47a217d831aa9f44b37f14fbfb2e07dab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for oplm 0.5.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for oplm-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

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