Transformers
Safetensors
t5
text2text-generation
protein-language-model
fastplms
custom_code
text-generation-inference
Instructions to use Synthyra/ANKH_large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Synthyra/ANKH_large with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Synthyra/ANKH_large", trust_remote_code=True) model = AutoModelForSeq2SeqLM.from_pretrained("Synthyra/ANKH_large", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update FastPLMs files
Browse files- README.md +8 -8
- fastplms/models.toml +8 -8
- fastplms_bundle.py +0 -0
- modeling_fastplms.py +9 -8
README.md
CHANGED
|
@@ -139,11 +139,11 @@ Pooling excludes boundary, padding, sentinel, and other non-biological
|
|
| 139 |
positions. Persisted results record the selected stack, layer, inputs, masks,
|
| 140 |
and alignment policy.
|
| 141 |
|
| 142 |
-
## Downstream
|
| 143 |
|
| 144 |
-
|
| 145 |
-
untrained `classifier`. Sequence labels have shape `(b,)`.
|
| 146 |
-
shape `(b, l)` and use `-100` outside biological positions
|
| 147 |
|
| 148 |
```python
|
| 149 |
import torch
|
|
@@ -286,10 +286,10 @@ masked-LM extension and is not an official ANKH head.
|
|
| 286 |
## Release record
|
| 287 |
|
| 288 |
- FastPLMs weights: `Synthyra/ANKH_large`
|
| 289 |
-
- Runtime revision: recorded in the built artifact and published commit
|
| 290 |
-
-
|
| 291 |
-
- Canonical transformed state
|
| 292 |
-
- Conversion equality attestation: recorded in
|
| 293 |
- Official checkpoint: `ElnaggarLab/ankh-large`
|
| 294 |
- Artifact source: `official`
|
| 295 |
- State transform: `ankh_t5_to_fastplms_v1`
|
|
|
|
| 139 |
positions. Persisted results record the selected stack, layer, inputs, masks,
|
| 140 |
and alignment policy.
|
| 141 |
|
| 142 |
+
## Downstream prediction
|
| 143 |
|
| 144 |
+
The sequence and token prediction AutoClasses use the checkpoint backbone and
|
| 145 |
+
create a new, untrained `classifier`. Sequence labels have shape `(b,)`.
|
| 146 |
+
Residue labels have shape `(b, l)` and use `-100` outside biological positions.
|
| 147 |
|
| 148 |
```python
|
| 149 |
import torch
|
|
|
|
| 286 |
## Release record
|
| 287 |
|
| 288 |
- FastPLMs weights: `Synthyra/ANKH_large`
|
| 289 |
+
- Runtime revision: recorded separately in the built artifact and published commit
|
| 290 |
+
- Runtime source identities: recorded in `source-record.json`
|
| 291 |
+
- Canonical transformed state identity: recorded in `source-record.json`
|
| 292 |
+
- Conversion equality attestation: recorded in `source-record.json`
|
| 293 |
- Official checkpoint: `ElnaggarLab/ankh-large`
|
| 294 |
- Artifact source: `official`
|
| 295 |
- State transform: `ankh_t5_to_fastplms_v1`
|
fastplms/models.toml
CHANGED
|
@@ -199,7 +199,7 @@ representative = "esmc_small"
|
|
| 199 |
documentation = "docs/models.md#esm-and-esmc"
|
| 200 |
test_tiers = ["check", "compliance", "feature", "artifact", "benchmark"]
|
| 201 |
runtime_paths = ["__init__.py", "registry.py", "runtime.py", "models.toml", "models/__init__.py", "attention", "embeddings", "models/esm_plusplus", "models/ttt.py"]
|
| 202 |
-
auto_map = { AutoConfig = "fastplms.models.esm_plusplus.modeling_esm_plusplus.ESMplusplusConfig", AutoModel = "fastplms.models.esm_plusplus.modeling_esm_plusplus.ESMplusplusModel", AutoModelForMaskedLM = "fastplms.models.esm_plusplus.modeling_esm_plusplus.ESMplusplusForMaskedLM" }
|
| 203 |
|
| 204 |
[families.esm3]
|
| 205 |
architecture = "ESM3"
|
|
@@ -223,7 +223,7 @@ representative = "esm3_small"
|
|
| 223 |
documentation = "docs/models.md#esm3"
|
| 224 |
test_tiers = ["check", "compliance", "feature", "artifact", "benchmark"]
|
| 225 |
runtime_paths = ["__init__.py", "registry.py", "runtime.py", "models.toml", "models/__init__.py", "attention", "embeddings", "models/esm3", "models/ttt.py"]
|
| 226 |
-
auto_map = { AutoConfig = "fastplms.models.esm3.modeling_esm3.FastESM3Config", AutoModel = "fastplms.models.esm3.modeling_esm3.FastESM3Model" }
|
| 227 |
|
| 228 |
[families.e1]
|
| 229 |
architecture = "E1"
|
|
@@ -370,8 +370,8 @@ conversion_provenance = "Input: the pinned native Meta ESMFold checkpoint plus i
|
|
| 370 |
representative = "esmfold"
|
| 371 |
documentation = "docs/models.md#esmfold"
|
| 372 |
test_tiers = ["check", "compliance", "structure", "feature", "artifact", "benchmark"]
|
| 373 |
-
runtime_paths = ["__init__.py", "registry.py", "runtime.py", "models.toml", "models/__init__.py", "attention", "embeddings", "models/_esm_rotary.py", "models/esmfold"]
|
| 374 |
-
auto_map = { AutoConfig = "fastplms.models.esmfold.modeling_fast_esmfold.FastEsmFoldConfig", AutoModel = "fastplms.models.esmfold.modeling_fast_esmfold.FastEsmForProteinFolding" }
|
| 375 |
|
| 376 |
[families.esmfold2]
|
| 377 |
architecture = "ESMFold2"
|
|
@@ -396,8 +396,8 @@ conversion_provenance = "Input: each pinned Biohub ESMFold2 checkpoint and its s
|
|
| 396 |
representative = "esmfold2"
|
| 397 |
documentation = "docs/esmfold2.md"
|
| 398 |
test_tiers = ["check", "compliance", "structure", "feature", "artifact", "benchmark"]
|
| 399 |
-
runtime_paths = ["__init__.py", "registry.py", "runtime.py", "models.toml", "models/__init__.py", "attention", "embeddings", "models/esmfold2", "models/esm_plusplus", "models/ttt.py"]
|
| 400 |
-
auto_map = { AutoConfig = "fastplms.models.esmfold2.configuration_esmfold2.ESMFold2Config", AutoModel = "fastplms.models.esmfold2.modeling_esmfold2.ESMFold2Model" }
|
| 401 |
|
| 402 |
[[models]]
|
| 403 |
id = "esm2_8m"
|
|
@@ -1215,7 +1215,7 @@ official_files = [
|
|
| 1215 |
"config.json=git-sha1:79ed0dc0f867b8f09bfa004d6f77397c2ab9b38d",
|
| 1216 |
"model.safetensors=sha256:01358c317428d38535e3db513cab177336fc0f7fab0d84002e64b7741d5181b3",
|
| 1217 |
]
|
| 1218 |
-
auto_map = { AutoConfig = "fastplms.models.esmfold2.configuration_esmfold2.ESMFold2Config", AutoModel = "fastplms.models.esmfold2.modeling_esmfold2_experimental.ESMFold2ExperimentalModel" }
|
| 1219 |
|
| 1220 |
[[models]]
|
| 1221 |
id = "esmfold2_experimental_fast_cutoff2025"
|
|
@@ -1236,4 +1236,4 @@ official_files = [
|
|
| 1236 |
"config.json=git-sha1:0333d68ddb12ed2f066741dcb801142f466c0a2c",
|
| 1237 |
"model.safetensors=sha256:4e903b740ad6ad704ec60881bfd593e0d6c874a630ffa0f0838276e0b665088f",
|
| 1238 |
]
|
| 1239 |
-
auto_map = { AutoConfig = "fastplms.models.esmfold2.configuration_esmfold2.ESMFold2Config", AutoModel = "fastplms.models.esmfold2.modeling_esmfold2_experimental.ESMFold2ExperimentalModel" }
|
|
|
|
| 199 |
documentation = "docs/models.md#esm-and-esmc"
|
| 200 |
test_tiers = ["check", "compliance", "feature", "artifact", "benchmark"]
|
| 201 |
runtime_paths = ["__init__.py", "registry.py", "runtime.py", "models.toml", "models/__init__.py", "attention", "embeddings", "models/esm_plusplus", "models/ttt.py"]
|
| 202 |
+
auto_map = { AutoConfig = "fastplms.models.esm_plusplus.modeling_esm_plusplus.ESMplusplusConfig", AutoModel = "fastplms.models.esm_plusplus.modeling_esm_plusplus.ESMplusplusModel", AutoModelForMaskedLM = "fastplms.models.esm_plusplus.modeling_esm_plusplus.ESMplusplusForMaskedLM", AutoModelForSequenceClassification = "fastplms.models.esm_plusplus.modeling_esm_plusplus.ESMplusplusForSequenceClassification", AutoModelForTokenClassification = "fastplms.models.esm_plusplus.modeling_esm_plusplus.ESMplusplusForTokenClassification" }
|
| 203 |
|
| 204 |
[families.esm3]
|
| 205 |
architecture = "ESM3"
|
|
|
|
| 223 |
documentation = "docs/models.md#esm3"
|
| 224 |
test_tiers = ["check", "compliance", "feature", "artifact", "benchmark"]
|
| 225 |
runtime_paths = ["__init__.py", "registry.py", "runtime.py", "models.toml", "models/__init__.py", "attention", "embeddings", "models/esm3", "models/ttt.py"]
|
| 226 |
+
auto_map = { AutoConfig = "fastplms.models.esm3.modeling_esm3.FastESM3Config", AutoModel = "fastplms.models.esm3.modeling_esm3.FastESM3Model", AutoModelForSequenceClassification = "fastplms.models.esm3.modeling_esm3.FastESM3ForSequenceClassification", AutoModelForTokenClassification = "fastplms.models.esm3.modeling_esm3.FastESM3ForTokenClassification" }
|
| 227 |
|
| 228 |
[families.e1]
|
| 229 |
architecture = "E1"
|
|
|
|
| 370 |
representative = "esmfold"
|
| 371 |
documentation = "docs/models.md#esmfold"
|
| 372 |
test_tiers = ["check", "compliance", "structure", "feature", "artifact", "benchmark"]
|
| 373 |
+
runtime_paths = ["__init__.py", "registry.py", "runtime.py", "models.toml", "models/__init__.py", "attention", "embeddings", "models/_esm_rotary.py", "models/classification_probe.py", "models/esmfold"]
|
| 374 |
+
auto_map = { AutoConfig = "fastplms.models.esmfold.modeling_fast_esmfold.FastEsmFoldConfig", AutoModel = "fastplms.models.esmfold.modeling_fast_esmfold.FastEsmForProteinFolding", AutoModelForSequenceClassification = "fastplms.models.esmfold.modeling_fast_esmfold.FastEsmForSequenceClassification", AutoModelForTokenClassification = "fastplms.models.esmfold.modeling_fast_esmfold.FastEsmForTokenClassification" }
|
| 375 |
|
| 376 |
[families.esmfold2]
|
| 377 |
architecture = "ESMFold2"
|
|
|
|
| 396 |
representative = "esmfold2"
|
| 397 |
documentation = "docs/esmfold2.md"
|
| 398 |
test_tiers = ["check", "compliance", "structure", "feature", "artifact", "benchmark"]
|
| 399 |
+
runtime_paths = ["__init__.py", "registry.py", "runtime.py", "models.toml", "models/__init__.py", "attention", "embeddings", "models/classification_probe.py", "models/_esm_rotary.py", "models/esmfold2", "models/esm_plusplus", "models/ttt.py"]
|
| 400 |
+
auto_map = { AutoConfig = "fastplms.models.esmfold2.configuration_esmfold2.ESMFold2Config", AutoModel = "fastplms.models.esmfold2.modeling_esmfold2.ESMFold2Model", AutoModelForSequenceClassification = "fastplms.models.esmfold2.modeling_esmfold2_classification.ESMFold2ForSequenceClassification", AutoModelForTokenClassification = "fastplms.models.esmfold2.modeling_esmfold2_classification.ESMFold2ForTokenClassification" }
|
| 401 |
|
| 402 |
[[models]]
|
| 403 |
id = "esm2_8m"
|
|
|
|
| 1215 |
"config.json=git-sha1:79ed0dc0f867b8f09bfa004d6f77397c2ab9b38d",
|
| 1216 |
"model.safetensors=sha256:01358c317428d38535e3db513cab177336fc0f7fab0d84002e64b7741d5181b3",
|
| 1217 |
]
|
| 1218 |
+
auto_map = { AutoConfig = "fastplms.models.esmfold2.configuration_esmfold2.ESMFold2Config", AutoModel = "fastplms.models.esmfold2.modeling_esmfold2_experimental.ESMFold2ExperimentalModel", AutoModelForSequenceClassification = "fastplms.models.esmfold2.modeling_esmfold2_classification.ESMFold2ExperimentalForSequenceClassification", AutoModelForTokenClassification = "fastplms.models.esmfold2.modeling_esmfold2_classification.ESMFold2ExperimentalForTokenClassification" }
|
| 1219 |
|
| 1220 |
[[models]]
|
| 1221 |
id = "esmfold2_experimental_fast_cutoff2025"
|
|
|
|
| 1236 |
"config.json=git-sha1:0333d68ddb12ed2f066741dcb801142f466c0a2c",
|
| 1237 |
"model.safetensors=sha256:4e903b740ad6ad704ec60881bfd593e0d6c874a630ffa0f0838276e0b665088f",
|
| 1238 |
]
|
| 1239 |
+
auto_map = { AutoConfig = "fastplms.models.esmfold2.configuration_esmfold2.ESMFold2Config", AutoModel = "fastplms.models.esmfold2.modeling_esmfold2_experimental.ESMFold2ExperimentalModel", AutoModelForSequenceClassification = "fastplms.models.esmfold2.modeling_esmfold2_classification.ESMFold2ExperimentalForSequenceClassification", AutoModelForTokenClassification = "fastplms.models.esmfold2.modeling_esmfold2_classification.ESMFold2ExperimentalForTokenClassification" }
|
fastplms_bundle.py
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
modeling_fastplms.py
CHANGED
|
@@ -8,11 +8,12 @@ import sys
|
|
| 8 |
import tempfile
|
| 9 |
from io import BytesIO
|
| 10 |
from pathlib import Path
|
|
|
|
| 11 |
from zipfile import ZIP_DEFLATED, ZipFile
|
| 12 |
|
| 13 |
from .fastplms_bundle import RUNTIME_DATA, RUNTIME_HASH
|
| 14 |
|
| 15 |
-
if RUNTIME_HASH != "
|
| 16 |
raise RuntimeError("FastPLMs runtime identity differs from the bridge.")
|
| 17 |
|
| 18 |
_RUNTIME_TEMPORARIES = []
|
|
@@ -179,16 +180,16 @@ def _install_runtime():
|
|
| 179 |
return package
|
| 180 |
|
| 181 |
_install_runtime()
|
| 182 |
-
|
| 183 |
-
FastAnkhConfig =
|
| 184 |
FastAnkhConfig.__module__ = __name__
|
| 185 |
-
FastAnkhForConditionalGeneration =
|
| 186 |
FastAnkhForConditionalGeneration.__module__ = __name__
|
| 187 |
-
FastAnkhForMaskedLMExtension =
|
| 188 |
FastAnkhForMaskedLMExtension.__module__ = __name__
|
| 189 |
-
FastAnkhForSequenceClassification =
|
| 190 |
FastAnkhForSequenceClassification.__module__ = __name__
|
| 191 |
-
FastAnkhForTokenClassification =
|
| 192 |
FastAnkhForTokenClassification.__module__ = __name__
|
| 193 |
-
FastAnkhModel =
|
| 194 |
FastAnkhModel.__module__ = __name__
|
|
|
|
| 8 |
import tempfile
|
| 9 |
from io import BytesIO
|
| 10 |
from pathlib import Path
|
| 11 |
+
from typing import ClassVar
|
| 12 |
from zipfile import ZIP_DEFLATED, ZipFile
|
| 13 |
|
| 14 |
from .fastplms_bundle import RUNTIME_DATA, RUNTIME_HASH
|
| 15 |
|
| 16 |
+
if RUNTIME_HASH != "79ee3a7bf063ea585f9792fb4d9292002767ca533625797d26c9f7ce5e14ca9e":
|
| 17 |
raise RuntimeError("FastPLMs runtime identity differs from the bridge.")
|
| 18 |
|
| 19 |
_RUNTIME_TEMPORARIES = []
|
|
|
|
| 180 |
return package
|
| 181 |
|
| 182 |
_install_runtime()
|
| 183 |
+
_module_182 = _import_without_bytecode("fastplms.models.ankh.modeling_ankh")
|
| 184 |
+
FastAnkhConfig = _module_182.FastAnkhConfig
|
| 185 |
FastAnkhConfig.__module__ = __name__
|
| 186 |
+
FastAnkhForConditionalGeneration = _module_182.FastAnkhForConditionalGeneration
|
| 187 |
FastAnkhForConditionalGeneration.__module__ = __name__
|
| 188 |
+
FastAnkhForMaskedLMExtension = _module_182.FastAnkhForMaskedLMExtension
|
| 189 |
FastAnkhForMaskedLMExtension.__module__ = __name__
|
| 190 |
+
FastAnkhForSequenceClassification = _module_182.FastAnkhForSequenceClassification
|
| 191 |
FastAnkhForSequenceClassification.__module__ = __name__
|
| 192 |
+
FastAnkhForTokenClassification = _module_182.FastAnkhForTokenClassification
|
| 193 |
FastAnkhForTokenClassification.__module__ = __name__
|
| 194 |
+
FastAnkhModel = _module_182.FastAnkhModel
|
| 195 |
FastAnkhModel.__module__ = __name__
|