Transformer model with single-cell perturbation predictions
Project description
pertTF is a transformer model designed for single-cell perturbation predictions.
Installation
Prerequisite environment
pertTF require torch > 2.3.0 and cuda > 12.0
best way to install is to set up a seperate envrionment with conda or mamba
# create independent environment (recommonded)
mamba create -n pertTF_env python=3.10 cuda-toolkit=12.8 'gxx>=6.0.0,<12.0' cudnn ca-certificates -y -c pytorch -c nvidia -c conda-forge
# pip install required packages
# it is best to install torch == 2.6.0 to match the flash attention compiled wheel below
# higher versions of torch may present difficulties for installing flash attention 2
pip install torch==2.6.0 torchvision orbax==0.1.7 torchdata torchmetrics pandas scanpy numba --upgrade "numpy<1.24" datasets transformers==4.33.2 wandb torch_geometric pyarrow sentencepiece huggingface_hub omegaconf
flash attention is strongly recommended for training or finetuning
# flash attention 2 installation
#check ABI true/false first
python -c "import torch;print(torch._C._GLIBCXX_USE_CXX11_ABI)"
# install appropraite version (the example below is for ABI=FALSE)
pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
# flash attention 3 installation (recommended for torch > 2.6.0 and hopper GPUs)
# To install flash attention v3 (1.5-2x speed up over v2) requires > 30mins, > 400GB RAM, 32 CPUS (aim for more than this)
git clone https://github.com/Dao-AILab/flash-attention.git
cd flash-attention
python setup.py install
pertTF installation
You can install and use pertTF in two ways.
The first way, pertTF is avaiable on PyPI. Use the following command to install pertTF:
pip install -i https://test.pypi.org/simple/ pertTF
The second way is suitable for you to run the most recent pertTF source code. First, fork our pertTF GitHub repository:
git clone https://github.com/davidliwei/pertTF.git
Then, in your python code, you can directly use the pertTF package:
import sys
sys.path.insert(0, '/content/pertTF/')
Tutorials
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file perttf-0.1.1.tar.gz.
File metadata
- Download URL: perttf-0.1.1.tar.gz
- Upload date:
- Size: 479.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5423a477547ba988f9812e9ee2811d270677d6cb10387f2fe3895fc3c2f85f7
|
|
| MD5 |
7f1d723e3c5af0cd8da925e6c69e3452
|
|
| BLAKE2b-256 |
e21b038f9fd014b060c16d32218bd2ad8bd07e753e4bcdcddee40abc30ac0dc8
|
Provenance
The following attestation bundles were made for perttf-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on davidliwei/pertTF
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perttf-0.1.1.tar.gz -
Subject digest:
c5423a477547ba988f9812e9ee2811d270677d6cb10387f2fe3895fc3c2f85f7 - Sigstore transparency entry: 1222073220
- Sigstore integration time:
-
Permalink:
davidliwei/pertTF@4f9c187179ed96f332fad0d5dfba41a3669d037f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/davidliwei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4f9c187179ed96f332fad0d5dfba41a3669d037f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file perttf-0.1.1-py3-none-any.whl.
File metadata
- Download URL: perttf-0.1.1-py3-none-any.whl
- Upload date:
- Size: 88.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c73518c57cd9feda54d1ba7872b46b6b6cd49f95333b76f08936d451fd028ee1
|
|
| MD5 |
644dc0f739a144832216f3337085b3c4
|
|
| BLAKE2b-256 |
f2258c899787ecb1f489468ffba9ad002dba348288c4b9aaf658ef4b9a3cbf65
|
Provenance
The following attestation bundles were made for perttf-0.1.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on davidliwei/pertTF
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perttf-0.1.1-py3-none-any.whl -
Subject digest:
c73518c57cd9feda54d1ba7872b46b6b6cd49f95333b76f08936d451fd028ee1 - Sigstore transparency entry: 1222073292
- Sigstore integration time:
-
Permalink:
davidliwei/pertTF@4f9c187179ed96f332fad0d5dfba41a3669d037f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/davidliwei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4f9c187179ed96f332fad0d5dfba41a3669d037f -
Trigger Event:
workflow_dispatch
-
Statement type: