krkawzq commited on
Commit
7b06458
·
verified ·
1 Parent(s): dd95f50

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +49 -0
  2. config.json +22 -0
  3. model.pt +3 -0
README.md ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: perturblab
3
+ tags:
4
+ - biology
5
+ - genomics
6
+ - scfoundation
7
+ - foundation-model
8
+ license: apache-2.0
9
+ base_model: biomap-research/scFoundation
10
+ ---
11
+
12
+ # scfoundation-cell
13
+
14
+ ## Model Description
15
+ This is the **cell embedding** model from scFoundation. It generates cell-level embeddings from single-cell RNA-seq data.
16
+
17
+ Model weights were originally from the [biomap-research/scFoundation](https://github.com/biomap-research/scFoundation) repository and have been re-uploaded here for ease of use with the `perturblab` library.
18
+
19
+ ## Model Details
20
+ - **Model Type**: Cell embedding model
21
+ - **Architecture**: xTrimoGene with MAE (Masked Autoencoder), Performer/Transformer modules
22
+ - **Parameters**: 100M parameters
23
+ - **Training Data**: 50M+ human single-cell transcriptomics data
24
+ - **Input**: Single-cell or bulk RNA-seq expression data (19,264 fixed genes)
25
+ - **Output**: Cell-level embeddings
26
+
27
+ ## Source
28
+ - **Original Repository**: [biomap-research/scFoundation](https://github.com/biomap-research/scFoundation)
29
+ - **Paper**: [Large Scale Foundation Model on Single-cell Transcriptomics](https://www.nature.com/articles/s41592-024-02305-7) (_Nature Methods_, 2024)
30
+
31
+ ## Usage
32
+
33
+ ```python
34
+ from perturblab.model.scfoundation import scFoundationModel
35
+
36
+ # Load model
37
+ model = scFoundationModel.from_pretrained('scfoundation-cell', device='cuda')
38
+
39
+ # Generate cell embeddings
40
+ cell_embeddings = model.predict_embedding(
41
+ adata,
42
+ output_type='cell',
43
+ pool_type='all'
44
+ )
45
+ ```
46
+
47
+ ## Note
48
+ Intended for internal use with the PerturbLab framework.
49
+
config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_series": "scfoundation",
3
+ "model_name": "cell",
4
+ "model_type": "mae_autobin",
5
+ "num_tokens": 19264,
6
+ "encoder_hidden_dim": 768,
7
+ "decoder_hidden_dim": 512,
8
+ "encoder_depth": 12,
9
+ "decoder_depth": 6,
10
+ "encoder_heads": 12,
11
+ "decoder_heads": 8,
12
+ "encoder_dim_head": 64,
13
+ "decoder_dim_head": 64,
14
+ "bin_num": 100,
15
+ "bin_alpha": 1.0,
16
+ "pad_token_id": 103,
17
+ "mask_token_id": 102,
18
+ "encoder_module_type": "transformer",
19
+ "decoder_module_type": "performer",
20
+ "ff_dropout": 0.0,
21
+ "attn_dropout": 0.0
22
+ }
model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2446c2fb99a0e183cdc9872b7e9e55ac74f7ec82db7ba0799c83be75cde66dc6
3
+ size 477485967