Lal Claude Opus 4.6 commited on
Commit
eaadc28
·
1 Parent(s): f287744

Add parameter count and fix loading code

Browse files

- Add parameter count (246M)
- Add weights_only=False to loading code
- Consolidate output tracks table

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. README.md +17 -18
README.md CHANGED
@@ -14,32 +14,31 @@ datasets:
14
  ## Model Description
15
  This repository contains the weights for the Enformer model, a long-range transformer architecture designed to predict functional genomic tracks from genomic DNA sequences.
16
 
17
- - **Architecture:** Convolutions followed by Transformer layers.
18
- - **Input:** 196,608 bp of genomic DNA sequence.
19
- - **Output Resolution:** 128 bp bins.
 
20
  - **Source:** [Avsec, Ž. et al. Nature Methods (2021)](https://www.nature.com/articles/s41592-021-01252-x)
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. 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.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head. |
29
- | `mouse.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head. |
30
- | `human_state_dict.h5` | HDF5 | Weights-only state dictionary for the human model. |
31
- | `mouse_state_dict.h5` | HDF5 | Weights-only state dictionary for the mouse model. |
32
  | `save_wandb_enformer_human.ipynb` | Jupyter Notebook | Code used to create `human.ckpt` |
33
  | `save_wandb_enformer_mouse.ipynb` | Jupyter Notebook | Code used to create `mouse.ckpt` |
34
 
35
- ## Model Heads & Output Tracks
36
- Both `.ckpt` files utilize the same core transformer trunk but differ in their species-specific output heads.
37
-
38
- ### Outputs
39
-
40
- Human Head: 5,313 total tracks
41
- Mouse Head: 1,643 total tracks
42
-
43
  ## Usage
44
  The models are intended for use with the `grelu` library.
45
 
@@ -49,11 +48,11 @@ from huggingface_hub import hf_hub_download
49
 
50
  # Download the desired checkpoint
51
  ckpt_path = hf_hub_download(
52
- repo_id="Genentech/enformer-model",
53
  filename="human.ckpt"
54
  )
55
 
56
  # Load the model
57
- model = LightningModel.load_from_checkpoint(ckpt_path)
58
  model.eval()
59
- ```
 
14
  ## Model Description
15
  This repository contains the weights for the Enformer model, a long-range transformer architecture designed to predict functional genomic tracks from genomic DNA sequences.
16
 
17
+ - **Architecture:** Convolutions followed by Transformer layers
18
+ - **Input:** 196,608 bp of genomic DNA sequence
19
+ - **Output Resolution:** 128 bp bins
20
+ - **Parameters:** 246M
21
  - **Source:** [Avsec, Ž. et al. Nature Methods (2021)](https://www.nature.com/articles/s41592-021-01252-x)
22
 
23
+ ## Model Heads & Output Tracks
24
+
25
+ | Model | Tracks | Genome |
26
+ |-------|--------|--------|
27
+ | Human | 5,313 | hg38 |
28
+ | Mouse | 1,643 | 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. 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.ckpt` | PyTorch Lightning | Full checkpoint including base model and human head |
36
+ | `mouse.ckpt` | PyTorch Lightning | Full checkpoint including base model and mouse head |
37
+ | `human_state_dict.h5` | HDF5 | Weights-only state dictionary for the human model |
38
+ | `mouse_state_dict.h5` | HDF5 | Weights-only state dictionary for the mouse model |
39
  | `save_wandb_enformer_human.ipynb` | Jupyter Notebook | Code used to create `human.ckpt` |
40
  | `save_wandb_enformer_mouse.ipynb` | Jupyter Notebook | Code used to create `mouse.ckpt` |
41
 
 
 
 
 
 
 
 
 
42
  ## Usage
43
  The models are intended for use with the `grelu` library.
44
 
 
48
 
49
  # Download the desired checkpoint
50
  ckpt_path = hf_hub_download(
51
+ repo_id="Genentech/enformer-model",
52
  filename="human.ckpt"
53
  )
54
 
55
  # Load the model
56
+ model = LightningModel.load_from_checkpoint(ckpt_path, weights_only=False)
57
  model.eval()
58
+ ```