Phsntom
/

Phsntom dmccarthy commited on
Commit
6690431
·
0 Parent(s):

Duplicate from biohub/ESMC-600M

Browse files

Co-authored-by: Dannielle McCarthy <dmccarthy@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ images/esmc_graphic.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,358 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license:
3
+ - mit
4
+ - other
5
+ license_link: https://github.com/Biohub/esm/blob/main/THIRD_PARTY_NOTICE.md
6
+ library_name: transformers
7
+ language: en
8
+ tags:
9
+ - biology
10
+ - esm
11
+ - protein
12
+ - protein-language-model
13
+ - protein-embeddings
14
+ - masked-language-modeling
15
+ - transfer-learning
16
+ - variant-effect-prediction
17
+ - protein-engineering
18
+ - transformers
19
+ ---
20
+
21
+ # ESMC
22
+
23
+ ## Model Details
24
+
25
+ ESMC is a state-of-the-art protein language model that has learned the rules of protein biology from training on billions of protein sequences. ESMC provides representations of proteins enabling novel AI applications from therapeutic protein engineering to unlocking basic insights into protein biology across life.
26
+
27
+ The ESMC 6B model has 6 billion parameters, with 80 layers and 2.37e23 training flops. We additionally release overtrained 300M and 600M parameter variants of ESMC for local inference and finetuning.
28
+
29
+ The [ESMFold2](https://huggingface.co/biohub/ESMFold2) structure prediction models are trained on top of a frozen ESMC 6B language model. ESMFold2 is a state-of-the-art model for protein structure prediction and design that defines a new frontier for speed and accuracy.
30
+
31
+ The [ESMC sparse autoencoder](https://huggingface.co/biohub/ESMC-6B-sae-layer60-k64-codebook16384), `ESMC-6B-sae-layer60-k64-codebook16384`, is built on the ESMC 6B model and provides human-interpretable, agent-generated feature descriptions. See the [ESMC SAE overview card](https://huggingface.co/biohub/ESMC-SAE-Overview) for the full set of ESMC SAE variants.
32
+
33
+ To run this model with the Biohub Platform API, visit the [Biohub Platform](https://biohub.ai/).
34
+
35
+ Read more about ESMC in our paper [here](https://biohub.ai/papers/esm_protein.pdf).
36
+
37
+ ### Example Usage
38
+
39
+ Install `esm` from GitHub (a PyPI release is coming soon):
40
+
41
+ ```
42
+ pip install esm@git+https://github.com/Biohub/esm.git@main
43
+ ```
44
+
45
+ ```py
46
+ import torch
47
+ from transformers import AutoModelForMaskedLM, AutoTokenizer
48
+
49
+ GFP = "MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTFSYGVQCFSRYPDHMKQHDFFKSAMPEGYVQERTIFFKDDGNYKTRAEVKFEGDTLVNRIELKGIDFKEDGNILGHKLEYNYNSHNVYIMADKQKNGIKVNFKIRHNIEDGSVQLADHYQQNTPIGDGPVLLPDNHYLSTQSALSKDPNEKRDHMVLLEFVTAAGITHGMDELYK"
50
+
51
+ # optionally use "biohub/ESMC-600M" or "biohub/ESMC-300M"
52
+ model = AutoModelForMaskedLM.from_pretrained("biohub/ESMC-6B", device_map="auto").eval()
53
+ tokenizer = AutoTokenizer.from_pretrained("biohub/ESMC-6B")
54
+
55
+ inputs = tokenizer(GFP, return_tensors="pt", padding=True)
56
+ inputs = {k: v.to(model.device) for k, v in inputs.items()}
57
+
58
+ with torch.inference_mode():
59
+ output = model(**inputs)
60
+
61
+ print(f"logits shape: {tuple(output.logits.shape)}")
62
+ ```
63
+
64
+ By default, the model returns only the final layer representations. To return hidden states from **all transformer layers**, set:
65
+
66
+ ```py
67
+ output = model(**inputs, output_hidden_states=True)
68
+ ```
69
+
70
+ For detailed usage, refer to the [Usage section below](#usage).
71
+
72
+ ### Citation
73
+
74
+ ```
75
+ @misc{candido2026language,
76
+ title = {Language Modeling Materializes a World Model of Protein Biology},
77
+ author = {Candido, Salvatore and Hayes, Thomas and Derry, Alexander and Rao, Roshan
78
+ and Lin, Zeming and Verkuil, Robert and Wu, Bryan and Lee, Jin Sub
79
+ and Bruguera, Elise S. and Keval, Jehan A. and Kopylov, Mykhailo
80
+ and Pak, John E. and Wu, Wesley and Thomas, Neil and Mataraso, Samson
81
+ and Hsu, Alvin and Trotman-Grant, Ashton C. and Fatras, Kilian
82
+ and dos Santos Costa, Allan and Badkundri, Rohil and Ak{\i}n, Halil
83
+ and Oktay, Deniz and Deaton, Jonathan and Montabana, Elizabeth
84
+ and Sitwala, Hrishita and Yu, Yue and Wiggert, Marius
85
+ and Carlin, Dylan Alexander and Goering, Anthony W. and Blazejewski, Tomasz
86
+ and Sandora, McCullen and Hla, Michael and Jia, Tina Z.
87
+ and Kloker, Leon H. and Sofroniew, Nicholas J. and Uehara, Masatoshi
88
+ and Pannu, Jassi and Bachas, Sharrol and Liu, Daniel S.
89
+ and Sercu, Tom and Rives, Alexander},
90
+ year = {2026},
91
+ url = {https://biohub.ai/papers/esm_protein.pdf},
92
+ note = {Preprint}
93
+ }
94
+ ```
95
+
96
+ ### Model Architecture
97
+
98
+ ESMC is based on the transformer architecture. It features Pre-LN, rotary embeddings, and SwiGLU activations. No biases are used in linear layers or layer norms.
99
+
100
+ ### Parameters
101
+
102
+ ESMC was trained at multiple scales:
103
+
104
+ | Model | Parameters | Layers | Training FLOPs |
105
+ | :---- | ----: | ----: | ----: |
106
+ | **ESMC-300M** | 300M | 30 | 1.26e22 |
107
+ | **ESMC-600M** | 600M | 36 | 2.17e22 |
108
+ | **ESMC-6B** | 6B | 80 | 2.37e23 |
109
+
110
+ ![][pal]
111
+
112
+ ### Model Variants
113
+
114
+ | Model Variant | Description | URL |
115
+ | :---- | :---- | :---- |
116
+ | ESMC 300M | Smallest variant, publicly released. | [https://huggingface.co/biohub/ESMC-300M](https://huggingface.co/biohub/ESMC-300M) |
117
+ | ESMC 600M | Medium variant, publicly released. | [https://huggingface.co/biohub/ESMC-600M](https://huggingface.co/biohub/ESMC-600M) |
118
+ | ESMC 6B | Large variant, publicly released. | [https://huggingface.co/biohub/ESMC-6B](https://huggingface.co/biohub/ESMC-6B) |
119
+
120
+ ### System Requirements
121
+
122
+ - Compute Requirements: GPU
123
+ - PyTorch environment with GPU support recommended.
124
+ - Recommended optional libraries: transformer\_engine, xformers
125
+
126
+ ## Training Data
127
+
128
+ ESMC was trained on protein sequences from UniRef, MGnify, and the Joint Genome Institute (JGI). Sequence data was clustered at 70% sequence identity, resulting in 83M, 372M, and 2B clusters for UniRef, MGnify, and JGI, respectively.
129
+
130
+ ### Training Procedure
131
+
132
+ Training was conducted in two stages:
133
+
134
+ - Stage 1: For the first 1 million steps, the model used a context length of 512, with metagenomic data constituting 64% of the training dataset.
135
+ - Stage 2: In the final 500,000 steps, the context length was increased to 2048, and the proportion of metagenomic data was reduced to 37.5%.
136
+
137
+ ## Performance Metrics
138
+
139
+ Performance metrics are detailed in our [ESMC & ESMFold2 paper](https://biohub.ai/papers/esm_protein.pdf).
140
+
141
+ ## Usage
142
+
143
+ ### Flash Attention
144
+
145
+ Instead of scaled dot product attention (sdpa) you can use a flash attention backend. This requires running the model in bfloat16.
146
+
147
+ ```py
148
+ model = (
149
+ AutoModelForMaskedLM.from_pretrained(
150
+ "biohub/ESMC-6B",
151
+ dtype=torch.bfloat16,
152
+ device_map="auto",
153
+ attn_implementation="flash_attention_2",
154
+ )
155
+ .to(torch.bfloat16)
156
+ .eval()
157
+ )
158
+ ```
159
+
160
+ ### Sparse Autoencoder (SAE)
161
+
162
+ To get interpretable features from ESMC 6B hidden states and per-layer MLP outputs, you can choose from our pretrained SAEs. We provide the follow three:
163
+
164
+ * [ESMC SAEs for hidden states (all layers)](https://huggingface.co/collections/biohub/esmc-saes-for-hidden-states-all-layers)
165
+ * [ESMC SAEs for one layer (different sparsity/codebook size)](https://huggingface.co/collections/biohub/esmc-saes-for-one-layer-different-sparsity-codebook-size)
166
+ * [ESMC SAEs for MLP outputs (all layers)](https://huggingface.co/collections/biohub/esmc-saes-for-mlp-outputs-all-layers)
167
+
168
+ ```py
169
+ import torch
170
+ from transformers import AutoModel, AutoTokenizer
171
+
172
+ GFP = "MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTFSYGVQCFSRYPDHMKQHDFFKSAMPEGYVQERTIFFKDDGNYKTRAEVKFEGDTLVNRIELKGIDFKEDGNILGHKLEYNYNSHNVYIMADKQKNGIKVNFKIRHNIEDGSVQLADHYQQNTPIGDGPVLLPDNHYLSTQSALSKDPNEKRDHMVLLEFVTAAGITHGMDELYK"
173
+
174
+ model = AutoModel.from_pretrained("biohub/ESMC-6B", device_map="auto").eval()
175
+ tokenizer = AutoTokenizer.from_pretrained("biohub/ESMC-6B")
176
+
177
+ sae_models = []
178
+ sae = AutoModel.from_pretrained(
179
+ "biohub/ESMC-6B-sae-sweep-layer60-k64-codebook16384", device_map="auto"
180
+ )
181
+ sae_models.append(sae)
182
+
183
+ model.add_sae_models(sae_models)
184
+
185
+ inputs = tokenizer(GFP, return_tensors="pt", padding=True)
186
+ inputs = {k: v.to(model.device) for k, v in inputs.items()}
187
+
188
+ with torch.inference_mode():
189
+ output = model(**inputs)
190
+
191
+ print(f"num SAE outputs: {len(output.sae_outputs)}")
192
+ for i, sae_out in enumerate(output.sae_outputs):
193
+ print(f" SAE[{i}]: {type(sae_out).__name__}")
194
+ ```
195
+
196
+ ### Masked Language Modeling
197
+
198
+ ESMC can predict masked amino acids and compute the corresponding loss:
199
+
200
+ ```py
201
+ import torch
202
+ from transformers import AutoModelForMaskedLM, AutoTokenizer
203
+
204
+ GFP = "MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTFSYGVQCFSRYPDHMKQHDFFKSAMPEGYVQERTIFFKDDGNYKTRAEVKFEGDTLVNRIELKGIDFKEDGNILGHKLEYNYNSHNVYIMADKQKNGIKVNFKIRHNIEDGSVQLADHYQQNTPIGDGPVLLPDNHYLSTQSALSKDPNEKRDHMVLLEFVTAAGITHGMDELYK"
205
+ masked_GFP = "<mask>SKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTFSYGVQCFSRYPDHMKQHDFFKSAMPEGYVQERTIFFKDDGNYKTRAEVKFEGDTLVNRIELKGIDFKEDGNILGHKLEYNYNSHNVYIMADKQKNGIKVNFKIRHNIEDGSVQLADHYQQNTPIGDGPVLLPDNHYLSTQSALSKDPNEKRDHMVLLEFVTAAGITHGMDELYK"
206
+
207
+ model = AutoModelForMaskedLM.from_pretrained("biohub/ESMC-6B", device_map="auto").eval()
208
+ tokenizer = AutoTokenizer.from_pretrained("biohub/ESMC-6B")
209
+
210
+ inputs = tokenizer(masked_GFP, return_tensors="pt")
211
+ inputs = {k: v.to(model.device) for k, v in inputs.items()}
212
+
213
+ labels = tokenizer(GFP, return_tensors="pt")["input_ids"].to(model.device)
214
+ # Only the masked positions contribute to the loss; everything else gets the
215
+ # ``-100`` ignore-index that ``CrossEntropyLoss`` skips.
216
+ labels = torch.where(inputs["input_ids"] == tokenizer.mask_token_id, labels, -100)
217
+
218
+ with torch.inference_mode():
219
+ output = model(**inputs, labels=labels)
220
+
221
+ print(f"Loss: {output.loss.item():.6f}")
222
+ ```
223
+
224
+ ### Fine-tuning with peft
225
+
226
+ ```py
227
+ from peft import LoraConfig, get_peft_model
228
+ from transformers import AutoModelForMaskedLM
229
+
230
+ model = AutoModelForMaskedLM.from_pretrained("biohub/ESMC-6B", device_map="auto")
231
+
232
+ lora_config = LoraConfig(
233
+ r=8,
234
+ lora_alpha=16,
235
+ lora_dropout=0.01,
236
+ target_modules=["layernorm_qkv.1", "out_proj", "ffn.1", "ffn.3"],
237
+ )
238
+
239
+ model = get_peft_model(model, lora_config)
240
+ model.print_trainable_parameters()
241
+ ```
242
+
243
+ ### Attention Maps
244
+
245
+ To extract attention maps, pass `output_attentions=True`. Note: this is incompatible with `attn_implementation="flash_attention_2"`.
246
+
247
+ ```py
248
+ output = model(**inputs, output_attentions=True)
249
+ # output.attentions: tuple of (batch, n_heads, seq_len, seq_len) tensors, one per layer
250
+ ```
251
+
252
+ `output_attentions=True` triggers a manual, unoptimized attention path to extract the attention maps, which will reduce inference speed.
253
+
254
+ ### Other Usage
255
+
256
+ You can access the base model without the pretrained LM head:
257
+
258
+ ```py
259
+ import torch
260
+ from transformers import AutoModel, AutoTokenizer
261
+
262
+ GFP = "MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTFSYGVQCFSRYPDHMKQHDFFKSAMPEGYVQERTIFFKDDGNYKTRAEVKFEGDTLVNRIELKGIDFKEDGNILGHKLEYNYNSHNVYIMADKQKNGIKVNFKIRHNIEDGSVQLADHYQQNTPIGDGPVLLPDNHYLSTQSALSKDPNEKRDHMVLLEFVTAAGITHGMDELYK"
263
+
264
+ model = AutoModel.from_pretrained("biohub/ESMC-6B", device_map="auto").eval()
265
+ tokenizer = AutoTokenizer.from_pretrained("biohub/ESMC-6B")
266
+
267
+ inputs = tokenizer(GFP, return_tensors="pt", padding=True)
268
+ inputs = {k: v.to(model.device) for k, v in inputs.items()}
269
+
270
+ with torch.inference_mode():
271
+ output = model(**inputs)
272
+
273
+ print(f"last_hidden_state shape: {tuple(output.last_hidden_state.shape)}")
274
+ ```
275
+
276
+ Or use ESMC for Token Classification:
277
+
278
+ ```py
279
+ import torch
280
+ from transformers import AutoModelForTokenClassification, AutoTokenizer
281
+
282
+ GFP = "MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTFSYGVQCFSRYPDHMKQHDFFKSAMPEGYVQERTIFFKDDGNYKTRAEVKFEGDTLVNRIELKGIDFKEDGNILGHKLEYNYNSHNVYIMADKQKNGIKVNFKIRHNIEDGSVQLADHYQQNTPIGDGPVLLPDNHYLSTQSALSKDPNEKRDHMVLLEFVTAAGITHGMDELYK"
283
+
284
+ model = AutoModelForTokenClassification.from_pretrained(
285
+ "biohub/ESMC-6B", device_map="auto"
286
+ ).eval()
287
+ tokenizer = AutoTokenizer.from_pretrained("biohub/ESMC-6B")
288
+
289
+ inputs = tokenizer(GFP, return_tensors="pt", padding=True)
290
+ inputs = {k: v.to(model.device) for k, v in inputs.items()}
291
+
292
+ with torch.inference_mode():
293
+ output = model(**inputs)
294
+
295
+ predicted_token_class_ids = output.logits.argmax(-1)
296
+ predicted_tokens_classes = [
297
+ model.config.id2label[t.item()] for t in predicted_token_class_ids[0]
298
+ ]
299
+ print(f"logits shape: {tuple(output.logits.shape)}")
300
+ print(f"first 8 predicted classes: {predicted_tokens_classes[:8]}")
301
+ ```
302
+
303
+ or Sequence Classification:
304
+
305
+ ```py
306
+ import torch
307
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer
308
+
309
+ GFP = "MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTFSYGVQCFSRYPDHMKQHDFFKSAMPEGYVQERTIFFKDDGNYKTRAEVKFEGDTLVNRIELKGIDFKEDGNILGHKLEYNYNSHNVYIMADKQKNGIKVNFKIRHNIEDGSVQLADHYQQNTPIGDGPVLLPDNHYLSTQSALSKDPNEKRDHMVLLEFVTAAGITHGMDELYK"
310
+
311
+ model = AutoModelForSequenceClassification.from_pretrained(
312
+ "biohub/ESMC-6B", device_map="auto", num_labels=2
313
+ ).eval()
314
+ tokenizer = AutoTokenizer.from_pretrained("biohub/ESMC-6B")
315
+
316
+ inputs = tokenizer(GFP, return_tensors="pt", padding=True)
317
+ inputs = {k: v.to(model.device) for k, v in inputs.items()}
318
+
319
+ with torch.inference_mode():
320
+ output = model(**inputs)
321
+
322
+ print(f"logits shape: {tuple(output.logits.shape)}")
323
+ ```
324
+
325
+ For Token or Sequence Classification, the classifier head is not pretrained but instead meant to be fine-tuned for your downstream task.
326
+
327
+ ## Frontier Safety
328
+
329
+ Biohub has established a safety team to assess the benefits and potential risks of our models and tools prior to release, and develop mitigations where necessary. Informed by our risk assessments, we are releasing the source code and model weights for ESMC 6B, ESMFold2, and ESMC SAEs. We are also releasing our ESM Atlas dataset and binder design system openly.
330
+
331
+ Prior to release, we conducted evaluations to inform our understanding of capability uplift for specific misuse-relevant functional tasks. The full details of these evaluations are available in our corresponding paper appendix.
332
+
333
+ [Biohub.ai](http://Biohub.ai) Platform: We implement guardrails that detect and restrict the use of keywords and sequences corresponding to controlled pathogens and toxins on our freely accessible platform. For further details regarding these guardrails, please refer to our Biohub platform Resources page.
334
+
335
+ ## Biases and Limitations
336
+
337
+ ### Potential Biases
338
+
339
+ - **Dataset bias:** Over- or under-representation of taxa, protein families, or ecological niches in public sequence and structure databases influences generalization and can bias outputs. This is partially mitigated by clustering-based, nonredundant sampling.
340
+
341
+ ### Limitations
342
+
343
+ - **Context window:** ESMC has a context window limit of 2048 tokens.
344
+ - **Reliance on in-silico metrics:** Computational metrics do not replace wet-lab validation.
345
+
346
+ ### Out-of-Scope or Unauthorized Use Cases
347
+
348
+ Do not use the model for the following purposes:
349
+
350
+ - Any use that is prohibited by the [Acceptable Use Policy](https://biohub.org/acceptable-use-policy/).
351
+
352
+ ### Caveats and Recommendations
353
+
354
+ - Review and validate outputs generated by the model.
355
+ - We are committed to advancing the responsible development and use of artificial intelligence.
356
+ - Should you have any security or privacy issues or questions related to the services, please reach out to our team at [support@biohub.org](mailto:support@biohub.org).
357
+
358
+ [pal]: images/contact_pal.png
config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ESMCForMaskedLM"
4
+ ],
5
+ "classifier_dropout": 0.1,
6
+ "d_model": 1152,
7
+ "dtype": "float32",
8
+ "initializer_range": 0.02,
9
+ "mask_token_id": 32,
10
+ "model_type": "esmc",
11
+ "n_heads": 18,
12
+ "n_layers": 36,
13
+ "pad_token_id": 1,
14
+ "tie_word_embeddings": false,
15
+ "transformers_version": "4.57.6",
16
+ "vocab_size": 64
17
+ }
images/contact_pal.png ADDED
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4232c30fd35fe2f57051ec88a703996ac94520580b4b836894207a3d45d9ff8
3
+ size 2300205696
special_tokens_map.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "|"
4
+ ],
5
+ "cls_token": "<cls>",
6
+ "eos_token": "<eos>",
7
+ "mask_token": "<mask>",
8
+ "pad_token": "<pad>",
9
+ "unk_token": "<unk>"
10
+ }
tokenizer.json ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.0",
3
+ "truncation": null,
4
+ "padding": null,
5
+ "added_tokens": [
6
+ {
7
+ "id": 0,
8
+ "content": "<cls>",
9
+ "single_word": false,
10
+ "lstrip": false,
11
+ "rstrip": false,
12
+ "normalized": false,
13
+ "special": true
14
+ },
15
+ {
16
+ "id": 1,
17
+ "content": "<pad>",
18
+ "single_word": false,
19
+ "lstrip": false,
20
+ "rstrip": false,
21
+ "normalized": false,
22
+ "special": true
23
+ },
24
+ {
25
+ "id": 2,
26
+ "content": "<eos>",
27
+ "single_word": false,
28
+ "lstrip": false,
29
+ "rstrip": false,
30
+ "normalized": false,
31
+ "special": true
32
+ },
33
+ {
34
+ "id": 3,
35
+ "content": "<unk>",
36
+ "single_word": false,
37
+ "lstrip": false,
38
+ "rstrip": false,
39
+ "normalized": false,
40
+ "special": true
41
+ },
42
+ {
43
+ "id": 31,
44
+ "content": "|",
45
+ "single_word": false,
46
+ "lstrip": false,
47
+ "rstrip": false,
48
+ "normalized": false,
49
+ "special": true
50
+ },
51
+ {
52
+ "id": 32,
53
+ "content": "<mask>",
54
+ "single_word": false,
55
+ "lstrip": false,
56
+ "rstrip": false,
57
+ "normalized": false,
58
+ "special": true
59
+ }
60
+ ],
61
+ "normalizer": null,
62
+ "pre_tokenizer": null,
63
+ "post_processor": {
64
+ "type": "TemplateProcessing",
65
+ "single": [
66
+ {
67
+ "SpecialToken": {
68
+ "id": "<cls>",
69
+ "type_id": 0
70
+ }
71
+ },
72
+ {
73
+ "Sequence": {
74
+ "id": "A",
75
+ "type_id": 0
76
+ }
77
+ },
78
+ {
79
+ "SpecialToken": {
80
+ "id": "<eos>",
81
+ "type_id": 0
82
+ }
83
+ }
84
+ ],
85
+ "pair": [
86
+ {
87
+ "Sequence": {
88
+ "id": "A",
89
+ "type_id": 0
90
+ }
91
+ },
92
+ {
93
+ "Sequence": {
94
+ "id": "B",
95
+ "type_id": 1
96
+ }
97
+ }
98
+ ],
99
+ "special_tokens": {
100
+ "<cls>": {
101
+ "id": "<cls>",
102
+ "ids": [
103
+ 0
104
+ ],
105
+ "tokens": [
106
+ "<cls>"
107
+ ]
108
+ },
109
+ "<eos>": {
110
+ "id": "<eos>",
111
+ "ids": [
112
+ 2
113
+ ],
114
+ "tokens": [
115
+ "<eos>"
116
+ ]
117
+ }
118
+ }
119
+ },
120
+ "decoder": null,
121
+ "model": {
122
+ "type": "BPE",
123
+ "dropout": null,
124
+ "unk_token": "<unk>",
125
+ "continuing_subword_prefix": null,
126
+ "end_of_word_suffix": null,
127
+ "fuse_unk": false,
128
+ "byte_fallback": false,
129
+ "ignore_merges": false,
130
+ "vocab": {
131
+ "<cls>": 0,
132
+ "<pad>": 1,
133
+ "<eos>": 2,
134
+ "<unk>": 3,
135
+ "L": 4,
136
+ "A": 5,
137
+ "G": 6,
138
+ "V": 7,
139
+ "S": 8,
140
+ "E": 9,
141
+ "R": 10,
142
+ "T": 11,
143
+ "I": 12,
144
+ "D": 13,
145
+ "P": 14,
146
+ "K": 15,
147
+ "Q": 16,
148
+ "N": 17,
149
+ "F": 18,
150
+ "Y": 19,
151
+ "M": 20,
152
+ "H": 21,
153
+ "W": 22,
154
+ "C": 23,
155
+ "X": 24,
156
+ "B": 25,
157
+ "U": 26,
158
+ "Z": 27,
159
+ "O": 28,
160
+ ".": 29,
161
+ "-": 30,
162
+ "|": 31,
163
+ "<mask>": 32
164
+ },
165
+ "merges": []
166
+ }
167
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<cls>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "<eos>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "31": {
36
+ "content": "|",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "32": {
44
+ "content": "<mask>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ }
51
+ },
52
+ "additional_special_tokens": [
53
+ "|"
54
+ ],
55
+ "bos_token": "<cls>",
56
+ "clean_up_tokenization_spaces": false,
57
+ "cls_token": "<cls>",
58
+ "eos_token": "<eos>",
59
+ "extra_special_tokens": {},
60
+ "mask_token": "<mask>",
61
+ "model_max_length": 1000000000000000019884624838656,
62
+ "pad_token": "<pad>",
63
+ "tokenizer_class": "ESMCTokenizer",
64
+ "unk_token": "<unk>"
65
+ }