rahuldhodapkar
commited on
Commit
•
edb7a65
1
Parent(s):
cc22f22
initial commit
Browse files- README.md +83 -0
- all_results.json +15 -0
- config.json +39 -0
- eval_results.json +10 -0
- merges.txt +0 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +23 -0
- tokenizer.json +0 -0
- tokenizer_config.json +10 -0
- train_results.json +8 -0
- trainer_state.json +103 -0
- training_args.bin +3 -0
- vocab.json +0 -0
README.md
CHANGED
@@ -1,3 +1,86 @@
|
|
1 |
---
|
2 |
license: cc-by-nc-nd-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: cc-by-nc-nd-4.0
|
3 |
+
metrics:
|
4 |
+
- accuracy
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
- Text Generation
|
8 |
+
- Primary Sequence Prediction
|
9 |
+
model-index:
|
10 |
+
- name: protgpt2-finetuned-sarscov2-rbd
|
11 |
+
results: []
|
12 |
---
|
13 |
+
|
14 |
+
# Model Card for `protgpt2-finetuned-sarscov2-rbd`
|
15 |
+
|
16 |
+
This model is a fine-tuned version of [nferruz/ProtGPT2](https://huggingface.co/nferruz/ProtGPT2) on sequences from the NCBI Virus Data Portal.
|
17 |
+
|
18 |
+
It achieves the following results on the evaluation set:
|
19 |
+
- Loss: 1.1674
|
20 |
+
- Accuracy: 0.8883
|
21 |
+
|
22 |
+
## Model description
|
23 |
+
|
24 |
+
This model is a fine-tuned checkpoint of
|
25 |
+
[ProtGPT2](https://huggingface.co/nferruz/ProtGPT2), which was originally
|
26 |
+
trained on the UniRef50 (version 2021_04) database. For a detailed overview
|
27 |
+
of the original model configuration and architecture, please see the linked
|
28 |
+
model card, or refer to the ProtGPT2 publication.
|
29 |
+
|
30 |
+
The model was finetuned on data from the SARS-CoV-2 Spike (surface glycoprotein)
|
31 |
+
receptor binding domain (RBD).
|
32 |
+
|
33 |
+
A repository with the training scripts, train and test data partitions, as well
|
34 |
+
as evaluation code is available on GitHub at
|
35 |
+
(https://github.com/rahuldhodapkar/PredictSARSVariants).
|
36 |
+
|
37 |
+
## Intended uses & limitations
|
38 |
+
|
39 |
+
This model is intended to generate synthetic SARS-CoV-2 surface glycoprotein
|
40 |
+
(a.k.a. spike protein) sequences for the purpose of identifying meaningful
|
41 |
+
variants for characterization either experimentally or through other
|
42 |
+
*in silico* tools. These variants may be used to drive vaccine develop to
|
43 |
+
protect against never-before-seen point mutants that are probable in the future.
|
44 |
+
|
45 |
+
As this model is based on the original ProtGPT2 model, it is subject to many
|
46 |
+
of the same limitations as the base model. Any biases present in the UniRef50
|
47 |
+
dataset will also be present in the model, which may include nonuniform skew
|
48 |
+
of peptides sampled across different taxonomic clades. These limitations
|
49 |
+
should be considered when interpreting the output of this model.
|
50 |
+
|
51 |
+
## Training and evaluation data
|
52 |
+
|
53 |
+
SARS-CoV-2 spike protein sequences were obtained from the NIH Sars-CoV-2 Data Hub
|
54 |
+
accessible at
|
55 |
+
|
56 |
+
https://www.ncbi.nlm.nih.gov/labs/virus/vssi/
|
57 |
+
|
58 |
+
Note that the reference sequence for the surface glycoprotein can be found at:
|
59 |
+
|
60 |
+
https://www.ncbi.nlm.nih.gov/protein/1791269090
|
61 |
+
|
62 |
+
As the loaded ProtGPT2 model was pretrained on the
|
63 |
+
UniRef50 (version 2021_04) dataset, it cannot have contained sequencing
|
64 |
+
data that was generated after that date. Evaluations will be conducted using
|
65 |
+
SARS-CoV-2 sequences generated on or after May 2021.
|
66 |
+
|
67 |
+
## Training procedure
|
68 |
+
|
69 |
+
### Training hyperparameters
|
70 |
+
|
71 |
+
The following hyperparameters were used during training:
|
72 |
+
- learning_rate: 1e-05
|
73 |
+
- train_batch_size: 16
|
74 |
+
- eval_batch_size: 16
|
75 |
+
- seed: 42
|
76 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
77 |
+
- lr_scheduler_type: linear
|
78 |
+
- num_epochs: 3.0
|
79 |
+
|
80 |
+
### Framework versions
|
81 |
+
|
82 |
+
- Transformers 4.26.0.dev0
|
83 |
+
- Pytorch 1.11.0
|
84 |
+
- Datasets 2.8.0
|
85 |
+
- Tokenizers 0.13.2
|
86 |
+
|
all_results.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"eval_accuracy": 0.88832083168838,
|
4 |
+
"eval_loss": 1.1674294471740723,
|
5 |
+
"eval_runtime": 2701.99,
|
6 |
+
"eval_samples": 17880,
|
7 |
+
"eval_samples_per_second": 6.617,
|
8 |
+
"eval_steps_per_second": 0.414,
|
9 |
+
"perplexity": 3.2137209721788196,
|
10 |
+
"train_loss": 0.6325470058006347,
|
11 |
+
"train_runtime": 19128.0107,
|
12 |
+
"train_samples": 35882,
|
13 |
+
"train_samples_per_second": 5.628,
|
14 |
+
"train_steps_per_second": 0.352
|
15 |
+
}
|
config.json
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "nferruz/ProtGPT2",
|
3 |
+
"activation_function": "gelu_new",
|
4 |
+
"architectures": [
|
5 |
+
"GPT2LMHeadModel"
|
6 |
+
],
|
7 |
+
"attn_pdrop": 0.1,
|
8 |
+
"bos_token_id": 0,
|
9 |
+
"embd_pdrop": 0.1,
|
10 |
+
"eos_token_id": 0,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"layer_norm_epsilon": 1e-05,
|
13 |
+
"model_type": "gpt2",
|
14 |
+
"n_ctx": 1024,
|
15 |
+
"n_embd": 1280,
|
16 |
+
"n_head": 20,
|
17 |
+
"n_inner": null,
|
18 |
+
"n_layer": 36,
|
19 |
+
"n_positions": 1024,
|
20 |
+
"reorder_and_upcast_attn": false,
|
21 |
+
"resid_pdrop": 0.1,
|
22 |
+
"scale_attn_by_inverse_layer_idx": false,
|
23 |
+
"scale_attn_weights": true,
|
24 |
+
"summary_activation": null,
|
25 |
+
"summary_first_dropout": 0.1,
|
26 |
+
"summary_proj_to_labels": true,
|
27 |
+
"summary_type": "cls_index",
|
28 |
+
"summary_use_proj": true,
|
29 |
+
"task_specific_params": {
|
30 |
+
"text-generation": {
|
31 |
+
"do_sample": true,
|
32 |
+
"max_length": 50
|
33 |
+
}
|
34 |
+
},
|
35 |
+
"torch_dtype": "float32",
|
36 |
+
"transformers_version": "4.26.0.dev0",
|
37 |
+
"use_cache": true,
|
38 |
+
"vocab_size": 50257
|
39 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"eval_accuracy": 0.88832083168838,
|
4 |
+
"eval_loss": 1.1674294471740723,
|
5 |
+
"eval_runtime": 2701.99,
|
6 |
+
"eval_samples": 17880,
|
7 |
+
"eval_samples_per_second": 6.617,
|
8 |
+
"eval_steps_per_second": 0.414,
|
9 |
+
"perplexity": 3.2137209721788196
|
10 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1c63729d4a9f5aa4a5b4a913f28958e6b98b75b68dcdf52f17328f1a742ab7eb
|
3 |
+
size 3134031497
|
special_tokens_map.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<|endoftext|>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "<|endoftext|>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"unk_token": {
|
17 |
+
"content": "<|endoftext|>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": true,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
}
|
23 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"bos_token": "<|endoftext|>",
|
4 |
+
"eos_token": "<|endoftext|>",
|
5 |
+
"model_max_length": 1000000000000000019884624838656,
|
6 |
+
"name_or_path": "nferruz/ProtGPT2",
|
7 |
+
"special_tokens_map_file": "/home/rd389/.cache/huggingface/hub/models--nferruz--ProtGPT2/snapshots/24c0e18bf98bb165c8c745c5d179af1aec2ed0c1/special_tokens_map.json",
|
8 |
+
"tokenizer_class": "GPT2Tokenizer",
|
9 |
+
"unk_token": "<|endoftext|>"
|
10 |
+
}
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"train_loss": 0.6325470058006347,
|
4 |
+
"train_runtime": 19128.0107,
|
5 |
+
"train_samples": 35882,
|
6 |
+
"train_samples_per_second": 5.628,
|
7 |
+
"train_steps_per_second": 0.352
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 3.0,
|
5 |
+
"global_step": 6729,
|
6 |
+
"is_hyper_param_search": false,
|
7 |
+
"is_local_process_zero": true,
|
8 |
+
"is_world_process_zero": true,
|
9 |
+
"log_history": [
|
10 |
+
{
|
11 |
+
"epoch": 0.22,
|
12 |
+
"learning_rate": 9.25694754049636e-06,
|
13 |
+
"loss": 2.6361,
|
14 |
+
"step": 500
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"epoch": 0.45,
|
18 |
+
"learning_rate": 8.513895080992719e-06,
|
19 |
+
"loss": 1.8094,
|
20 |
+
"step": 1000
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"epoch": 0.67,
|
24 |
+
"learning_rate": 7.770842621489078e-06,
|
25 |
+
"loss": 1.1517,
|
26 |
+
"step": 1500
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"epoch": 0.89,
|
30 |
+
"learning_rate": 7.027790161985437e-06,
|
31 |
+
"loss": 0.6839,
|
32 |
+
"step": 2000
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"epoch": 1.11,
|
36 |
+
"learning_rate": 6.284737702481796e-06,
|
37 |
+
"loss": 0.4235,
|
38 |
+
"step": 2500
|
39 |
+
},
|
40 |
+
{
|
41 |
+
"epoch": 1.34,
|
42 |
+
"learning_rate": 5.541685242978154e-06,
|
43 |
+
"loss": 0.3156,
|
44 |
+
"step": 3000
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 1.56,
|
48 |
+
"learning_rate": 4.798632783474514e-06,
|
49 |
+
"loss": 0.2609,
|
50 |
+
"step": 3500
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"epoch": 1.78,
|
54 |
+
"learning_rate": 4.055580323970872e-06,
|
55 |
+
"loss": 0.2301,
|
56 |
+
"step": 4000
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"epoch": 2.01,
|
60 |
+
"learning_rate": 3.3125278644672313e-06,
|
61 |
+
"loss": 0.2043,
|
62 |
+
"step": 4500
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"epoch": 2.23,
|
66 |
+
"learning_rate": 2.5694754049635905e-06,
|
67 |
+
"loss": 0.1912,
|
68 |
+
"step": 5000
|
69 |
+
},
|
70 |
+
{
|
71 |
+
"epoch": 2.45,
|
72 |
+
"learning_rate": 1.8264229454599496e-06,
|
73 |
+
"loss": 0.1811,
|
74 |
+
"step": 5500
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"epoch": 2.67,
|
78 |
+
"learning_rate": 1.0833704859563087e-06,
|
79 |
+
"loss": 0.1756,
|
80 |
+
"step": 6000
|
81 |
+
},
|
82 |
+
{
|
83 |
+
"epoch": 2.9,
|
84 |
+
"learning_rate": 3.403180264526676e-07,
|
85 |
+
"loss": 0.1709,
|
86 |
+
"step": 6500
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"epoch": 3.0,
|
90 |
+
"step": 6729,
|
91 |
+
"total_flos": 1.171282836455424e+17,
|
92 |
+
"train_loss": 0.6325470058006347,
|
93 |
+
"train_runtime": 19128.0107,
|
94 |
+
"train_samples_per_second": 5.628,
|
95 |
+
"train_steps_per_second": 0.352
|
96 |
+
}
|
97 |
+
],
|
98 |
+
"max_steps": 6729,
|
99 |
+
"num_train_epochs": 3,
|
100 |
+
"total_flos": 1.171282836455424e+17,
|
101 |
+
"trial_name": null,
|
102 |
+
"trial_params": null
|
103 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f82b7bc7acc27b5a9e6cfbe5b41cd08a0822f87cd2da530f0cc4beda359278ba
|
3 |
+
size 3439
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|