songlab-cal/gpn

Genomic Pretrained Network - GPN, GPN-MSA, PhyloGPN, GPN-Star

Jupyter Notebook

379

432 commits

updated Sep 17, 2026

See the code

README

GPN — Genomic Pretrained Network

CI Documentation PyPI Python 3.13 License

Quick start · Model families · Demos · Documentation

GPN-Star architecture, evolutionary scales, and genomic prediction tasks

Code and resources for genomic language models GPN, GPN-MSA, PhyloGPN and GPN-Star.

Quick start

pip install gpn

Load GPN-Star, our latest model, with standard Transformers AutoClasses:

from gpn import register_auto_classes
from transformers import AutoModelForMaskedLM

register_auto_classes("star")
model = AutoModelForMaskedLM.from_pretrained("songlab/gpn-star-hg38-v100-200m")

Explore the GPN-Star models, alignments, scores, and benchmark datasets.

Model families

ModelPaperNotes
GPNBenegas et al. 2023Requires unaligned genomes
GPN-MSABenegas et al. 2025Requires aligned genomes for training and inference; deprecated in favor of GPN-Star
PhyloGPNAlbors et al. 2025Uses an alignment during training, but does not require it for inference or fine-tuning
GPN-StarYe et al. 2026Requires aligned genomes for training and inference

Command line

Install file-backed inference dependencies with pip install "gpn[inference]" or training dependencies with pip install "gpn[train]".

gpn ss {train,vep,logits,embedding} ...
gpn msa {vep,logits,embedding} ...
gpn star {train,vep,logits,embedding} ...

See the CLI guide for inputs, outputs, and multi-GPU inference.

Training

GPN and GPN-Star can be trained on prepared data using the maintained GPN and GPN-Star recipes.

Demos

Historical analyses

The paper analyses and retired research workflows are preserved in the analysis-archive-2026-08-18 archive.

Development and help

See the documentation, ask questions in Discussions, or report problems in Issues.

GPN is developed in the Song Lab at UC Berkeley and distributed under the MIT License.

Citation

GPN:

@article{benegas2023dna,
  title={DNA language models are powerful predictors of genome-wide variant effects},
  author={Benegas, Gonzalo and Batra, Sanjit Singh and Song, Yun S},
  journal={Proceedings of the National Academy of Sciences},
  volume={120},
  number={44},
  pages={e2311219120},
  year={2023},
  publisher={National Acad Sciences}
}

GPN-MSA:

@article{benegas2025dna,
  title={A DNA language model based on multispecies alignment predicts the effects of genome-wide variants},
  author={Benegas, Gonzalo and Albors, Carlos and Aw, Alan J and Ye, Chengzhong and Song, Yun S},
  journal={Nature Biotechnology},
  pages={1--6},
  year={2025},
  publisher={Nature Publishing Group US New York}
}

PhyloGPN:

@inproceedings{albors2025phylogenetic,
  title={A Phylogenetic Approach to Genomic Language Modeling},
  author={Albors, Carlos and Li, Jianan Canal and Benegas, Gonzalo and Ye, Chengzhong and Song, Yun S},
  booktitle={International Conference on Research in Computational Molecular Biology},
  pages={99--117},
  year={2025},
  organization={Springer}
}

GPN-Star:

@article{ye2026predicting,
  title={Predicting genome-wide functional constraints with GPN-Star},
  author={Ye, Chengzhong and Benegas, Gonzalo and Albors, Carlos and Li, Jianan Canal and Prillo, Sebastian and Fields, Peter D and Clarke, Brian and Song, Yun S},
  journal={Nature},
  pages={1--10},
  year={2026},
  publisher={Nature Publishing Group}
}

Sorghum gene expression prediction:

@article{groover2026mapping,
  title={Mapping cis-regulatory mutations at scale in sorghum enables modulation of gene expression},
  author={Groover, Evan D and Ding, David and Wang, Flora Z and Benegas, Gonzalo and Rivera, Joseph and Schwartz, Shahar and Chen, Stephen and Moubarak, Michael F and Georgieva, Viktoriya and Lemaux, Peggy G and others},
  journal={Nature Biotechnology},
  pages={1--11},
  year={2026},
  publisher={Nature Publishing Group US New York}
}
dna
genomics
language-model
variant-effect-prediction

Contributors

gonzalobenegas

420 commits

cralbors

7 commits

cz-ye

4 commits

canallee

1 commits

songlab-cal/gpn

