RaphaelMourad commited on
Commit
6ff8ce3
1 Parent(s): aa424b3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +57 -3
README.md CHANGED
@@ -1,3 +1,57 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - pretrained
5
+ - mistral
6
+ - DNA
7
+ - plant
8
+ - Arabidopsis thaliana
9
+ ---
10
+
11
+ # Model Card for Mistral-DNA-v1-422M-Athaliana (Mistral for DNA)
12
+
13
+ The Mistral-DNA-v1-422M-Athaliana Large Language Model (LLM) is a pretrained generative DNA sequence model with 422M parameters.
14
+ It is derived from Mixtral-8x7B-v0.1 model, which was simplified for DNA: the number of layers and the hidden size were reduced.
15
+ The model was pretrained using 10kb DNA sequences from 7 A. thaliana genome assemblies (from https://1001genomes.org/data/MPIPZ/MPIPZJiao2020/releases/current/full_set/).
16
+
17
+ ## Model Architecture
18
+
19
+ Like Mixtral-8x7B-v0.1, it is a transformer model, with the following architecture choices:
20
+ - Grouped-Query Attention
21
+ - Sliding-Window Attention
22
+ - Byte-fallback BPE tokenizer
23
+ - Mixture of Experts
24
+
25
+ ## Load the model from huggingface:
26
+
27
+ ```
28
+ import torch
29
+ from transformers import AutoTokenizer, AutoModel
30
+
31
+ tokenizer = AutoTokenizer.from_pretrained("RaphaelMourad/Mistral-DNA-v1-422M-Athaliana", trust_remote_code=True)
32
+ model = AutoModel.from_pretrained("RaphaelMourad/Mistral-DNA-v1-422M-Athaliana", trust_remote_code=True)
33
+ ```
34
+
35
+ ## Calculate the embedding of a protein sequence
36
+
37
+ ```
38
+ insulin = "TGATGATTGGCGCGGCTAGGATCGGCT"
39
+ inputs = tokenizer(insulin, return_tensors = 'pt')["input_ids"]
40
+ hidden_states = model(inputs)[0] # [1, sequence_length, 256]
41
+
42
+ # embedding with max pooling
43
+ embedding_max = torch.max(hidden_states[0], dim=0)[0]
44
+ print(embedding_max.shape) # expect to be 256
45
+ ```
46
+
47
+ ## Troubleshooting
48
+
49
+ Ensure you are utilizing a stable version of Transformers, 4.34.0 or newer.
50
+
51
+ ## Notice
52
+
53
+ Mistral-DNA-v1-422M-Athaliana is a pretrained base model for DNA.
54
+
55
+ ## Contact
56
+
57
+ Raphaël Mourad. raphael.mourad@univ-tlse3.fr