lhallee commited on
Commit
528e254
·
verified ·
1 Parent(s): cb624a4

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +19 -1
README.md CHANGED
@@ -82,6 +82,24 @@ with torch.no_grad():
82
  print(logits.shape) # (2, 11, 33)
83
  ```
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  ### For working with attention maps
86
  ```python
87
  import torch
@@ -193,4 +211,4 @@ Note:
193
  booktitle={Advances in Neural Information Processing Systems 32},
194
  year={2019}
195
  }
196
- ```
 
82
  print(logits.shape) # (2, 11, 33)
83
  ```
84
 
85
+ ### Experimental test-time training
86
+
87
+ TTT is disabled by default. Normal inference, embeddings, logits, and
88
+ `state_dict()` keys are unchanged unless you explicitly call `model.ttt(...)`.
89
+ The current implementation is experimental and trains only local LoRA adapters
90
+ on the ESM2 backbone using masked language modeling on the test protein. It can
91
+ help difficult proteins, but it adds test-time compute and can hurt already
92
+ confident predictions.
93
+
94
+ ```python
95
+ metrics = model.ttt(
96
+ seq="MSTNPKPQRKTKRNT",
97
+ ttt_config={"steps": 3, "ags": 1, "batch_size": 1},
98
+ )
99
+ model.ttt_reset()
100
+ print(metrics["losses"])
101
+ ```
102
+
103
  ### For working with attention maps
104
  ```python
105
  import torch
 
211
  booktitle={Advances in Neural Information Processing Systems 32},
212
  year={2019}
213
  }
214
+ ```