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") - Inference
- Notebooks
- Google Colab
- Kaggle
About the result parameter setting in the article
Thank you for your interest in Geneformer. I am not clear about what you are trying to do. If you are trying to repeat the in silico treatment analysis using the cardiomyopathy dataset as we described in the manuscript, then the steps to do that would be to first fine-tune Geneformer as a disease classifier as described in the Methods of the manuscript and in the example notebook in this repository, and then run the in silico treatment analysis as you’ve designated except with using all cells rather than a maximum. You can run the analysis with either deletion or activation by changing the perturb_type parameter and run it either for treatment of hypertrophic or dilated cardiomyopathy depending on which you include first vs. last in the cell_states_to_model parameter.
Yes, I've done the fine-tuning task. i would try to repeat the in silico treatment analysis using the cardiomyopathy dataset.
As shown above, I just need to set the max_ncells parameter to None, right? of course, I will set the parameter of cell_states_to_model according to the ultimate goal.
Yes that’s right!
