Transformers
PyTorch
DNA
biology
genomics
Inference Endpoints
lgq12697 commited on
Commit
308629b
1 Parent(s): f73cf97

Add Plant DNAMamba model for open chromatin prediction

Browse files
README.md CHANGED
@@ -1,3 +1,60 @@
1
- ---
2
- license: cc-by-nc-sa-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-sa-4.0
3
+ widget:
4
+ - text: AGTCGCCGCAACCCACACACGGACGGCTCGACGTGGCGATCTTAGCGGCTCATCCGCCCGGCCTCCCTCGCGCTCGATCGCTACGCAGCCTACGCTCGTTTCGCTCGGTTCGGTGGGTCGCCGATCTGGCGCCACGGCGGCTACCAACGACACCGCGATTGAGAAGGGTGCGTGGCCGTGGAGTCGTGGAGAAACGCCCGCGCGCGCGGGTGCGGCGAGGGACGACGACCGCGTCGTGCGGATCGATTGGCGGGGCAGCTCGGCGCCCCG
5
+ tags:
6
+ - DNA
7
+ - biology
8
+ - genomics
9
+ ---
10
+ # Plant foundation DNA large language models
11
+
12
+ The plant DNA large language models (LLMs) contain a series of foundation models based on different model architectures, which are pre-trained on various plant reference genomes.
13
+ All the models have a comparable model size between 90 MB and 150 MB, BPE tokenizer is used for tokenization and 8000 tokens are included in the vocabulary.
14
+
15
+
16
+ **Developed by:** zhangtaolab
17
+
18
+ ### Model Sources
19
+
20
+ - **Repository:** [Plant DNA LLMs](https://github.com/zhangtaolab/plant_DNA_LLMs)
21
+ - **Manuscript:** [Versatile applications of foundation DNA language models in plant genomes]()
22
+
23
+ ### Architecture
24
+
25
+ The model is trained based on the OpenAI GPT-2 model with modified tokenizer specific for DNA sequence.
26
+
27
+ ### How to use
28
+
29
+ Install the runtime library first:
30
+ ```bash
31
+ pip install transformers
32
+ ```
33
+
34
+ Here is a simple code for inference:
35
+ ```python
36
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
37
+
38
+ model_name = 'plant-dnagpt-H3K27ac'
39
+ # load model and tokenizer
40
+ model = AutoModelForSequenceClassification.from_pretrained(f'zhangtaolab/{model_name}', trust_remote_code=True)
41
+ tokenizer = AutoTokenizer.from_pretrained(f'zhangtaolab/{model_name}', trust_remote_code=True)
42
+
43
+ # inference
44
+ sequences = ['GCTTTGGTTTATACCTTACACAACATAAATCACATAGTTAATCCCTAATCGTCTTTGATTCTCAATGTTTTGTTCATTTTTACCATGAACATCATCTGATTGATAAGTGCATAGAGAATTAACGGCTTACACTTTACACTTGCATAGATGATTCCTAAGTATGTCCT',
45
+ 'TAGCCCCCTCCTCTCTTTATATAGTGCAATCTAATATATGAAAGGTTCGGTGATGGGGCCAATAAGTGTATTTAGGCTAGGCCTTCATGGGCCAAGCCCAAAAGTTTCTCAACACTCCCCCTTGAGCACTCACCGCGTAATGTCCATGCCTCGTCAAAACTCCATAAAAACCCAGTG']
46
+ pipe = pipeline('text-classification', model=model, tokenizer=tokenizer,
47
+ trust_remote_code=True, top_k=None)
48
+ results = pipe(sequences)
49
+ print(results)
50
+
51
+ ```
52
+
53
+
54
+ ### Training data
55
+ We use GPT2ForSequenceClassification to fine-tune the model.
56
+ Detailed training procedure can be found in our manuscript.
57
+
58
+
59
+ #### Hardware
60
+ Model was trained on a NVIDIA GTX1080Ti GPU (11 GB).
config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"d_model": 768, "n_layer": 24, "vocab_size": 8000, "ssm_cfg": {}, "rms_norm": true, "residual_in_fp32": true, "fused_add_norm": true, "pad_vocab_size_multiple": 8, "tie_embeddings": true}
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:352f4902d61600228a452de9e91c076e0289d104cced18e10931c4a5c5dc0a15
3
+ size 386759194
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|endoftext|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|endoftext|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<|endoftext|>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<|padding|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ }
20
+ },
21
+ "bos_token": "<|endoftext|>",
22
+ "clean_up_tokenization_spaces": true,
23
+ "eos_token": "<|endoftext|>",
24
+ "max_length": 1024,
25
+ "model_max_length": 512,
26
+ "pad_to_multiple_of": null,
27
+ "pad_token": "<|endoftext|>",
28
+ "pad_token_type_id": 0,
29
+ "padding_side": "right",
30
+ "stride": 0,
31
+ "tokenizer_class": "GPTNeoXTokenizer",
32
+ "truncation_side": "right",
33
+ "truncation_strategy": "longest_first",
34
+ "unk_token": "<|endoftext|>"
35
+ }