Update README.md
Browse files
README.md
CHANGED
@@ -6,10 +6,8 @@
|
|
6 |
## Model Architectural Details
|
7 |
DNA FM 7B is based on the bidirectional transformer encoder (BERT) architecture with single-nucleotide tokenization, and is optimized using a masked language modeling (MLM) training objective.
|
8 |
|
9 |
-
To learn semantically meaningful representations, we employed an BERT-style encoder-only dense transformer architecture. We make minor updates to this architecture to align with current best practices, including using SwiGLU and LayerNorms. Additionally, we use Rotary Positional Embeddings (RoPE), given that DNA syntax does not function based on absolute nucleotide positions but nucleotides interact in highly local and context-specific ways.
|
10 |
-
|
11 |
-
Below are more detailes about the model architecture
|
12 |
-
| Model Arch Component | Value |
|
13 |
| ------------- |:-------------:|
|
14 |
| Num Attention Heads | 32 |
|
15 |
| Num Hidden Layers | 32 |
|
@@ -22,15 +20,24 @@
|
|
22 |
Here we briefly introduce the details of pre-training of DNA FM 7B. For more detailed information, please refer to [our paper](https://openreview.net/forum?id=Kis8tVUeNi&referrer=%5BAuthor%20Console%5D(%2Fgroup%3Fid%3DNeurIPS.cc%2F2024%2FWorkshop%2FAIDrugX%2FAuthors%23your-submissions)).
|
23 |
|
24 |
### Data
|
25 |
-
To test whether representation capacity has limited the development of DNA language models in previous studies, we utilize the data set and splits from the Nucleotide Transformer. Starting from a total of 812 genomes with 712 for training, 50 for validation, and 50 for testing, we removed 17 entries which had been deleted from NCBI since the original dataset’s publication on Hugging Face. One of these was the important model organism Rattus norvegigus, which we replaced with the current reference genome. This resulted in 696 genomes for training, 50 for validation, and 50 for testing. We pre-trained DNA FM 7B With a total of 10.6 billion training tokens.
|
26 |
|
27 |
### Training Details
|
28 |
-
The weights of our seven billion parameter model occupy over 200GB of memory in 32 bit precision. To train a model of this size, we use model parallelism to split training across 256 H100 GPUs using the Megatron-LM framework. We also employed bfloat16 mixed precision training and FlashAttention-2 to allow for training with large context length at scale. With
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
## Evaluation of DNA FM 7B
|
31 |
We evaluate the benefits of pretraining DNA FM 7B by conducting a comprehensive series of experiments related to functional genomics, genome mining, metabolic engineering, synthetic biology, and therapeutics design, covering supervised, unsupervised, and generative objectives. Unless otherwise stated, hyperparameters were determined by optimizing model performance on a 10% validation split of the training data, and models were tested using the checkpoint with the lowest validation loss. For more detailed information, please refer to [our paper](https://openreview.net/forum?id=Kis8tVUeNi&referrer=%5BAuthor%20Console%5D(%2Fgroup%3Fid%3DNeurIPS.cc%2F2024%2FWorkshop%2FAIDrugX%2FAuthors%23your-submissions)).
|
32 |
|
33 |
-
##
|
34 |
TODO (@Caleb), we will need to see what results we want to put here.
|
35 |
|
36 |
## How to Use
|
|
|
6 |
## Model Architectural Details
|
7 |
DNA FM 7B is based on the bidirectional transformer encoder (BERT) architecture with single-nucleotide tokenization, and is optimized using a masked language modeling (MLM) training objective.
|
8 |
|
9 |
+
To learn semantically meaningful representations, we employed an BERT-style encoder-only dense transformer architecture. We make minor updates to this architecture to align with current best practices, including using SwiGLU and LayerNorms. Additionally, we use Rotary Positional Embeddings (RoPE), given that DNA syntax does not function based on absolute nucleotide positions but nucleotides interact in highly local and context-specific ways. Below are more detailes about the model architecture:
|
10 |
+
| Model Arch Component | Value |
|
|
|
|
|
11 |
| ------------- |:-------------:|
|
12 |
| Num Attention Heads | 32 |
|
13 |
| Num Hidden Layers | 32 |
|
|
|
20 |
Here we briefly introduce the details of pre-training of DNA FM 7B. For more detailed information, please refer to [our paper](https://openreview.net/forum?id=Kis8tVUeNi&referrer=%5BAuthor%20Console%5D(%2Fgroup%3Fid%3DNeurIPS.cc%2F2024%2FWorkshop%2FAIDrugX%2FAuthors%23your-submissions)).
|
21 |
|
22 |
### Data
|
23 |
+
To test whether representation capacity has limited the development of DNA language models in previous studies, we utilize the data set and splits from the Nucleotide Transformer. Starting from a total of `812` genomes with `712` for training, `50` for validation, and `50` for testing, we removed `17` entries which had been deleted from NCBI since the original dataset’s publication on Hugging Face. One of these was the important model organism Rattus norvegigus, which we replaced with the current reference genome. This resulted in `696` genomes for training, `50` for validation, and `50` for testing. We pre-trained DNA FM 7B With a total of 10.6 billion training tokens.
|
24 |
|
25 |
### Training Details
|
26 |
+
The weights of our seven billion parameter model occupy over 200GB of memory in 32 bit precision. To train a model of this size, we use model parallelism to split training across 256 H100 GPUs using the Megatron-LM framework. We also employed bfloat16 mixed precision training and FlashAttention-2 to allow for training with large context length at scale. With this configuration, DNA FM 7B took 8 days to train.
|
27 |
+
| Hyper-params | Value |
|
28 |
+
| ------------- |:-------------:|
|
29 |
+
| Global Batch Size | 1024 |
|
30 |
+
| Per Device Micro Batch Size | 2 |
|
31 |
+
| Precision | Mixed FP32-BF16 |
|
32 |
+
| Total Iters | 100000 |
|
33 |
+
|
34 |
+
### Tokenization
|
35 |
+
To minimize bias and learn high-resolution single-nucleotide dependencies, we opted to align closely with the real data and use character-level tokenization with a 5-letter vocabulary: `A, T, C, G, N`, where `N` is commonly used in gene sequencing to denote uncertain elements. Sequences were also prefixed with a `[CLS]` token and suffixed with a `[EOS]` token as hooks for downstream tasks. We chose a context length of 4,000 nucleotides as the longest context which would fit within DNA FM 7B during pretraining, and chunked our dataset of 796 genomes into non-overlapping segments.
|
36 |
|
37 |
## Evaluation of DNA FM 7B
|
38 |
We evaluate the benefits of pretraining DNA FM 7B by conducting a comprehensive series of experiments related to functional genomics, genome mining, metabolic engineering, synthetic biology, and therapeutics design, covering supervised, unsupervised, and generative objectives. Unless otherwise stated, hyperparameters were determined by optimizing model performance on a 10% validation split of the training data, and models were tested using the checkpoint with the lowest validation loss. For more detailed information, please refer to [our paper](https://openreview.net/forum?id=Kis8tVUeNi&referrer=%5BAuthor%20Console%5D(%2Fgroup%3Fid%3DNeurIPS.cc%2F2024%2FWorkshop%2FAIDrugX%2FAuthors%23your-submissions)).
|
39 |
|
40 |
+
## Results
|
41 |
TODO (@Caleb), we will need to see what results we want to put here.
|
42 |
|
43 |
## How to Use
|