Skip to main content

scPEFT

This is the official repository for Harnessing the Power of Single Cell Large Language Models with Parameter Efficient Fine-Tuning

Preprint   License

Installation

scPEFT works with Python >= 3.7.13. Please make sure you have the correct version of Python installed pre-installation.

scPEFT is available on PyPI. To install scPEFT, run the following command:

pip install scpeft

For developing, run the following command:

git clone https://github.com/SELECT-FROM/scPEFT
cd scPEFT

Note: requirements. ymal are all the dependency versions we recommend using. To ensure smooth code operation, please try to keep them consistent with these package versions as much as possible

Get Started

  1. Download the upstream model scGPT model checkpoint and place it at e.g., work_dir/scPEFT/save. We recommend using the whole-human model for most applications by default, which pretrained on 33 million normal human cells..

  2. The tutorials of scPEFT for downstream tasks in tutorial_peft. Here are the links to the downstream tasks and tutorials mentioned in our article

    Downstream task Link
    cell type identification Tutorial_Identification.ipynb
    batch correction Tutorial_BatchCorrection.ipynb
    perturbation Tutorial_Perturbation.ipynb
    cell population discovery Tutorial_CellPopulationDiscovery.ipynb
    marker gene detection Tutorial_MarkerGeneDetection.ipynb

To-do-list

  • Publish to pypi
  • Adapting scPEFT for native-attention
  • Adapting scPEFT for flash-attention
  • Only retain PEFT-related parameters when saving peft-model weights.

Contributing

We greatly welcome contributions to scPEFT. Please submit a pull request if you have any ideas or bug fixes. We also welcome any issues you encounter while using scPEFT.

Built With

We sincerely thank the authors of following open-source projects:

Citing scPEFT

@article {He2024.01.27.577455,
	author = {Fei He and Ruixin Fei and Mingyue Gao and Li Su and Xinyu Zhang and Dong Xu},
	title = {Parameter-Efficient Fine-Tuning Enhances Adaptation of Single Cell Large Language Model for Cell Type Identification},
	year = {2024},
	doi = {10.1101/2024.01.27.577455},
	publisher = {Cold Spring Harbor Laboratory},
	URL = {https://www.biorxiv.org/content/early/2024/01/30/2024.01.27.577455},
	journal = {bioRxiv}
}

Metadata

Release files for scPEFT 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scPEFT 0.1.2
File Size Uploaded
scpeft-0.1.2.tar.gz 816.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scPEFT 0.1.2
File Interpreter ABI Platform
scpeft-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / scpeft-0.1.2.tar.gz

Download URL scpeft-0.1.2.tar.gz
Size 816.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c40594dcee1d2874f6eaf40f83e17b6999bc452d4a1c16ec0985a51f467cc698
BLAKE2b-256 checksum
How to use checksums
bcc9991099fbe299ee51f0316e6e4ac00a916b0e386a89a248d1f53586d2bb91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.14

Release files / scpeft-0.1.2-py3-none-any.whl

Download URL scpeft-0.1.2-py3-none-any.whl
Size 837.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d5aecc8c8f32537544e0016723772c96a6e08e1032f411d90f7da564679f985
BLAKE2b-256 checksum
How to use checksums
3d7e46856016b2f7ead65950c78f8e2ae97d32af734d4887c6e58e756dc14d46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.14

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page