Genome-Factory: A Library for Tuning, Deploying, and Interpreting Genomic Foundation Models
Organizations: Center for Foundation Models and Generative AI & Department of Computer Science, Northwestern University, USA · School of Natural Sciences, University of California at Merced, USA · Department of Energy Joint Genome Institute, Lawrence Berkeley National Laboratory, USA · Environmental Genomics and Systems Biology Division, Lawrence Berkeley National Laboratory, USA ·
Abstract
We introduce Genome-Factory, the first integrated Python library for tuning, deploying, and interpreting genomic foundation models. Our core contribution is to simplify and unify the workflow for genomic model development: data collection, model tuning, inference, benchmarking, and interpretability. For data collection, Genome-Factory offers an automated pipeline to download genomic sequences and preprocess them. For model tuning, Genome-Factory supports both full and parameter-efficient fine-tuning across diverse genomic models. For inference, Genome-Factory enables both embedding extraction and DNA sequence generation. For benchmarking, we include two existing benchmarks and provide a flexible interface to incorporate additional benchmarks. For interpretability, Genome-Factory introduces an open-source biological interpreter based on a sparse auto-encoder. We validate the utility of Genome-Factory across three dimensions: (i) Compatibility with diverse models and fine-tuning methods; (ii) Benchmarking downstream performance using two open-source benchmarks; (iii) Biological interpretation of learned representations with DNABERT-2. These results highlight its practical value for real-world genomic analysis. GitHub: https://github.com/WeiminWu2000/Genome_Factory.
Figures & tables
| Full | LoRA | Adapter | |
| Mixed precision | |||
| Flash attention | |||
| Gradient accumulation |
| HyenaDNA-160k | DNABERT2 | Caduceus-131k | |||||||
| Method | Trainable | Mem | Throughput | Trainable | Mem | Throughput | Trainable | Mem | Throughput |
| params | (GB) | (KTok/s) | params | (GB) | (KTok/s) | params | (GB) | (KTok/s) | |
| Full | 6.55M | 5.75 | 381.48 | 117.08M | 7.30 | 40.70 | 7.73M | 6.89 | 143.55 |
| LoRA | 0.10M | 4.45 | 446.05 | 1.49M | 6.18 | 44.07 | 0.81M | 1.85 | 394.30 |
| Adapter | 0.07M | 1.84 | 1113.32 | 0.20M | 2.09 | 124.30 | 0.07M | 1.85 | 467.72 |
| Model | Method | Trainable Params | Peak Mem (GB) | Throughput (KTok/s) |
| Nucleotide Transformer-500M | Full | 480.45 M | 18.94 | 12.08 |
| LoRA | 4.46 M | 15.95 | 14.49 | |
| Nucleotide Transformer-2.5B | Full | 2.54 B | 63.95 | 2.40 |
| LoRA | 11.86 M | 43.33 | 3.34 | |
| GenomeOcean-100M | Full | 116.42 M | 7.39 | 45.28 |
| LoRA | 1.70 M | 7.00 | 45.88 |
| Model | Size | GUE | Genomic Benchmarks | ||||||||||
| Full | LoRA | Adapter | Full | LoRA | Adapter | ||||||||
| HyenaDNA-160k | 7M | 59.91 | 0.22 | 50.95 | 0.23 | 25.00 | 0.37 | 66.71 | 0.18 | 61.26 | 0.29 | 36.90 | 0.42 |
| Caduceus-131k | 8M | 50.07 | 1.61 | 34.70 | 0.19 | 38.61 | 0.33 | 65.38 | 0.22 | 42.10 | 0.36 | 47.74 | 0.27 |
| DNABERT-2 | 117M | 65.25 | 0.25 | 48.39 | 0.11 | 40.19 | 0.17 | 71.97 | 0.20 | 64.58 | 0.25 | 48.96 | 0.31 |
| GenomeOcean-100M | 117M | 65.52 | 0.57 | 59.35 | 0.23 | 46.65 | 0.04 | 68.26 | 0.26 | 66.28 | 0.19 | 53.60 | 0.21 |
| Nucleotide Transformer-500M | 480M | 57.63 | 0.26 | 52.96 | 0.13 | 32.01 | 0.48 | 67.99 | 0.24 | 64.68 | 0.30 | 43.95 | 0.28 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Input features | Search space | Selected configuration |
| SVM | 4-mer frequency; stride ; reverse complements treated separately; normalized by total k-mer count | Kernel ; ; for RBF, | Kernel ; ; |
| RF | Same 4-mer frequency features as SVM | Trees ; max depth ; min samples split ; min samples leaf ; max features | Trees ; max depth ; min samples split ; min samples leaf ; max features |
| CNN | One-hot encoded DNA sequence | 3 convolutional layers; channels ; kernel sizes ; ReLU; global max pooling; FC hidden dim ; dropout ; learning rate ; batch size ; weight decay | Adam; learning rate ; batch size ; dropout ; weight decay ; max epochs ; early stopping patience |
| PWM + RF | PWM motif-scanning scores | Same RF search space as above | Trees ; max depth ; min samples split ; min samples leaf ; max features |
| PWM + SVM | PWM motif-scanning scores | Linear SVM with | Linear kernel; |
| HMM | HMM-derived sequence likelihood | Number of hidden states ; covariance/transition smoothing | Hidden states ; smoothing |
| Model | Variant Type | Variants | ||
| Hyenadna | Sequence Length | 1K/16K/32K/160K/450K/1M | ||
| DNABERT-2 | Parameter Size | 117M | ||
| Caduceus | Sequence Length | 1K/131K | ||
| Nucleotide Transformer | Parameter Size | 50M/100M/250M/500M/1B/2.5B | ||
| EVO | Sequence Length | 8K/131K | ||
| GenomeOcean | Parameter Size | 100M/500M/4B |
| Model | DNABERT-2 | HyenaDNA-160k | EVO 2-7B | GenomeOcean-4B |
| ARI | 0.167 | 0.146 | 0.082 | 0.321 |
| Model | GUE | GB | GUANinE | LRB |
| GROVER | ||||
| DNABERT-2 | ||||
| HyenaDNA-160k | ||||
| GenomeOcean-100M |