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/tokenizer.py
Verified signaturecf2a3b5 -
Update geneformer/tokenizer.py
Verified signatureUpdate to use Ensembl ID mapped throughout704ef0d
-
Upload ensembl_mapping_dict_gc30M.pkl
Verified signature4cdb505 -
Update geneformer/tokenizer.py
Verified signature6cfc5c4 -
Update geneformer/tokenizer.py
Verified signaturebe7ceb5
-
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 -
add typing list import
42053dc
-
move dicts to init
ea428cb -
add random state to umap
eb2a04b
-
update get_embs with token_gene_dict arg
Verified signatureace12e9 -
update refs to get_model_emb_dims
Verified signature3fe35ba
-
embs_df with all model embeddings (#363)
Verified signature- embs_df with all model embeddings (9026cc190f358b9be7181ddb2d1368904e3393e1) - incorporate prior changes (8e35e450dafc6f1b57fd1f0fb73f99e127c1e088) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>2e64874 -
Add function to get number of model embeddings (#364)
Verified signature- Add function to get number of model embeddings (01313fd5b2416d697ae4d21db9f1ec80c91ab8bc) - extract emb_dims and input_size from config (89fc737b00596ae9b4f226da087e872022bf5a26) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>c90d791
-
clone embs_i to resolve memory leak in cls embs
57f02a4
-
update perturber stats to reflect cos sim and emb_extractor to suppress warnings for non-cls
25dd1da
-
update to account for set of perturbed genes with aggregate_data
eb038a6
-
update to enable cls emb
b2bbd7c
-
update tokenizer to include eos token
Christina Theodorisead0550
-
Update geneformer/emb_extractor.py (#350)
Verified signature- Update geneformer/emb_extractor.py (4c0377bf6093d5170cf0a7fc1921a2d7456b8883) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>471eefc
-
Upload in_silico_perturber_stats.py (#313)
Verified signature- Upload in_silico_perturber_stats.py (bde1f23f2712777472216e49c30b21cdcb4543ee) Co-authored-by: David Wen <davidjwen@users.noreply.huggingface.co>8aee0ff