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
File size: 972 Bytes
b73028f 2f25aea b73028f 10d3f10 b73028f 10d3f10 b73028f 10d3f10 b73028f 10d3f10 624349c 10d3f10 b73028f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | from setuptools import setup
setup(
name="geneformer",
version="0.1.0",
author="Christina Theodoris",
author_email="christina.theodoris@gladstone.ucsf.edu",
description="Geneformer is a transformer model pretrained \
on a large-scale corpus of ~30 million single \
cell transcriptomes to enable context-aware \
predictions in settings with limited data in \
network biology.",
packages=["geneformer"],
python_requires=">=3.10",
include_package_data=True,
install_requires=[
"anndata",
"datasets",
"loompy",
"matplotlib",
"numpy",
"packaging",
"pandas",
"pyarrow",
"pytz",
"ray",
"scanpy",
"scikit-learn",
"scipy",
"seaborn",
"setuptools",
"statsmodels",
"tdigest",
"torch",
"tqdm",
"transformers",
],
)
|