Instructions to use ctheodoris/Geneformer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ctheodoris/Geneformer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="ctheodoris/Geneformer")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("ctheodoris/Geneformer") model = AutoModelForMaskedLM.from_pretrained("ctheodoris/Geneformer", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Download geneformer/__init__.py from ctheodoris/Geneformer: direct link, hf CLI and curl.
- Browser
- Download file 656 Bytes
-
https://huggingface.co/ctheodoris/Geneformer/resolve/01313fd5b2416d697ae4d21db9f1ec80c91ab8bc/geneformer/__init__.py
- Command line
-
hf download hf://ctheodoris/Geneformer@01313fd5b2416d697ae4d21db9f1ec80c91ab8bc/geneformer/__init__.py
-
curl -L -o __init__.py https://huggingface.co/ctheodoris/Geneformer/resolve/01313fd5b2416d697ae4d21db9f1ec80c91ab8bc/geneformer/__init__.py
656 Bytes
| # ruff: noqa: F401 | |
| from . import ( | |
| collator_for_classification, | |
| emb_extractor, | |
| in_silico_perturber, | |
| in_silico_perturber_stats, | |
| pretrainer, | |
| tokenizer, | |
| ) | |
| from .collator_for_classification import ( | |
| DataCollatorForCellClassification, | |
| DataCollatorForGeneClassification, | |
| ) | |
| from .emb_extractor import EmbExtractor, get_embs | |
| from .in_silico_perturber import InSilicoPerturber | |
| from .in_silico_perturber_stats import InSilicoPerturberStats | |
| from .pretrainer import GeneformerPretrainer | |
| from .tokenizer import TranscriptomeTokenizer | |
| from . import classifier # noqa # isort:skip | |
| from .classifier import Classifier # noqa # isort:skip | |