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
Question about the color scale in Fig. 6b vs. plot_predictions()
Hi Dr. Theodoris,
I noticed a possible inconsistency between Fig. 6b of the Geneformer paper and the current cell_classification.ipynb / plot_predictions() implementation.
In Fig. 6b, the confidence color bar appears to indicate blue = +5 and red = β5. However, the current plotting code uses cmap="vlag" with center=0, so blue corresponds to negative logits and red to positive logits.
This latter direction also seems consistent with the heatmap itself: for example, actual non-failing cells tend to have red values in the non-failing prediction column, which would normally indicate a higher logit for the correct class.
Could you clarify whether:
the +5 and β5 labels in the Fig. 6b color bar were accidentally reversed, or
the original figure used a different transformation or plotting convention from the current plot_predictions() implementation?
Thank you very much for clarifying!
Thank you for pointing this out! Yes, it appears the sign was inadvertently reversed when labeling the text for the legend manually for the figure. The notebook with the automated figure legend is correct. There is higher confidence in calling the non-failing for the non-failing samples, etc. Thank you for catching this!

