NTv3 is a genomic foundation model that reads DNA at single-base resolution across up to 1 Mb of context in one pass. One architecture supports three capabilities: functional-track prediction, gene annotation and regulatory sequence design. The backbone is U-Net-style: a convolutional tower that reads the sequence, a Transformer tower that carries long-range context, and a deconvolutional tower that returns predictions at base resolution.
The three capabilities are acquired in stages, each building on the one before. NTv3 is first pretrained by masked-token prediction on unlabeled genomes from the OpenGenome2 corpus. It is then post-trained on functional tracks, a supervised multi-task stage over 16,262 tracks from 15 species, which gives the first capability. The other two are built from those same functional representations: annotation fine-tuning on reference gene annotations, and generative post-training by masked diffusion on MPRA activity datasets. The checkpoints below are the pretrained backbone, tracks and annotation, plus the plant promoter model of the paper as an example of the generative ones.
Because it is one backbone and one set of learned representations throughout, what NTv3 learns about sequence function carries across tasks and across species rather than being relearned for each.
NTv3 is a family rather than a single model. One 700M-parameter backbone is trained once on unlabeled genomes, then specialised into a checkpoint per capability, so each one inherits what the others learned about sequence rather than starting over.
Start from NTv3-pretrained for embeddings, masked-token prediction, or your own fine-tuning on a task we have not covered. Reach for NTv3-tracks to predict functional signal, chromatin accessibility, histone marks, transcription factor binding and expression, anywhere in a supported genome. Use NTv3-annotate to call genes from sequence alone, choosing the model for your clade.
| Model | Stage | What it is for | Repository |
|---|---|---|---|
| NTv3-pretrained | Pretrained | Embeddings, masked-token prediction, starting point for your own fine-tuning | InstaDeepAI/NTv3_pretrained |
| NTv3-tracks | Tracks post-training | Functional-track prediction, and the backbone for downstream fine-tuning. NTv3_tracks_1mb is the 1 Mb specialist; 1 Mb inputs only |
InstaDeepAI/NTv3_tracksInstaDeepAI/NTv3_tracks_1mb
|
| NTv3-annotate | Annotation fine-tuning | Ab initio gene prediction, one model per clade |
InstaDeepAI/NTv3_annot_mammalsInstaDeepAI/NTv3_annot_plantsInstaDeepAI/NTv3_annot_insects
|
| NTv3-generative-plant-promoter | Generative post-training | Example generative model used in the paper: designs plant core promoters at a requested strength, and is what notebook 06 runs | InstaDeepAI/NTv3_generative_plant_promoter |
The notebooks cover the workflows end to end. All run against the published checkpoints and are linked.
00_quickstart_inference.ipynb01_tracks_prediction.ipynb02_fine_tuning_bigwig_tracks.ipynb03a_genome_annotation_training.ipynb03b_genome_annotation_decoding.ipynb03c_genome_annotation_evaluation.ipynb04_model_interpretation.ipynb05_diffusion_fine_tuning.ipynb06_plant_promoter_generation.ipynbEmbeddings and masked-token prediction, the starting point for your own fine-tuning.
import torch
from transformers import AutoModel, AutoTokenizer
model_name = "InstaDeepAI/NTv3_pretrained"
model = AutoModel.from_pretrained(model_name, trust_remote_code=True).eval()
tok = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
# Input length must be a multiple of 128. Batch only equal-length sequences:
# padding is NOT masked out, so a padded sequence gets different values than
# the same sequence run on its own.
batch = tok(["ACGT" * 32, "TTGA" * 32], add_special_tokens=False, return_tensors="pt")
# The forward takes the token tensor positionally, not the tokenizer dict
with torch.no_grad():
out = model(batch["input_ids"])
print(out["logits"].shape) # (B, L, V = 11)
print(out["embedding"].shape) # (B, L, 1024)
Multi-scale analysis of a genomic region: predicted tracks, attention and saliency.
Give the pipeline a genomic region and the tracks you want, and it fetches the sequence, conditions on the species, predicts and plots.
from transformers import pipeline
ntv3_tracks = pipeline("ntv3-tracks", model="InstaDeepAI/NTv3_tracks", trust_remote_code=True)
out = ntv3_tracks(
{"chrom": "chr19", "start": 6_700_000, "end": 6_732_768, "species": "human"},
plot=True,
tracks_to_plot={
"K562 RNA-seq": "ENCSR056HPM",
"K562 DNAse": "ENCSR921NMD",
"K562 H3k4me3": "ENCSR000DWD",
"K562 CTCF": "ENCSR000AKO",
},
)
print(out.tracks.shape) # (12288, 4): the central 37.5 % of the window
print(out.coordinates) # (6710240, 6722528), the span actually predicted
print(out.track("ENCSR000AKO").shape) # (12288,): one track
Turns a genome FASTA into its predicted gene annotation (GFF3): the production pipeline tiles every chromosome into 1 Mb windows, runs the clade model and decodes the gene models. Here is a single-chromosome example on a test species.
# 1. Get the code
git clone git@github.com:instadeepai/nucleotide-transformer-private.git
cd nucleotide-transformer-private
# 2. Install with GPU support, then check that JAX sees the GPU
python3 -m venv .venv && source .venv/bin/activate
pip install '.[gpu]'
python -c "import jax; print(jax.devices())" # should list a CudaDevice
# 3. Get chromosome 31 of the monarch butterfly (2.8 Mb, soft-masked)
NCBI=https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/018/135/715/GCF_018135715.1_MEX_DaPlex
curl -sSfLO $NCBI/GCF_018135715.1_MEX_DaPlex_genomic.fna.gz
gunzip GCF_018135715.1_MEX_DaPlex_genomic.fna.gz
faidx GCF_018135715.1_MEX_DaPlex_genomic.fna NC_083558.1 > danaus_chr31.fa
# 4. Annotate it with the insect model (weights download on the first run)
export HF_TOKEN=hf_... # needed while the model repos are private
ntv3-annotate --genome danaus_chr31.fa --model_cfg insects --out danaus_chr31.gff3
# 5. Look at one predicted gene: a gene line, then its exons (CDS) and introns
awk '$4 >= 2334916 && $5 <= 2337940' danaus_chr31.gff3 | cut -f 1,3-5,7
# NC_083558.1 gene 2334916 2337940 -
# NC_083558.1 CDS 2334916 2334969 -
# NC_083558.1 intron 2334970 2335582 -
# NC_083558.1 CDS 2335583 2335753 -
# NC_083558.1 intron 2335754 2336418 -
# NC_083558.1 CDS 2336419 2336565 -
# NC_083558.1 intron 2336566 2336820 -
# NC_083558.1 CDS 2336821 2336932 -
# NC_083558.1 intron 2336933 2337785 -
# NC_083558.1 CDS 2337786 2337940 -
The predicted genes (blue) over 34 kb of chromosome 31, against the RefSeq reference (grey). Four genes match the reference exon for exon, including the one printed above; the rightmost reference gene is missed.
--model_cfg mammals or
--model_cfg plants with a genome of that clade. Notebook
03b explains how the gene models are decoded, and notebook 03c scores a GFF3
against the benchmark reference.