All models

nucleotide_transformer

A Transformer language model pre-trained on DNA sequences with masked 6-mer tokens.

Molecules, proteins and genomics · 114 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (6 KB)

Open in a new tab

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
60.7K
Operations
114
Framework
PyTorch
Recurrent
No
Published
2023, Nature Methods
Cited by
671 (as of 29 October 2026)
Authors
Hugo Dalla-Torre, Liam Gonzalez, Javier Mendoza‐Revilla and others
License
CC-BY-NC-SA-4.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m7822
Graph hash
7df9e80f65d0e26b7b9421ad6006ed1781bea80a17c1d2ce4bbe9878cf250842
Skeleton hash
633a61f22f4b3620044e300c20ab1b85a8c878e3435cd57fa76969a9e2e29606
Architecture hash
41fcd0051fd7d049e1388b5aaa2bb7c2139d6017c505a6d82e9ef9efdc4a4068
Diagram SHA-256
f0fee62cd01c08faef2c16caa230dcc0f37ac5ccd325c88292df60a8068b097c
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

The Nucleotide Transformer is a collection of Transformer language models pre-trained on DNA sequences, which the paper presents as foundation models for genomics. In the paper the models range from 50 million to 2.5 billion parameters and draw on 3,202 human genomes and 850 genomes from diverse species.

Training uses masked language modeling, treating sequences of nucleotides as sentences and 6-mers as words. As in BERT, all positions in the sequence can attend to each other, so information flows in both directions. The tokenizer uses 6-mers when possible and otherwise tokenizes each nucleotide separately.

A second generation, NT-v2, spans 50 million to 500 million parameters in the paper and adds rotary embeddings and swiGLU activations while removing MLP biases and dropout. Its context length is extended to 12 kb. The paper reports that one of these models matches the performance of its earlier best model with one-tenth the number of parameters while doubling the perception field size.

Key idea. The paper pre-trains DNA language models of 50 million to 2.5 billion parameters on human and multispecies genomes and shows they can be fine-tuned at low cost for genomics tasks.

  • Nucleotide Transformer
  • NT-v2
  • NTv2
  • DNA language model
  • genomics foundation model
  • masked language modeling
  • 6-mer tokenizer
  • DNA sequence embeddings
  • InstaDeep

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Dalla_Torre_2024, title={Nucleotide Transformer: building and evaluating robust foundation models for human genomics}, volume={22}, ISSN={1548-7105}, url={http://dx.doi.org/10.1038/s41592-024-02523-z}, DOI={10.1038/s41592-024-02523-z}, number={2}, journal={Nature Methods}, publisher={Springer Science and Business Media LLC}, author={Dalla-Torre, Hugo and Gonzalez, Liam and Mendoza-Revilla, Javier and Lopez Carranza, Nicolas and Grzywaczewski, Adam Henryk and Oteri, Francesco and Dallago, Christian and Trop, Evan and de Almeida, Bernardo P. and Sirelkhatim, Hassan and Richard, Guillaume and Skwark, Marcin and Beguir, Karim and Lopez, Marie and Pierrot, Thomas}, year={2024}, month=Nov, pages={287–297} }