Skip to main content

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

Model Paper Notes
GPN Benegas et al. 2023 Requires unaligned genomes
GPN-MSA Benegas et al. 2025 Requires aligned genomes for training and inference; deprecated in favor of GPN-Star
PhyloGPN Albors et al. 2025 Uses an alignment during training, but does not require it for inference or fine-tuning
GPN-Star Ye et al. 2025 Requires 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{ye2025predicting,
  title={Predicting functional constraints across evolutionary timescales with phylogeny-informed genomic language models},
  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={bioRxiv},
  pages={2025--09},
  year={2025},
  publisher={Cold Spring Harbor Laboratory}
}

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}
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpn-0.9.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gpn-0.9.0-py3-none-any.whl (68.7 kB view details)

Uploaded Python 3

File details

Details for the file gpn-0.9.0.tar.gz.

File metadata

  • Download URL: gpn-0.9.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gpn-0.9.0.tar.gz
Algorithm Hash digest
SHA256 ad3c4ed9cc1013b26675b55f9f81b14329b5c4ef2344db1dd5d7725b52442316
MD5 08d5baddc053936a8d28292de5f2cde1
BLAKE2b-256 5929c36b87344b57397ca200d7e2cea8117c280ff308bb864231c4030322c1a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpn-0.9.0.tar.gz:

Publisher: release.yml on songlab-cal/gpn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gpn-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: gpn-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 68.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gpn-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a175368577a851593bacca774caa80da3185aea375a0ab25fcf12147ecddd47
MD5 4e140cbebc1e5d88238cf4a17273a3cd
BLAKE2b-256 e7246150ccb0b8475cee9ea362e50ef122f7082becb6a7f5577bed4dd3e6a60f

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpn-0.9.0-py3-none-any.whl:

Publisher: release.yml on songlab-cal/gpn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page