farjvd commited on
Commit
bc61af7
·
1 Parent(s): 50fb379

updated README with logo and quickstart

Browse files
README.md CHANGED
@@ -10,13 +10,20 @@ tags:
10
  - tahoebio
11
  - pytorch
12
  ---
13
- # Tahoe-X1
14
 
15
- Tahoe-X1 is a family of foundation models for single-cell RNA sequencing data developed by Tahoe Therapeutics. For more details, see our blog post and preprint [TODO: INSERT LINKS]. In this repository, we provide pretrained weights for three model sizes:
 
 
16
 
17
  - ~70M parameters (TahoeX1-70M)
18
  - ~1B parameters (TahoeX1-1B)
19
  - ~3B parameters (TahoeX1-3B)
 
 
 
 
 
20
 
21
  ## Installation
22
 
@@ -30,57 +37,26 @@ To use the model, you must first install the `tahoe-x1` package from GitHub.
30
 
31
  2. Follow the installation steps for the docker or uv based insallation as described [here](https://github.com/tahoebio/tahoe-x1#installation) in the repository
32
 
33
- Additional files (including vocabulary files and data for the included benchmarks) are hosted on S3 in a publicly accesible bucket (s3://tahoe-hackathon-data). These files will be automatically downloaded as needed.
34
 
35
- ## Getting cell and gene embeddings
36
-
37
- 1. Create a configuration file (see `scripts/inference/configs/predict.yaml`).
38
- ```bash
39
- # Configure:
40
- # - paths.hf_repo_id: Hugging Face repository (tahoebio/TahoeX1)
41
- # - paths.hf_model_size: model size (70M, 1B, or 3B)
42
- # - paths.adata_output: where to save AnnData output including embeddings
43
- # - predict.return_gene_embeddings: True (for extracting and saving gene embeddings)
44
- ```
45
-
46
- You can also use a locally-downloaded model by specifying `paths.model_dir` instead of `paths.hf*`.
47
-
48
- 2. Run the embedding script:
49
- ```bash
50
- python scripts/inference/predict_embeddings.py path/to/config.yaml
51
-
52
- # Optional parameters can be added to overwrite config values:
53
- python scripts/inference/predict_embeddings.py path/to/config.yaml --paths.model_name=tx --batch_size=128
54
- ```
55
-
56
- Cell embeddings are written to the output AnnData file. If `return_gene_embeddings` is `True`, gene embeddings are also saved. If you encounter an out-of-memory error, fall back to the lower-level `tasks.get_batch_embeddings` API, which loads gene embeddings in chunks:
57
 
58
  ```python
59
- model, vocab, model_cfg, collator_cfg = load_model(
60
- model_dir,
61
- device=device,
62
- return_gene_embeddings=return_gene_embeddings,
63
- )
64
 
65
- cell_embs, gene_embs = get_batch_embeddings(
66
- adata=adata,
67
- model=model,
68
- vocab=vocab,
69
- model_cfg=model_cfg,
70
- collator_cfg=collator_cfg,
71
- return_gene_embeddings=True
72
  )
73
  ```
74
 
75
- ## Training
76
- 1. Define a YAML configuration file (see examples in `runai/` or `mcli/`) describing model, data and training parameters.
77
 
78
- 2. Launch training with Composer:
79
- ```bash
80
- composer scripts/train.py path/to/config.yaml
81
- ```
82
 
83
 
84
- ## License
85
 
 
86
  We release the model weights and associated code under the Apache 2.0 license.
 
 
10
  - tahoebio
11
  - pytorch
12
  ---
13
+ # Tahoe-x1
14
 
15
+ Tahoe-x1 is a family of perturbation-trained single-cell foundation models developed by Tahoe Therapeutics.
16
+ For more details, see our blog post and [📄 preprint](http://www.tahoebio.ai/news/tahoe-x1).
17
+ In this repository, we provide pretrained weights for three model sizes:
18
 
19
  - ~70M parameters (TahoeX1-70M)
20
  - ~1B parameters (TahoeX1-1B)
21
  - ~3B parameters (TahoeX1-3B)
22
+ <picture>
23
+ <source media="(prefers-color-scheme: dark)" srcset="./assets/abstract_logo_dark_mode.png">
24
+ <source media="(prefers-color-scheme: light)" srcset="./assets/abstract_logo_light_mode.png">
25
+ <img src="./assets/abstract_logo_light_mode.png" alt="Abstract Logo">
26
+ </picture>
27
 
28
  ## Installation
29
 
 
37
 
38
  2. Follow the installation steps for the docker or uv based insallation as described [here](https://github.com/tahoebio/tahoe-x1#installation) in the repository
39
 
40
+ Additional files (including vocabulary files and data for the included benchmarks) are hosted on S3 in a publicly accesible bucket (s3://tahoe-hackathon-data/MFM). These files will be automatically downloaded as needed.
41
 
42
+ ## Quickstart
43
+ You can quickly load the model in this way:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
  ```python
46
+ from tahoex.model import ComposerTX
 
 
 
 
47
 
48
+ model, vocab, model_config, collator_config = ComposerTX.from_hf(
49
+ repo_id="tahoebio/Tahoe-x1",
50
+ model_size="70m", # or "1b", "3b".
51
+ return_gene_embeddings=True, # optional, default True
52
+ use_chem_inf=False # optional, default False
 
 
53
  )
54
  ```
55
 
 
 
56
 
 
 
 
 
57
 
58
 
 
59
 
60
+ ## License
61
  We release the model weights and associated code under the Apache 2.0 license.
62
+
assets/abstract_logo_light_mode.png ADDED
assets/tahoe-navy-logo.png ADDED