/ Модель

Характеристики

Параметры
1,8 млрд
Размер весов
5,6 ГБ
Лицензия
MIT
Архитектура
fast_esm3 · dense
Библиотека
transformers
Опубликована
28 мая 2026

ESM3_small

ЭмбеддингиТекст → embedding3 профессии

Белковая модель ESM3 на 1,8 млрд параметров извлекает представления из последовательностей, структур и функциональных треков белков.

196скачиваний за 30 дней0лайковвеса обновлены9 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Synthyra/ESM3_small — опубликованная компанией Synthyra версия контрольной точки biohub/esm3-sm-open-v1 с runtime FastPLMs для Transformers. Это белковая языковая модель ESM3 с плотной архитектурой FastESM3 и 1,8 млрд параметров, предназначенная для извлечения представлений белков и использования в биологических задачах. Входные данные включают последовательности, структуры и функциональные треки, подготовленные мультимодальными помощниками ESM3; основное назначение модели в карточке — feature extraction.

Модель загружается через стандартный интерфейс Transformers. Её представления можно использовать для построения эмбеддингов белков и как основу для последующей классификации последовательностей или остатков. Классификационные головы, создаваемые AutoModel-классами, инициализируются заново и требуют дообучения, прежде чем их выходы можно интерпретировать как предсказания. Лицензия — MIT.

Сценарии применения

  • получение эмбеддингов белковых последовательностей
  • извлечение представлений белковых структур и функциональных треков
  • подготовка признаков белков для последующей классификации
  • создание эмбеддингов наборов белков из FASTA-файла

Ограничения

Классификационные головы для последовательностей и остатков не обучены и требуют дообучения. Test-time training увеличивает задержку и расход памяти, может ухудшить результат и сам по себе не подтверждает биологическую функцию.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

ESM3 Small

Model overview

Synthyra/ESM3_small packages the biohub/esm3-sm-open-v1 checkpoint with the FastPLMs runtime for Hugging Face Transformers. It accepts sequence, structure, and function tracks prepared through the multimodal helpers.

The repository uses the standard Transformers loading interface with trust_remote_code=True. See Technical details for each registered class and whether its weights come from the checkpoint.

The sequence- and token-classification classes reuse the pretrained backbone, but their task heads are newly initialized. Fine-tune those heads before interpreting their logits as predictions.

Install and platform requirements

Install the direct dependencies published with this model:

python -m pip install -r \
  "https://huggingface.co/Synthyra/ESM3_small/resolve/main/requirements.txt"

The FastPLMs implementation itself is embedded in the model repository. Transformers loads it through trust_remote_code=True.

This model requires Python 3.12-3.14, PyTorch 2.14, and Transformers 5.17.

The CPU gate covers small offline tests. Published checkpoint throughput and parity require the documented device tier.

The Hub quick start needs network access for the first download. For an air-gapped run, build the manifest-pinned local artifact first and use the offline example.

Quick start

from transformers import AutoModel

model_id = "Synthyra/ESM3_small"
model = AutoModel.from_pretrained(
    model_id,
    trust_remote_code=True,
    attn_implementation="sdpa",
).eval()

For offline validation, replace model_id with the manifest-built dist/hub/ESM3_small path. Pass local_files_only=True.

Attention backends

The quick start uses sdpa.

Available backends are eager, sdpa, flex_attention. Requesting an unavailable backend raises instead of silently changing implementation.

output_attentions=True can use the documented one-call eager fallback to materialize attention tensors. The configured backend does not change.

Dataset embeddings

The shared embedding mixin keeps input order and biological-position masking. It accepts sequences, identified records, mappings, or a FASTA path:

pooled = model.embed_dataset(
    ["MSTNPKPQRKTKRNT", "MKTIIALSYIFCLVFA"],
    batch_size=2,
    pooling=("mean", "std"),
)
residues = model.embed_dataset(
    ["MSTNPKPQRKTKRNT"],
    full_embeddings=True,
)
print(pooled[0].tensor.shape)   # (2 * d,)
print(residues[0].tensor.shape) # (l, d)

Set output and format="safetensors" or "sqlite" for transactional, bounded-memory storage. Resume checks input order, model state, tokenizer policy, backend, dtype, and pooling configuration before it appends data.

Downstream prediction

The sequence and token prediction AutoClasses use the checkpoint backbone and create a new, untrained classifier. Sequence labels have shape (b,). Residue labels have shape (b, l) and use -100 outside biological positions.

import torch

from transformers import AutoTokenizer
from transformers import (
    AutoModelForSequenceClassification,
    AutoModelForTokenClassification,
)


model_id = "Synthyra/ESM3_small"
sequence_model = AutoModelForSequenceClassification.from_pretrained(
    model_id, num_labels=2, trust_remote_code=True
).eval()
token_model = AutoModelForTokenClassification.from_pretrained(
    model_id, num_labels=3, trust_remote_code=True
).eval()
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
sequences = ["MSTNPKPQRKTKRNT", "MKTIIALSYIFCLVFA"]
batch = tokenizer(sequences, padding=True, return_tensors="pt")
biological = batch["attention_mask"].bool()  # (b, l)
for special_id in tokenizer.all_special_ids:
    biological &= batch["input_ids"].ne(special_id)  # (b, l)

sequence_labels = torch.zeros(len(sequences), dtype=torch.long)  # (b,)
token_labels = torch.full_like(batch["input_ids"], -100)  # (b, l)
token_labels[biological] = 0  # selected biological positions; labels stay (b, l)

with torch.inference_mode():
    sequence_output = sequence_model(**batch, labels=sequence_labels)
    token_output = token_model(**batch, labels=token_labels)
print(sequence_output.logits.shape)  # (b, 2)
print(token_output.logits.shape)     # (b, l, 3)

PEFT fine-tuning

Install the training dependencies. Then attach LoRA to the loaded checkpoint:

python -m pip install "datasets>=5.0" "peft>=0.21"
from peft import LoraConfig, TaskType, get_peft_model


peft_model = get_peft_model(
    sequence_model,
    LoraConfig(
        task_type=TaskType.SEQ_CLS,
        r=8,
        lora_alpha=16,
        target_modules="all-linear",
        modules_to_save=["classifier"],
    ),
)

This checkpoint advertises a classification head. Save the separately trained classifier with the adapter. All FastPLMs checkpoints follow the Transformers PreTrainedModel contract and can use PEFT. The ESM2-specific shipped CLI is an example, not a support boundary. Record the target modules, base revision, data identity, and trainable parameter scope.

Test-time training

TTT samples masked views of one protein and updates only injected low-rank adapters. Base checkpoint weights stay frozen:

from transformers import AutoModel


ttt_model = AutoModel.from_pretrained(
    "Synthyra/ESM3_small",
    trust_remote_code=True,
)
metrics = ttt_model.ttt(
    seq="MSTNPKPQRKTKRNT",
    ttt_config={"steps": 3, "batch_size": 1, "seed": 7},
)
ttt_model.save_pretrained("adapted", safe_serialization=True)
ttt_model.ttt_reset()
print(metrics)

Saved adapters retain their deterministic reset state. TTT adds latency and memory, can worsen an output, and does not show biological function.

Sequence inference and masked-sequence generation

ESM3 prepares its sequence input. This example uses the sequence track. The public input contract also supports structure and function tracks through the multimodal helpers:

import torch


batch = model.tokenize_sequences(
    ["MKTAYIAKQ", "GGGG"],
    device=model.device,
)
with torch.inference_mode():
    output = model(**batch)

print(output.last_hidden_state.shape)
print(output.logits.shape)
print(output.structure_logits.shape)
print(output.function_logits.shape)

When return_dict=False, ESM3 uses the standard base-model tuple prefix: last_hidden_state, then requested hidden_states and attentions. Multimodal logits and extensions follow this prefix. Use named fields for individual tracks.

Generate masked sequence positions with an explicit seed:

from fastplms.models.esm3.modeling_esm3 import FastESM3GenerationConfig


config = FastESM3GenerationConfig(
    num_steps=8,
    temperature=1.0,
    seed=7,
)
generated = model.generate("MK____A", config)
print(generated)

Underscores mark positions to generate. Model outputs are track predictions, not experimental measurements of structure or function.

Technical details

  • Inputs: Sequence, structure, and function tracks prepared through the multimodal helpers
  • Transformers classes: AutoConfig, AutoModel, AutoModelForSequenceClassification, AutoModelForTokenClassification
  • Checkpoint weights: AutoConfig = FastPLMs extension, AutoModel = pretrained, AutoModelForSequenceClassification = base weights + untrained task head, AutoModelForTokenClassification = base weights + untrained task head
  • Attention backends: eager, sdpa, flex_attention
  • Precision: default
  • BF16 execution: fp32_parameters_autocast
  • Generation contract: not_applicable
  • Dependencies: core
  • Weight publication allowed: true
  • Weight license status: resolved
  • Redistributable: true
  • Complete weight publication required: false

Validation and sources

FastPLMs pins the checkpoint, upstream source revisions, state transformation, and required files in models.toml. Built artifacts record exact source identities and conversion details in source-record.json.

  • FastPLMs checkpoint: Synthyra/ESM3_small
  • Runtime revision: recorded separately in the built artifact and published commit
  • Runtime source identities: recorded in source-record.json
  • Official checkpoint: biohub/esm3-sm-open-v1
  • Artifact source: fast
  • State transform: esm3_to_fastplms_v1
  • Pinned upstreams: biohub-esm, biohub-transformers
  • Release tiers: check, compliance, feature, artifact, benchmark
  • Unresolved required file identities: 0

Release validation includes the compliance tier. Its evidence identifies the checkpoint, backend, dtype, hardware, inputs, and reference revision.

Declared tiers compare configuration, tokenizer behavior, state, and representative inference with the pinned reference. A nonzero unresolved count blocks release. Metadata alone does not show that a build passed, that a backend is faster, or that an output is biologically valid.

License

Checkpoint terms: MIT. The Hub model-card identifier is mit. The local artifact contains applicable source licenses, notices, attribution, and conversion records. Review them before use.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
FastESM3Model
Ревизия весов
231e379

0 моделей