Genomic Pretrained Network - GPN, GPN-MSA, PhyloGPN, GPN-Star

Jupyter Notebook

379

432 commits

updated Sep 17, 2026

See the code

README

GPN — Genomic Pretrained Network

CI Documentation PyPI Python 3.13 License

Quick start · Model families · Demos · Documentation

GPN-Star architecture, evolutionary scales, and genomic prediction tasks

Code and resources for genomic language models GPN, GPN-MSA, PhyloGPN and GPN-Star.

Quick start

pip install gpn

Load GPN-Star, our latest model, with standard Transformers AutoClasses:

from gpn import register_auto_classes
from transformers import AutoModelForMaskedLM

register_auto_classes("star")
model = AutoModelForMaskedLM.from_pretrained("songlab/gpn-star-hg38-v100-200m")

Explore the GPN-Star models, alignments, scores, and benchmark datasets.

Model families

ModelPaperNotes
GPNBenegas et al. 2023Requires unaligned genomes
GPN-MSABenegas et al. 2025Requires aligned genomes for training and inference; deprecated in favor of GPN-Star
PhyloGPNAlbors et al. 2025Uses an alignment during training, but does not require it for inference or fine-tuning
GPN-StarYe et al. 2026Requires aligned genomes for training and inference

Command line

Install file-backed inference dependencies with pip install "gpn[inference]" or training dependencies with pip install "gpn[train]".

gpn ss {train,vep,logits,embedding} ...
gpn msa {vep,logits,embedding} ...
gpn star {train,vep,logits,embedding} ...

See the CLI guide for inputs, outputs, and multi-GPU inference.

Training

GPN and GPN-Star can be trained on prepared data using the maintained GPN and GPN-Star recipes.

Demos

Historical analyses

The paper analyses and retired research workflows are preserved in the analysis-archive-2026-08-18 archive.

Development and help

See the documentation, ask questions in Discussions, or report problems in Issues.

GPN is developed in the Song Lab at UC Berkeley and distributed under the MIT License.

Citation

GPN:

@article{benegas2023dna,
  title={DNA language models are powerful predictors of genome-wide variant effects},
  author={Benegas, Gonzalo and Batra, Sanjit Singh and Song, Yun S},
  journal={Proceedings of the National Academy of Sciences},
  volume={120},
  number={44},
  pages={e2311219120},
  year={2023},
  publisher={National Acad Sciences}
}

GPN-MSA:

@article{benegas2025dna,
  title={A DNA language model based on multispecies alignment predicts the effects of genome-wide variants},
  author={Benegas, Gonzalo and Albors, Carlos and Aw, Alan J and Ye, Chengzhong and Song, Yun S},
  journal={Nature Biotechnology},
  pages={1--6},
  year={2025},
  publisher={Nature Publishing Group US New York}
}

PhyloGPN:

@inproceedings{albors2025phylogenetic,
  title={A Phylogenetic Approach to Genomic Language Modeling},
  author={Albors, Carlos and Li, Jianan Canal and Benegas, Gonzalo and Ye, Chengzhong and Song, Yun S},
  booktitle={International Conference on Research in Computational Molecular Biology},
  pages={99--117},
  year={2025},
  organization={Springer}
}

GPN-Star:

@article{ye2026predicting,
  title={Predicting genome-wide functional constraints with GPN-Star},
  author={Ye, Chengzhong and Benegas, Gonzalo and Albors, Carlos and Li, Jianan Canal and Prillo, Sebastian and Fields, Peter D and Clarke, Brian and Song, Yun S},
  journal={Nature},
  pages={1--10},
  year={2026},
  publisher={Nature Publishing Group}
}

Sorghum gene expression prediction:

@article{groover2026mapping,
  title={Mapping cis-regulatory mutations at scale in sorghum enables modulation of gene expression},
  author={Groover, Evan D and Ding, David and Wang, Flora Z and Benegas, Gonzalo and Rivera, Joseph and Schwartz, Shahar and Chen, Stephen and Moubarak, Michael F and Georgieva, Viktoriya and Lemaux, Peggy G and others},
  journal={Nature Biotechnology},
  pages={1--11},
  year={2026},
  publisher={Nature Publishing Group US New York}
}
dna
genomics
language-model
variant-effect-prediction

Contributors

gonzalobenegas

420 commits

cralbors

7 commits

cz-ye

4 commits

canallee

1 commits

Languages

Jupyter Notebook

75.0%

Python

25.0%