File size: 3,504 Bytes
e410f4c 9d9e691 e410f4c 9d9e691 e410f4c 9d9e691 e410f4c 9d9e691 e410f4c 9d9e691 e410f4c 9d9e691 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | ---
license: mit
library_name: pytorch-lightning
pipeline_tag: tabular-regression
tags:
- biology
- genomics
datasets:
- Genentech/borzoi-data
---
# Borzoi Model (Linder et al. 2025)
## Model Description
This repository contains the weights for the Borzoi model, a model designed to predict functional genomic tracks from genomic DNA sequences.
- **Architecture:** Convolutions followed by Transformer and U-net layers
- **Input:** 524,288 bp of genomic DNA sequence
- **Output Resolution:** 32 bp bins
- **Parameters:** 186M
- **Source:** [Linder, J. et al. Nature Genetics (2025)](https://www.nature.com/articles/s41588-024-02053-6)
## Model Heads & Output Tracks
| Model | Tracks | Genome |
|-------|--------|--------|
| Human | 7,611 | hg38 |
| Mouse | 2,608 | mm10 |
## Repository Content
The repository includes both full PyTorch Lightning checkpoints and raw state dictionaries for the human and mouse versions of the model. Each model has 4 independent replicates. Note that the weights are derived from the publication but the model has been converted into the PyTorch Lightning format used by gReLU (https://github.com/Genentech/gReLU).
| File | Type | Description |
| :--- | :--- | :--- |
| `human_rep0.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 0 |
| `human_rep1.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 1 |
| `human_rep2.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 2 |
| `human_rep3.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 3 |
| `mouse_rep0.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 0 |
| `mouse_rep1.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 1 |
| `mouse_rep2.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 2 |
| `mouse_rep3.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 3 |
| `human_state_dict_rep0.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 0 |
| `human_state_dict_rep1.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 1 |
| `human_state_dict_rep2.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 2 |
| `human_state_dict_rep3.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 3 |
| `mouse_state_dict_rep0.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 0 |
| `mouse_state_dict_rep1.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 1 |
| `mouse_state_dict_rep2.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 2 |
| `mouse_state_dict_rep3.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 3 |
| `save_wandb_borzoi_human.ipynb` | Jupyter Notebook | Code used to create human checkpoints |
| `save_wandb_borzoi_mouse.ipynb` | Jupyter Notebook | Code used to create mouse checkpoints |
## Usage
The models are intended for use with the `grelu` library.
```python
from grelu.lightning import LightningModel
from huggingface_hub import hf_hub_download
# Download the desired checkpoint
ckpt_path = hf_hub_download(
repo_id="Genentech/borzoi-model",
filename="human_rep0.ckpt"
)
# Load the model
model = LightningModel.load_from_checkpoint(ckpt_path, weights_only=False)
model.eval()
```
|