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
Commit History
-
Update geneformer/evaluation_utils.py to be compatible with different versions of the datasets package.
Verified signature'Column' object has no attribute 'to' error from evaluation_utils.py in Geneformer_tutorial.ipynb #551fc7a1c0
-
add input_identifier to tokenize specific matched files
Christina Theodorisac59e36
-
plot umap for all labels in same view
Christina Theodorisff551ee -
Update README.md
Verified signature13cd541
-
silence tensor copy warning
Christina Theodoris9d8d2f0 -
clone rather than wrap tensors
Christina Theodorisaea4988 -
update collator with dummy save fn for transformers compatibility
Christina Theodorisf17618a
-
fix to properly move model after checking device
Christina Theodorisf953554 -
move model to device after checking
Christina Theodorisefc403d -
update V1 token dict usage to self attr
Christina Theodorisf26136d -
move V1 autoformatting to after validate_options
Christina Theodoris4364d31
-
add option for relabeling data from prior label class dict, update dict paths in manifest
Christina Theodoris76a78a0
-
delete first version of dist multitask example
Verified signaturea67c9c0
-
update dist multitask example name
Christina Theodoris596f1c2 -
Add example notebook for distributed multi-task cell classification (#543)
Verified signature- Add example notebook for distributed multi-task cell classification (7094feb8be9734a624cc561c8ebf5d571949873d) Co-authored-by: Madhavan Venkatesh <madhavanvvs@users.noreply.huggingface.co>f3ff19d
-
specify bitsandbites version
Christina Theodoris6a50f33 -
add V2 models
Christina Theodoris7cf49a3 -
update with V2 models
Christina Theodorisd319fef
-
edit docs to remove backend isp functions
Christina Theodoris31bf641
-
fix TypeError: TrainingArguments.__init__() got an unexpected keyword argument 'evaluation_strategy' (#539)
Verified signature- fix TypeError: TrainingArguments.__init__() got an unexpected keyword argument 'evaluation_strategy' (af5699d3d03a21594973b7159b1b1c3d85fca067) Co-authored-by: Jack Kuo <jackkuo@users.noreply.huggingface.co>42dbf0a
-
add fallback task_type for LoraConfig to support different PEFT versions (#538)
Verified signature- add fallback task_type for LoraConfig to support different PEFT versions (7e575a07f75854fb428378a36fda54d912c1136a) Co-authored-by: Madhavan Venkatesh <madhavanvvs@users.noreply.huggingface.co>d471d1b
-
update eval_strategy for new transformers version
Christina Theodoris18a2ca6 -
move import wandb to conditional
Christina Theodoris7e4697d
-
fully qualified imports to resolve name-space conflicts (#532)
Verified signature- fully qualified imports to resolve name-space conflicts (caecdb154a416524f4913dde407ee7a5bb9d1d2a) Co-authored-by: Madhavan Venkatesh <madhavanvvs@users.noreply.huggingface.co>5f07ec8
-
ddp_mtl_nccl_support (#524)
Verified signature- Refactor MTL: DDP NCCL support (a794aecbbabbfe7e810f041c0b0a3b05e611a2fb)e2efe2b
-
edit imports in perturber_utils
Christina Theodorisc6d04a6
-
fix exact_mean subselection to be for index rather than col name
Christina Theodorisa13a2cf -
fix exact_mean and exact_median to subselect dataframe emb cols, not cell rows
Christina Theodoriscfc8cdb -
add quantization for pretrained model
Christina Theodoris7b591f6
-
Prepare data cell level pass cell state dict instead of genes (#483)
Verified signature- Update geneformer/classifier.py (107b2b84dd2a79cdba7470322d6c3637cc1d41ed) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>69e6887 -
ensure gene class dict only inverted when using gene classifier
Christina Theodoris54b408b
-
make plot roc compatible with eval-only metrics
Christina Theodorisae4867d -
Merge remote-tracking branch 'origin/main'
Christina Theodoris5760b30 -
fix gene class dict labeling
Christina Theodorisbfcada4
-
Fix how mappings and train and val data are returned (#473)
Verified signature- Update geneformer/mtl/data.py (cbf98f9a9115ccfe374a081b8758653d83f797b3) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>c81f6f9
-
Upload gene_name_id_dict_gc95M.pkl (#470)
Verified signature- Upload gene_name_id_dict_gc95M.pkl (db37c3e4de75ff21a48777e1be9bf8a0445c812b) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>01d3ea8
-
Add checks for custom attributes and n_counts prior to sum ensembl id (#461)
Verified signature- Add checks for custom attributes and n_counts prior to sum ensembl id (da2aaeac0a4a7102f6433dd6345ebfb31e6a36c8) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>09de197 -
further emphasize different token dictionaries in examples
Christina Theodorise2ee685 -
remove unused imports while no longer using distributed sampler
Verified signatureb9028ba -
Raise error for train and validation mismatch (#459)
Verified signature- Raise error for train and validation mismatch (83f83fdbee9d0e9c19e2f050181f8bcb7b1ac8b3) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>9af94b8
-
Upload in_silico_perturber.py (#432)
Verified signature- Upload in_silico_perturber.py (9f0fa5d773efa20d201f2d548baff6edca7d08d5) Co-authored-by: David Wen <davidjwen@users.noreply.huggingface.co>cb89107
-
Update geneformer/emb_extractor.py (#453)
Verified signature- Update geneformer/emb_extractor.py (2c8d3f5d8ebb362ad102cb7e924d84a39b7349c8) - Update geneformer/emb_extractor.py (62074538699215f6f0f8aca01d2e8f974386d800) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>ebc1e09 -
Update geneformer/tokenizer.py (#450)
Verified signature- Update geneformer/tokenizer.py (889cadcf135b313171aadec4e879caae20fd0bc1) - Update geneformer/tokenizer.py (b8808792d6e106aeec320447f4032b49533ba4de) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>664f71e
-
update isp default mode to cls
Verified signature0c99403
-
Adding tags to the model (#448)
Verified signature- Adding tags to the model (be2d2266582f7a1c47f73d999296d823ea14bc2e) Co-authored-by: Can Ergen <canergen@users.noreply.huggingface.co>3a68669
-
update transformers version to match pretrainer using accelerate
Verified signature3d62bb9 -
update pretrainer to not use distributed sampler (Trainer uses accelerate)
Verified signature8140c51
-
update function for N_Detections for mixture_model without anchor_token
Christina Theodorisdf297bc
-
add check to ensure emb_label is None for getting state embs dict
Christina Theodoris39b4444
-
change default emb to cls
Verified signature9ee140a