dexiongc commited on
Commit
1c21e62
·
verified ·
1 Parent(s): c6217ed

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +58 -0
  2. config.json +56 -0
  3. pytorch_model.bin +3 -0
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: tedbench
3
+ tags:
4
+ - protein
5
+ - structure-sequence
6
+ - fold-classification
7
+ - tedbench
8
+ - saprot
9
+ pipeline_tag: other
10
+ license: bsd-3-clause
11
+ ---
12
+
13
+ # TEDBench — SaProt-650M fine-tuned on TEDBench
14
+
15
+ Backbone: SaProt-650M (33 layers, hidden dim 1280). Requires [Foldseek](https://github.com/steineggerlab/foldseek) for structure-aware tokens.
16
+
17
+ Fine-tuned on [TEDBench](https://github.com/BorgwardtLab/TEDBench) for protein
18
+ fold classification into 965 CATH topology (T-level) classes (ICML 2026).
19
+
20
+ ## Usage
21
+
22
+ ```python
23
+ import sys
24
+ sys.path.insert(0, "baselines") # from repo root
25
+
26
+ from pathlib import Path
27
+ import torch
28
+ from models.saprot_classifier import SaProtClassifier
29
+ from omegaconf import OmegaConf
30
+ from huggingface_hub import snapshot_download
31
+
32
+ local_dir = Path(snapshot_download("TEDBench/saprot-650M-ft"))
33
+ with open(local_dir / "config.json") as f:
34
+ import json
35
+ cfg = OmegaConf.create(json.load(f))
36
+
37
+ model = SaProtClassifier(cfg)
38
+ sd = torch.load(local_dir / "pytorch_model.bin", map_location="cpu", weights_only=False)
39
+ model.load_state_dict(sd)
40
+ model.eval()
41
+ ```
42
+
43
+ Or pass the repo ID directly to the test script:
44
+
45
+ ```bash
46
+ python baselines/saprot_test_ted.py train.ckpt_path=TEDBench/saprot-650M-ft
47
+ ```
48
+
49
+ ## Citation
50
+
51
+ ```bibtex
52
+ @inproceedings{chen2026tedbench,
53
+ title={Protein Fold Classification at Scale: Benchmarking and Pretraining},
54
+ author={Chen, Dexiong and Manolache, Andrei and Niepert, Mathias and Borgwardt, Karsten},
55
+ booktitle={Proceedings of the 43rd International Conference on Machine Learning},
56
+ year={2026}
57
+ }
58
+ ```
config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "seed": 42,
3
+ "wandb": true,
4
+ "truncation_seq_length": 512,
5
+ "batch_size": 16,
6
+ "foldseek_path": "/fs/gpfs41/lv11/fileset01/pool/pool-chen/softwares/micromamba/envs/foldseek/bin/foldseek",
7
+ "datamodule": {
8
+ "batch_size": 64,
9
+ "num_workers": 32,
10
+ "_target_": "foldmae.data.TEDLightningDataset",
11
+ "root": "./datasets/afdb_FS_plddt80",
12
+ "dataset_name": "ted"
13
+ },
14
+ "trainer": {
15
+ "_target_": "pytorch_lightning.Trainer",
16
+ "accelerator": "auto",
17
+ "max_steps": 18300,
18
+ "strategy": "ddp_find_unused_parameters_true",
19
+ "devices": "auto",
20
+ "default_root_dir": "${logs.path}",
21
+ "num_sanity_val_steps": 0,
22
+ "accumulate_grad_batches": 16
23
+ },
24
+ "model": {
25
+ "name": "SaProt_650M_AF2",
26
+ "path": "cache/torch/hub/checkpoints/${model.name}",
27
+ "num_classes": 965,
28
+ "avg_pool": false
29
+ },
30
+ "train": {
31
+ "optimizer": {
32
+ "_target_": "torch.optim.AdamW",
33
+ "lr": 0.0016,
34
+ "weight_decay": 0.1,
35
+ "betas": [
36
+ 0.9,
37
+ 0.95
38
+ ]
39
+ },
40
+ "lr_scheduler": {
41
+ "_target_": "foldmae.lr_schedulers.get_cosine_schedule_with_warmup",
42
+ "warmup_steps": 1830,
43
+ "max_steps": "${trainer.max_steps}"
44
+ },
45
+ "loss": {
46
+ "_target_": "torch.nn.CrossEntropyLoss"
47
+ },
48
+ "llrd": 0.8,
49
+ "ckpt_path": "logs/saprot/finetune/ted/42/runs/2026-01-20_22-15-11/model.ckpt"
50
+ },
51
+ "logs": {
52
+ "prefix": "logs/saprot/finetune/${datamodule.dataset_name}/${seed}",
53
+ "path": "${logs.prefix}/runs/${now:%Y-%m-%d}_${now:%H-%M-%S}"
54
+ },
55
+ "_model_class": "saprot"
56
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c509e8549d7c01d950ae99a1637c92b43ae2e98a2937a68131203e500ff07b1d
3
+ size 2611440279