shmelev commited on
Commit
71ed37f
1 Parent(s): 6e16ba5

Upload file

Browse files
README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - dna
4
+ - human_genome
5
+ ---
6
+
7
+ # GENA-LM
8
+
9
+ GENA-LM is a transformer masked language model trained on human DNA sequence.
10
+
11
+ Differences between GENA-LM and DNABERT:
12
+ - BPE tokenization instead of k-mers;
13
+ - input sequence size is about 3000 nucleotides (512 BPE tokens) compared to 510 nucleotides of DNABERT
14
+ - pre-training on T2T vs. GRCh38.p13 human genome assembly.
15
+
16
+ Source code and data: https://github.com/AIRI-Institute/GENA_LM
17
+
18
+ ## Examples
19
+ ### How to load the model to fine-tune it on classification task
20
+ ```python
21
+ from src.gena_lm.modeling_bert import BertForSequenceClassification
22
+ from transformers import AutoTokenizer
23
+
24
+ tokenizer = AutoTokenizer.from_pretrained('AIRI-Institute/gena-lm-bert-base')
25
+ model = BertForSequenceClassification.from_pretrained('AIRI-Institute/gena-lm-bert-base')
26
+ ```
27
+
28
+ ## Model description
29
+ GENA-LM model is trained in a masked language model (MLM) fashion, following the methods proposed in the BigBird paper by masking 85% of tokens. Model config for `gena-lm-bert-base` is similar to the bert-base:
30
+
31
+ - 512 Maximum sequence length
32
+ - 12 Layers, 12 Attention heads
33
+ - 768 Hidden size
34
+ - 32k Vocabulary size
35
+
36
+ We pre-trained `gena-lm-bert-base` using the latest T2T human genome assembly (https://www.ncbi.nlm.nih.gov/assembly/GCA_009914755.3/). Pre-training was performed for 500,000 iterations with the same parameters as in BigBird, except sequence length was equal to 512 tokens and we used pre-layer normalization in Transformer.
37
+
38
+ ## Downstream tasks
39
+ Currently, gena-lm-bert-base model has been finetuned and tested on promoter prediction task. Its' performance is comparable to previous SOTA results. We plan to fine-tune and make available models for other downstream tasks in the near future.
40
+
41
+ ### Fine-tuning GENA-LM on our data and scoring
42
+ After fine-tuning gena-lm-bert-base on promoter prediction dataset, following results were achieved:
43
+
44
+ | model | seq_len (bp) | F1 |
45
+ |--------------------------|--------------|-------|
46
+ | DeePromoter | 300 | 95.60 |
47
+ | GENA-LM bert-base (ours) | 2000 | 95.72 |
48
+ | BigBird | 16000 | 99.90 |
49
+
50
+ We can conclude that our model achieves comparable performance to the previously published results for promoter prediction task.
51
+
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2cf4bf128be400388b87f1ca0b9ef8bf06a0ce218ea3b599362f66175678d5e
3
+ size 456092161
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"tokenizer_class": "PreTrainedTokenizerFast"}