You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-33Lines changed: 7 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,60 +115,34 @@ corr_coef # pearson R, used as a metric in the paper
115
115
116
116
## Pretrained Model
117
117
118
-
Deepmind has released the weights for their tensorflow sonnet Enformer model! I have ported it over to pytorch at <ahref="https://drive.google.com/u/0/uc?id=1sg41meLWKPMaM6hMx4aBWSwlVOfXbe0R">here</a> (~1GB). There are still some rounding errors that seem to be accruing across the layers, resulting in an absolute error as high as `0.5`. However, correlation coefficient look good so I am releasing it and will upload it to Huggingface in due time. Will keep working on figuring out where the numerical errors are happening (it may be the attention pooling module, as I noticed the attention logits are pretty high).
118
+
Deepmind has released the weights for their tensorflow sonnet Enformer model! I have ported it over to Pytorch and uploaded it to <ahref="https://huggingface.co/EleutherAI/enformer-official-rough">🤗 Huggingface</a> (~1GB). There are still some rounding errors that seem to be accruing across the layers, resulting in an absolute error as high as `0.5`. However, correlation coefficient look good so I am releasing the 'rough'ly working version. Will keep working on figuring out where the numerical errors are happening (it may be the attention pooling module, as I noticed the attention logits are pretty high).
Quick sanity check on a single human validation point
138
132
139
133
```python
140
134
$ python test_pretrained.py
141
135
# 0.5963 correlation coefficient on a validation sample
142
136
```
143
137
144
-
## Older models (no longer recommended)
145
-
146
-
First make sure you are on version 0.4.5 or below
147
-
148
-
```
149
-
$ pip install enformer-pytorch==0.4.5
150
-
```
151
-
152
-
Warning: the pretrained models so far have not hit the mark of what was presented in the paper. if you would like to help out, please join <a href="https://discord.com/invite/s7WyNU24aM">this discord</a>. replication efforts ongoing
153
-
154
-
To use a pretrained model (may not be of the same quality as the one in the paper yet), simply use the `from_pretrained` method (powered by [HuggingFace](https://huggingface.co/)):
155
-
156
-
```python
157
-
from enformer_pytorch import Enformer
158
-
159
-
model = Enformer.from_pretrained("EleutherAI/enformer-preview")
160
-
161
-
# do your fine-tuning
162
-
```
163
-
164
-
This is made possible thanks to HuggingFace's [custom model](https://huggingface.co/docs/transformers/master/en/custom_models) feature. All Enformer checkpoints can be found on the [hub](https://huggingface.co/models?other=enformer).
138
+
This is all made possible thanks to HuggingFace's [custom model](https://huggingface.co/docs/transformers/master/en/custom_models) feature.
165
139
166
140
You can also load, with overriding of the `target_length` parameter, if you are working with shorter sequence lengths
167
141
168
142
```python
169
143
from enformer_pytorch import Enformer
170
144
171
-
model = Enformer.from_pretrained('EleutherAI/enformer-preview', target_length=128, dropout_rate=0.1)
145
+
model = Enformer.from_pretrained('EleutherAI/enformer-official-rough', target_length = 128, dropout_rate = 0.1)
172
146
173
147
# do your fine-tuning
174
148
```
@@ -178,7 +152,7 @@ To save on memory during fine-tuning a large Enformer model
0 commit comments