Feature Extraction
Transformers
Safetensors
fast_esm3
biology
protein-language-model
esm3
multimodal-protein-model
custom_code
Instructions to use Synthyra/ESM3_small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Synthyra/ESM3_small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Synthyra/ESM3_small", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Synthyra/ESM3_small", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -44,6 +44,23 @@ You can also call sequence inference directly:
|
|
| 44 |
output = model.forward_sequence(["MKTAYIAKQRQISFVKSHFSRQDILDLWIYHTQGYFP"])
|
| 45 |
```
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
Switch between SDPA and Flex Attention after loading:
|
| 48 |
|
| 49 |
```python
|
|
|
|
| 44 |
output = model.forward_sequence(["MKTAYIAKQRQISFVKSHFSRQDILDLWIYHTQGYFP"])
|
| 45 |
```
|
| 46 |
|
| 47 |
+
## Experimental Test-Time Training
|
| 48 |
+
|
| 49 |
+
TTT is disabled by default. No LoRA adapters are injected during normal
|
| 50 |
+
`forward_sequence`, `forward`, or `embed_dataset` calls. Calling `model.ttt(...)`
|
| 51 |
+
opts in to experimental masked-LM adaptation of the ESM3 sequence track through
|
| 52 |
+
local LoRA weights. It can improve some difficult proteins, but it adds
|
| 53 |
+
test-time compute and can degrade already confident predictions.
|
| 54 |
+
|
| 55 |
+
```python
|
| 56 |
+
metrics = model.ttt(
|
| 57 |
+
seq="MKTAYIAKQRQISFVKSHFSRQDILDLWIYHTQGYFP",
|
| 58 |
+
ttt_config={"steps": 3, "ags": 1, "batch_size": 1},
|
| 59 |
+
)
|
| 60 |
+
model.ttt_reset()
|
| 61 |
+
print(metrics["losses"])
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
Switch between SDPA and Flex Attention after loading:
|
| 65 |
|
| 66 |
```python
|