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")# 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
Input data type for best results
#589
by retract - opened
Using a new dataset of single-cell RNA or pseudobulked RNA data, is it best practice to use data similar to the pretrained corpus for embedding extraction? I tried raw absolute expression and fold change expression, not sure which embeddings are the most accurate outputted by the model
Thank you for your question. Single-cell raw counts data (not pseudobulked, no feature selection) should be used as described here: https://huggingface.co/ctheodoris/Geneformer/blob/main/examples/tokenizing_scRNAseq_data.ipynb
ctheodoris changed discussion status to closed