Upload folder using huggingface_hub
Browse files- README.md +64 -0
- config.json +73 -0
- pytorch_model.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: tedbench
|
| 3 |
+
tags:
|
| 4 |
+
- protein
|
| 5 |
+
- structure
|
| 6 |
+
- fold-classification
|
| 7 |
+
- tedbench
|
| 8 |
+
pipeline_tag: other
|
| 9 |
+
license: bsd-3-clause
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# TEDBench — Supervised from scratch (structure + sequence)
|
| 13 |
+
|
| 14 |
+
**Variant:** `miae_b` + seq | **Parameters:** 102M | **Layers:** 12 | **Hidden dim:** 768 | **Attn heads:** 12
|
| 15 |
+
|
| 16 |
+
This **MiAEClassifier** was trained from scratch on TEDBench without pretraining.
|
| 17 |
+
|
| 18 |
+
> **+seq variant** — sequence embeddings are concatenated to the geometric encoder input (`model.use_seq_input=true`).
|
| 19 |
+
|
| 20 |
+
Part of the [TEDBench](https://github.com/BorgwardtLab/TEDBench) benchmark for
|
| 21 |
+
protein fold classification (ICML 2026). MiAE is an SE(3)-invariant masked
|
| 22 |
+
autoencoder that masks up to 90% of backbone frames and reconstructs the full
|
| 23 |
+
structure with a lightweight decoder.
|
| 24 |
+
|
| 25 |
+
## Architecture sizes
|
| 26 |
+
|
| 27 |
+
| Variant | Params | Layers | Hidden dim | Attn heads |
|
| 28 |
+
|---------|-------:|-------:|-----------:|-----------:|
|
| 29 |
+
| `miae_s` | 29 M | 6 | 512 | 8 |
|
| 30 |
+
| `miae_b` | 102 M | 12 | 768 | 12 |
|
| 31 |
+
| `miae_l` | 339 M | 24 | 1 024 | 16 |
|
| 32 |
+
|
| 33 |
+
Append `+model.use_seq_input=true` to `miae_b` for the **+seq** variant.
|
| 34 |
+
|
| 35 |
+
## Usage
|
| 36 |
+
|
| 37 |
+
### Load from the HuggingFace Hub
|
| 38 |
+
|
| 39 |
+
```python
|
| 40 |
+
from tedbench.utils.io import load_from_hf
|
| 41 |
+
|
| 42 |
+
model = load_from_hf("TEDBench/miae-b-seq-sc")
|
| 43 |
+
model.eval()
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
### From a Lightning checkpoint
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
from tedbench.model import MiAEClassifier
|
| 50 |
+
|
| 51 |
+
model = MiAEClassifier.load_from_checkpoint("model.ckpt", weights_only=False)
|
| 52 |
+
model.eval()
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## Citation
|
| 56 |
+
|
| 57 |
+
```bibtex
|
| 58 |
+
@inproceedings{chen2026tedbench,
|
| 59 |
+
title={Protein Fold Classification at Scale: Benchmarking and Pretraining},
|
| 60 |
+
author={Chen, Dexiong and Manolache, Andrei and Niepert, Mathias and Borgwardt, Karsten},
|
| 61 |
+
booktitle={Proceedings of the 43rd International Conference on Machine Learning},
|
| 62 |
+
year={2026}
|
| 63 |
+
}
|
| 64 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"seed": 42,
|
| 3 |
+
"debug": false,
|
| 4 |
+
"wandb": true,
|
| 5 |
+
"pretrained_model_path": null,
|
| 6 |
+
"datamodule": {
|
| 7 |
+
"batch_size": 32,
|
| 8 |
+
"pin_memory": true,
|
| 9 |
+
"num_workers": 32,
|
| 10 |
+
"train_transform": {
|
| 11 |
+
"_target_": "tedbench.data.transform.Compose",
|
| 12 |
+
"transforms": [
|
| 13 |
+
{
|
| 14 |
+
"_target_": "tedbench.data.transform.RandomCrop",
|
| 15 |
+
"size": 512
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"_target_": "tedbench.data.transform.RandomNoise",
|
| 19 |
+
"std": 0.2,
|
| 20 |
+
"mean": 0.0
|
| 21 |
+
}
|
| 22 |
+
]
|
| 23 |
+
},
|
| 24 |
+
"_target_": "tedbench.data.TEDLightningDataset",
|
| 25 |
+
"root": "./datasets/ted",
|
| 26 |
+
"dataset_name": "ted"
|
| 27 |
+
},
|
| 28 |
+
"trainer": {
|
| 29 |
+
"_target_": "pytorch_lightning.Trainer",
|
| 30 |
+
"accelerator": "auto",
|
| 31 |
+
"max_steps": 18300,
|
| 32 |
+
"strategy": "auto",
|
| 33 |
+
"devices": "auto",
|
| 34 |
+
"default_root_dir": "${logs.path}",
|
| 35 |
+
"num_sanity_val_steps": 0,
|
| 36 |
+
"accumulate_grad_batches": 32
|
| 37 |
+
},
|
| 38 |
+
"train": {
|
| 39 |
+
"optimizer": {
|
| 40 |
+
"_target_": "torch.optim.AdamW",
|
| 41 |
+
"lr": 0.0016,
|
| 42 |
+
"weight_decay": 0.1,
|
| 43 |
+
"betas": [
|
| 44 |
+
0.9,
|
| 45 |
+
0.95
|
| 46 |
+
]
|
| 47 |
+
},
|
| 48 |
+
"lr_scheduler": {
|
| 49 |
+
"_target_": "tedbench.lr_schedulers.get_cosine_schedule_with_warmup",
|
| 50 |
+
"warmup_steps": 1830,
|
| 51 |
+
"max_steps": "${trainer.max_steps}"
|
| 52 |
+
},
|
| 53 |
+
"loss": {
|
| 54 |
+
"_target_": "torch.nn.CrossEntropyLoss",
|
| 55 |
+
"label_smoothing": 0.0
|
| 56 |
+
},
|
| 57 |
+
"llrd": 1.0,
|
| 58 |
+
"ckpt_path": null
|
| 59 |
+
},
|
| 60 |
+
"model": {
|
| 61 |
+
"_target_": "tedbench.model.miae_encoder_model",
|
| 62 |
+
"name": "miae_b",
|
| 63 |
+
"num_classes": 965,
|
| 64 |
+
"avg_pool": false,
|
| 65 |
+
"use_seq_input": true
|
| 66 |
+
},
|
| 67 |
+
"logs": {
|
| 68 |
+
"prefix": "logs/finetune/${datamodule.dataset_name}/${seed}",
|
| 69 |
+
"path": "${logs.prefix}/runs/${now:%Y-%m-%d}_${now:%H-%M-%S}"
|
| 70 |
+
},
|
| 71 |
+
"mode": {},
|
| 72 |
+
"_model_class": "miae_classifier"
|
| 73 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b5f5159ec6f669a1f44b94e243c0be5694efdb2e527b59d5e379fa2a197fa03c
|
| 3 |
+
size 410442959
|