DNAGPT
DNAGPT is a GPT-style decoder pre-trained on DNA that handles both sequence tokens and numbers.
Molecules, proteins and genomics · 321 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 113.9M
- Operations
- 321
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2023
- Cited by
- 14 (as of 31 October 2026)
- Authors
- Daoan Zhang, Weitong Zhang, Yu Zhao and others
- License
- PolyForm-Noncommercial-1.0.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m15698
- Graph hash
- 947830d35051118688b9d9265cc4f7c71dac65fa2c89d0ec156564580cc9a9b6
- Skeleton hash
- 0adb1f79f190a9e0249ec257c009ee37040fa334604a08e0f12c7d79b6d2c69a
- Architecture hash
- 1542349c26075372305f0ccf9560e14e5d5e14be67587ab90bcde2c298030d69
- Diagram SHA-256
- 6b89b00665653c9d3a9a3b08acdb3c855b4680d890a397553da81a5d697f1607
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
DNAGPT is a GPT-style autoregressive decoder pre-trained on DNA, built to handle sequences and numbers in one network. The paper argues that earlier pre-trained DNA models used only sequences, which made them unsuitable for tasks with numerical input or output, such as regressing mRNA abundance from a DNA sequence.
A DNA sequence is cut into non-overlapped k-mers, each one a token, and encoded by a sequential embedding layer. Numbers get their own embedding layer, and both sets of embeddings are concatenated and sent into the GPT backbone. On the output side, a classification head classifies tokens and a regression head generates numbers. Pre-training adds two tasks to the next-token objective of the classic GPT: predicting whether the input sequence was flipped, and predicting the guanine-cytosine content of a segment. Instruction tokens prompt the model about what kind of tokens it should output next.
The paper describes four versions. DNAGPT-H, pre-trained on human reference genomes, has 12 transformer layers with 12 attention heads each and a hidden size of 768, and the paper gives its trained parameter count as 0.1 billion. Its sequence length is 4096 tokens, equivalent to 24,576 base pairs. The authors' repository releases this version as a 0.1B checkpoint pretrained with human genomes, next to multi-organism checkpoints at 0.1B and 3B.
Key idea. DNAGPT extends the GPT architecture with sequence-order classification, GC-content regression and a token language so one pre-trained model handles both DNA sequences and numerical data.
- DNAGPT
- DNA-GPT
- DNA language model
- DNA foundation model
- genomics
- DNA sequence analysis
- generative pre-trained transformer
- k-mer tokenization
- mRNA abundance regression
- artificial genome generation
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{zhang2023dnagptgeneralizedpretrainedtool,
title={DNAGPT: A Generalized Pre-trained Tool for Versatile DNA Sequence Analysis Tasks},
author={Daoan Zhang and Weitong Zhang and Yu Zhao and Jianguo Zhang and Bing He and Chenchen Qin and Jianhua Yao},
year={2023},
eprint={2307.05628},
archivePrefix={arXiv},
primaryClass={q-bio.GN},
url={https://arxiv.org/abs/2307.05628},
}