Lal Claude Opus 4.6 commited on
Commit ·
9d9e691
1
Parent(s): e410f4c
Add parameter count, fix loading code, fix typo
Browse files- Add parameter count (186M)
- Add weights_only=False to loading code
- Fix typo: "uman" -> "Human"
- Consolidate output tracks into table format
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
README.md
CHANGED
|
@@ -14,44 +14,43 @@ datasets:
|
|
| 14 |
## Model Description
|
| 15 |
This repository contains the weights for the Borzoi model, a model designed to predict functional genomic tracks from genomic DNA sequences.
|
| 16 |
|
| 17 |
-
- **Architecture:** Convolutions followed by Transformer and U-net layers
|
| 18 |
-
- **Input:** 524,288 bp of genomic DNA sequence
|
| 19 |
-
- **Output Resolution:** 32 bp bins
|
|
|
|
| 20 |
- **Source:** [Linder, J. et al. Nature Genetics (2025)](https://www.nature.com/articles/s41588-024-02053-6)
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
## Repository Content
|
| 24 |
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).
|
| 25 |
|
| 26 |
| File | Type | Description |
|
| 27 |
| :--- | :--- | :--- |
|
| 28 |
-
| `human_rep0.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 0
|
| 29 |
-
| `human_rep1.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 1
|
| 30 |
-
| `human_rep2.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 2
|
| 31 |
-
| `human_rep3.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 3
|
| 32 |
-
| `mouse_rep0.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 0
|
| 33 |
-
| `mouse_rep1.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 1
|
| 34 |
-
| `mouse_rep2.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 2
|
| 35 |
-
| `mouse_rep3.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 3
|
| 36 |
-
| `human_state_dict_rep0.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 0
|
| 37 |
-
| `human_state_dict_rep1.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 1
|
| 38 |
-
| `human_state_dict_rep2.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 2
|
| 39 |
-
| `human_state_dict_rep3.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 3
|
| 40 |
-
| `mouse_state_dict_rep0.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 0
|
| 41 |
-
| `mouse_state_dict_rep1.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 1
|
| 42 |
-
| `mouse_state_dict_rep2.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 2
|
| 43 |
-
| `mouse_state_dict_rep3.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 3
|
| 44 |
| `save_wandb_borzoi_human.ipynb` | Jupyter Notebook | Code used to create human checkpoints |
|
| 45 |
| `save_wandb_borzoi_mouse.ipynb` | Jupyter Notebook | Code used to create mouse checkpoints |
|
| 46 |
|
| 47 |
-
## Model Heads & Output Tracks
|
| 48 |
-
The uman and mouse `.ckpt` files for the same replicate utilize the same core transformer trunk but differ in their species-specific output heads.
|
| 49 |
-
|
| 50 |
-
### Outputs
|
| 51 |
-
|
| 52 |
-
Human Head: 7,611 total tracks
|
| 53 |
-
Mouse Head: 2,608 total tracks
|
| 54 |
-
|
| 55 |
## Usage
|
| 56 |
The models are intended for use with the `grelu` library.
|
| 57 |
|
|
@@ -61,11 +60,11 @@ from huggingface_hub import hf_hub_download
|
|
| 61 |
|
| 62 |
# Download the desired checkpoint
|
| 63 |
ckpt_path = hf_hub_download(
|
| 64 |
-
repo_id="Genentech/borzoi-model",
|
| 65 |
filename="human_rep0.ckpt"
|
| 66 |
)
|
| 67 |
|
| 68 |
# Load the model
|
| 69 |
-
model = LightningModel.load_from_checkpoint(ckpt_path)
|
| 70 |
model.eval()
|
| 71 |
-
```
|
|
|
|
| 14 |
## Model Description
|
| 15 |
This repository contains the weights for the Borzoi model, a model designed to predict functional genomic tracks from genomic DNA sequences.
|
| 16 |
|
| 17 |
+
- **Architecture:** Convolutions followed by Transformer and U-net layers
|
| 18 |
+
- **Input:** 524,288 bp of genomic DNA sequence
|
| 19 |
+
- **Output Resolution:** 32 bp bins
|
| 20 |
+
- **Parameters:** 186M
|
| 21 |
- **Source:** [Linder, J. et al. Nature Genetics (2025)](https://www.nature.com/articles/s41588-024-02053-6)
|
| 22 |
|
| 23 |
+
## Model Heads & Output Tracks
|
| 24 |
+
|
| 25 |
+
| Model | Tracks | Genome |
|
| 26 |
+
|-------|--------|--------|
|
| 27 |
+
| Human | 7,611 | hg38 |
|
| 28 |
+
| Mouse | 2,608 | mm10 |
|
| 29 |
|
| 30 |
## Repository Content
|
| 31 |
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).
|
| 32 |
|
| 33 |
| File | Type | Description |
|
| 34 |
| :--- | :--- | :--- |
|
| 35 |
+
| `human_rep0.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 0 |
|
| 36 |
+
| `human_rep1.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 1 |
|
| 37 |
+
| `human_rep2.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 2 |
|
| 38 |
+
| `human_rep3.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head, replicate 3 |
|
| 39 |
+
| `mouse_rep0.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 0 |
|
| 40 |
+
| `mouse_rep1.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 1 |
|
| 41 |
+
| `mouse_rep2.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 2 |
|
| 42 |
+
| `mouse_rep3.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head, replicate 3 |
|
| 43 |
+
| `human_state_dict_rep0.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 0 |
|
| 44 |
+
| `human_state_dict_rep1.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 1 |
|
| 45 |
+
| `human_state_dict_rep2.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 2 |
|
| 46 |
+
| `human_state_dict_rep3.h5` | HDF5 | Weights-only state dictionary for the human model, replicate 3 |
|
| 47 |
+
| `mouse_state_dict_rep0.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 0 |
|
| 48 |
+
| `mouse_state_dict_rep1.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 1 |
|
| 49 |
+
| `mouse_state_dict_rep2.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 2 |
|
| 50 |
+
| `mouse_state_dict_rep3.h5` | HDF5 | Weights-only state dictionary for the mouse model, replicate 3 |
|
| 51 |
| `save_wandb_borzoi_human.ipynb` | Jupyter Notebook | Code used to create human checkpoints |
|
| 52 |
| `save_wandb_borzoi_mouse.ipynb` | Jupyter Notebook | Code used to create mouse checkpoints |
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
## Usage
|
| 55 |
The models are intended for use with the `grelu` library.
|
| 56 |
|
|
|
|
| 60 |
|
| 61 |
# Download the desired checkpoint
|
| 62 |
ckpt_path = hf_hub_download(
|
| 63 |
+
repo_id="Genentech/borzoi-model",
|
| 64 |
filename="human_rep0.ckpt"
|
| 65 |
)
|
| 66 |
|
| 67 |
# Load the model
|
| 68 |
+
model = LightningModel.load_from_checkpoint(ckpt_path, weights_only=False)
|
| 69 |
model.eval()
|
| 70 |
+
```
|