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
-
Add checks for custom attributes and n_counts prior to sum ensembl id
Verified signatureda2aaea -
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
-
include install time in model card
Verified signature21d36cd
-
Update trainer output dir (#427)
Verified signature- Update trainer output dir (414cf94616fe848b0d773ec954db7fd83723e2e2) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>dc23c5f
-
Update geneformer/tokenizer.py (#415)
Verified signature- Update geneformer/tokenizer.py (be7ceb5f505d41eb4d0eaf019096b63992f19909) - Update geneformer/tokenizer.py (6cfc5c452a15390d0364b5e8ca16fb4266bbaa58) - Upload ensembl_mapping_dict_gc30M.pkl (4cdb505ba17393dbb90a47b3cbce06dc891d6b0e) - Update geneformer/tokenizer.py (704ef0ded88e4ce7a82c298ff893bba8400f5ed7) - Update geneformer/tokenizer.py (cf2a3b5acc1f8cb6e1ca634c42fad7b8df31e60e) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>63275a8 -
Create multi-task_cell_classification.ipynb (#418)
Verified signature- Create multi-task_cell_classification.ipynb (a2d284f77702bc62fc4c226e2d5cf282ef7fea9f) - replace notebook format (abafc19e2ba4e6c9b9c53faf0268eea387d936a7) - update mtl cell classification notebook format (dc90822f2c1770b370adb49111d5f49d30850ce7) - delete notebook with problematic formatting (ae4e0e0ea1c565821928284a74e0648bff051d33) - Delete prior nb (40624e87b838652e60022e79eadfa72997315446) - Rename mtl example nb (628247599bf5f5aa2de011b9fd982e137059ef52) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>b138ba5
-
CUDA kernels incompatible with standard PyTorch device movement with 4bit/8bit, necessitating device-specific handling (#416)
Verified signature- CUDA kernels incompatible with standard PyTorch device movement with 4bit/8bit, necessitating device-specific handling (2d782dddfb391028edb514df03ffcaa4eea61f86) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>b6d28c3
-
Add find_packages to automatically include mtl and subpackages in setup.py (#410)
Verified signature- Add find_packages to automatically include mtl and subpackages in setup.py (72823c2a24c15c49f1021b85f6462aca5c405aa0) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>3b78204 -
adding tensorboard to setup.py (#409)
Verified signature- adding tensorboard to setup.py (056061996712aa9a0c4f1ab136b72a696735ccf8) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>94d98d1 -
tensorboard add to reqs (#407)
Verified signature- tensorboard add to reqs (662af56a0682675766496148db3a5f48bf113c3b) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>e8fa43a
-
dictionaries from parent dir (#405)
Verified signature- dictionaries form parent dir (713240f3833d3547237ba53fe2c7e09bfc04e5f0) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>85f295e -
remove token dictionary and unpickling from init (#403)
Verified signature- nested import for dictionaries from parent (3b4533faff40ad00e85ec014cae258b31cdd2647) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>7eca269
-
move dict loading to function in eval utils
57bc17e -
edit doc formatting
fce3f6e -
edit docs formatting
ef094b2 -
add mtl_classifier to docs
bedb3b7 -
add input size tip to instructions
Verified signature2732369 -
update tokenizer to defaults for 95M models for special token and input size
Verified signatureda8cf3d -
update instructions to include reminder about token dictionary
Verified signaturecb1b0d5
-
pointing dictionaries from the mtl module's init (#397)
Verified signature- pointing dictionaries from the mtl module's init (5539d14469f84e2f0b13a7cb3f6054b2b0cbf1f3) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>7470753 -
Refactored token dictionary loading and encapsulated dictionary (#398)
Verified signature- Refactored token dictionary loading and encapsulated dictionary (fad91b8ccc1ad2931ed53fcb30902a04f6f30f90) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>beb62a4 -
Refactor: Convert mask_token_id, pad_token_id, and all_special_ids to properties (#395)
Verified signature- Refactor: Convert mask_token_id, pad_token_id, and all_special_ids to properties (02febb8c9cc71177ab74ab03ab83e597b7ec1df7) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>2e06f1a
-
sync token_dictionary variable name w/ classifier
Verified signaturea021deb
-
update setup with req and manifest with updated filenames
a34fbc2
-
fix imports mtl/eval_utils
eab1878
-
allow model_type valid options to take params model_type : {"Pretrained", "GeneClassifier", "CellClassifier", "MTLCellClassifier", "MTLCellClassifier-Quantized"} (#390)
Verified signature- allow model_type valid options to take params model_type : {"Pretrained", "GeneClassifier", "CellClassifier", "MTLCellClassifier", "MTLCellClassifier-Quantized"} (f8687d834ba074caf734cf29424902e42a8a8b18) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>47e0ef8 -
peft>=0.11.1 (#387)
Verified signature- peft>=0.11.1 (ddcaee0389760fa3dd12e6003dc1664b59a4eadc) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>4c9dda5 -
"save_model_without_heads" is redundant (#385)
Verified signature- "save_model_without_heads" is redundant (e384cc651481232513ac8ebd1fd2169f184e6a19) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>de10ab0 -
comment out "def save_model_without_heads(original_model_save_directory)"; redundant for ISP/Emb extractor (#382)
Verified signature- comment out "def save_model_without_heads(original_model_save_directory)"; redundant for ISP/Emb extractor (0a4e8a4ba076513934876cf83b1d3e727c26d46e) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>22bf20f -
fixed bug related to dynamic ranges in dictionary with 'min' and 'max' value mismatch in optuna suggest fn (#380)
Verified signature- fixed bug related to dynamic ranges in dictionary with 'min' and 'max' value mismatch in optuna suggest fn (76101b4cbc824eb4b61f8c3985f9652ba413d516) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>fe1640b
-
Update README.md
Verified signature11bcee7
-
precommit formatting
f07bfd7 -
update with 12L and 20L i4096 gc95M models, multitask and quantiz code
933ca80
-
rename for consistency
Verified signatureec19834 -
delete old gene name dict
Verified signature817eca2 -
update to only have gene names as keys in gene_name_id_dict
Verified signaturee61485e -
Add function for summing of Ensembl IDs (#377)
Verified signature- Add function for summing of Ensembl IDs (fb901a02a4aea5582603c2c3bf21d992b8a4f3b5) - Add init for ensembl mapping dict (43b42906ba1e5b16d2a71deb6881c4779007a24d) - Upload ensembl_mapping_dict_gc95M.pickle (47341ab1ee7a6d195a1a2527af51a0dc3abd0090) - Update geneformer/tokenizer.py (5197a60707457a72cf3c6f663e3eae65fc276831) - Filter gene mapping dict for items that exist in gene_token_dict (1e8d481b099f532afa8b9edf1f544d838edfea2f) - Update geneformer/tokenizer.py (b8b87fd14eec11e8e21105d30098c50496ae2ba5) - Upload ensembl_mapping_dict.pkl (e86dc76200df4aa1b02149d4d64254b92a0816d1) - Update geneformer/__init__.py (ad4b8e0c046cf6f51cb71573b04efa851923e4b6) - Upload 2 files (c9ba1f736b47384d602d714d49c1bdee21ae8bac) - Delete ensembl_mapping_dict.pkl (c5cea51562669bba7b068a12ca13510b865e7aff) - Upload 4 files (05bffd62fd51f24efcbb7d8db5eacabb976d7c95) - Delete geneformer/ensembl_mapping_dict_gc95M.pickle (004f5b40c72722df27d77991b6078510b15a0bd1) - Update .gitattributes (e91adac093c1667d6…1e18102
-
save pval
b07f4b1