Geneformer
Transformer pretrained on about 30 million single-cell transcriptomes (Genecorpus-30M) that learns gene-network context from ranked expression, enabling few-shot prediction of gene dosage effects, cell states and candidate therapeutic targets.
🤗 1 698 downloads / month ♥ 311 updated 2026-05-26At a glance
What it does
Each cell becomes a sequence of genes ranked by expression; the model is fine-tuned for cell-type classification, disease-state prediction and in-silico perturbation (which gene knock-out shifts a malignant state).
Tasks, data types and cancers
Architecture
Training data
V1 (June 2021 corpus, 2023 release): Genecorpus-30M — about 29.9 million human single-cell transcriptomes from public datasets across tissues, not restricted to cancer. V2 (December 2024): Genecorpus-104M — about 104 million human single-cell transcriptomes, with 104M- and 316M-parameter checkpoints and an input window of 4,096 genes. A separate V2 variant (Geneformer-V2-104M_CLcancer) is continually trained on about 14 million cancer transcriptomes. Corpus composition per the developers' model card; the underlying datasets are not published as a single downloadable collection.
Linked datasets
- pretraining Genecorpus-30M Open download
Evaluation
| Benchmark / dataset | Metric | Value | External validation | Source |
|---|---|---|---|---|
| Corpus scaling and model quantization (Nature Computational Science, 27.03.2026) — resource use during fine-tuning | fine-tuning time and GPU memory relative to the full-precision model | quantization preserved the contextual gene and cell embedding space while requiring 15% of the time and 34% of the memory of the full model; the pretraining corpus was expanded to more than 100 million human single-cell transcriptomes | no | Source |
How to run
# generic transformers loader — see the model card for the task-specific head and preprocessing
from transformers import AutoModel, AutoProcessor
model = AutoModel.from_pretrained('ctheodoris/Geneformer')
processor = AutoProcessor.from_pretrained('ctheodoris/Geneformer')
Install from the Hugging Face repo; tokenize with the provided gene-median dictionary. Fine-tuning on a few hundred labelled cells is the intended workflow.
Regulatory status and intended use
Regulatory status is quoted from the source linked above and can change. Research-use-only models must not be used for clinical decisions.
Limitations and bias
- Rank encoding discards absolute expression; batch effects still leak in.
- Pretraining corpus is not cancer-specific; tumour microenvironment states may need extra fine-tuning.
Sources
- Theodoris CV et al. Transfer learning enables predictions in network biology. Nature 2023
- Chen H, Venkatesh MS et al. Scaling and quantization of large-scale foundation model enables resource-efficient predictions in network biology. Nature Computational Science, 27.03.2026 (PMID 41896605)
- Hugging Face — ctheodoris/Geneformer (karta modelu: warianty V1/V2, Genecorpus-104M, wariant nowotworowy CLcancer)
This page is educational — it is not medical advice and does not replace consultation with an oncologist. Diagnostic and treatment decisions are made solely by specialist physicians.