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 for gene classification (#330)
Verified signature- Update for gene classification (f49922d12ee1fe946a511e6d96b9cda14ce7c22b) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>94095d1 -
Update with gene classifier, custom token dict, and str validate options (#329)
Verified signature- Update with gene classifier, custom token dict, and str validate options (ae834bc2564a49ee071390284a726b13aa2b297f) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>0568479
-
add option for hyperparameter tuning to cc.validate
Christina Theodoris4bddd45
-
correct typo
Verified signature5a43832
-
update examples for predict_eval and handle roc for 2 cell classes
Christina Theodoriseeba323
-
Update readthedocs for classifier
Christina Theodorisf75f5ac
-
Get the gene keys and gene list keys from the token dictionary instead of medians (#304)
Verified signature- Get the gene keys and gene list keys from the token dictionary instead of medians (faab0d7678ab0347fae033a620c388ca970b59e0) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>b294421 -
Prevent ruff/isort on init
Christina Theodoris941390d -
Add classifier module and examples
Christina Theodoris9e9cca9
-
Update geneformer/emb_extractor.py (#303)
Verified signature- Update geneformer/emb_extractor.py (d1f49b5321b8f1b9709ddd6b27a577f6acc0ddeb) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>d6c634c
-
Fix typo (#301)
Verified signature- Fix typo (d1bbf272387475f1c413cca8679150549abd8bed) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>075bd53
-
Add option for variable input_size and to add CLS/SEP Tokens (#299)
Verified signature- Add option for variable input_size and to add CLS/SEP Tokens (944c98c4ed4fa9bd539c2a7d8db5351161d85012) Co-authored-by: Han Chen <hchen725@users.noreply.huggingface.co>aa25cd2
-
add load model for train and fix validate anchor gene error
Christina Theodoris0d675a3
-
Handle case of single gene del for isp modeling of gene embs
Christina Theodoris316d817
-
edit docstring format to highlight options
Christina Theodorise3330a6 -
edit docstring codeblock highlighting
Christina Theodorisd1931b1 -
update type of null_dict_list in docstring
Christina Theodoris79788b6 -
add readthedocs link to model card
Christina Theodoriscf0d7d4 -
update doc css
Christina Theodorisf91f132 -
change doc formatting
Christina Theodoris17f036a -
update readthedocs.yaml
Christina Theodorise04975c -
add readthedocs yaml and req
Christina Theodoris142fe6f -
add sphinx docs
Christina Theodoris2a0dcbe
-
update dependencies, reinstate compatibility with python<3.9 with typing for List
Christina Theodoris10d3f10
-
Add option for modified batch size for loom tokenizer
Christina Theodoris0960cf6
-
Add functions for extracting gene embeddings, move state_embs_dict outside isp, fix bugs in isp
Christina Theodoris2f25aea -
Add option for modifying chunk size for anndata tokenizer
Christina Theodorisfd93ebf -
Add pre-commit config
Christina Theodoris5d0082c
-
tokenizer-uncropped-input_ids (#275)
- Adding option to keep uncropped input_ids as a feature (caec2855ca523f772b903115267a9d5468349da4) Co-authored-by: Jamie Boylan <jamieb-nvs@users.noreply.huggingface.co>8df5dc1
-
fix: incorrect condition control flow (#261)
- fix: incorrect condition control flow (4f17a922bf1dbabd36bd805967cc954b448ef000) Co-authored-by: tpob <tpob@users.noreply.huggingface.co>1366905
-
Update model card to emphasize need to install git-lfs and suggest https method
dbfac41
-
Add option to output embs as tensor
Christina Theodoris624349c
-
anndata_tokenizer (#170)
- Added anndata tokenizer and switched to Dataset.from_generator (b6ca56647a16de97f6f95785eb76cb1a965f9960) - Generalized (5cb733f4fed85e1568ba9671e5b1f9babd7b8491) - Addressed issues for tokenizer, anndata tokenizer now uses a fraction of memory (b24676d0956565ff7b4f8b57d1e936ad17f8740e) - Fixed issues (94e8d231c41a89232a55c064e5c8ea95edd51d2e) - Fixed issue, loom and h5ad now produce same checksums (9c62f4c6e3ab0afd1943079306655bd20eba2246) - Rename loom tokenizer function and modify example notebook for adata. (4fdb85061180ccf022ab761c2557be6ba67d848e) Co-authored-by: Rico Meinl <ricomnl@users.noreply.huggingface.co>4302f48
-
Fixed bugs related to overexpressing genes (#229)
- Fixed bugs related to overexpressing genes (72c65013e2fab0e3d97757f3a0af55b09a4864c7) Co-authored-by: David Wen <davidjwen@users.noreply.huggingface.co>39ab62e
-
Update installation instructions to include git lfs install and ssh method
4ce81ab
-
Config head node runtime via IP (#234)
- Config head node runtime via IP (748f48ac03faa90488220eb2f9b5a76e128a6c06) - Update minor formatting (c48e37c67945c09e6593d45c40c4cbe0df7cc757) Co-authored-by: Madhavan Venkatesh <madhavanvenkatesh@users.noreply.huggingface.co>b8fda63
-
Add memory-efficient method for computing emb summary statistics
Christina Theodoris6caf480
-
Adding `safetensors` variant of this model (#209)
- Adding `safetensors` variant of this model (bd3f711401ac83e1a40b9e1bd72fe294e191073e) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>61f15d2
-
Fixed bug with the double removing of indices when cell_states_to_model is false (#188)
- Fixed bug with the double removing of indices when cell_states_to_model is false (add6c3b33a0d94c79837cc92e1a635e9c18934e1) Co-authored-by: David Wen <davidjwen@users.noreply.huggingface.co>0adfe67 -
Upload in_silico_perturber.py (#187)
- Upload in_silico_perturber.py (5615a16ff840b805c274ee0781c6a9ac9a90b511) Co-authored-by: David Wen <davidjwen@users.noreply.huggingface.co>8180caa
-
Added feature to perturb a set of indices to help with debugging and with very large runtimes (#175)
- Added feature to perturb a set of indices to help with debugging and with very large runtimes (5488d176961bcee6c66ea1494151429fb570ba9c) - Update geneformer/in_silico_perturber.py (9151b3e978c1c138039da1090be2147b4631d903) Co-authored-by: David Wen <davidjwen@users.noreply.huggingface.co>f115e8f
-
Re-update stats to handle case of empty alt_states
Christina Theodoris78517d8 -
Add handling for case of alt_states being empty list
Christina Theodoris9e8dbe5
-
Remove print statement from PR
c4b1f94 -
Fixed bug in gen_attention_mask with len > max_len (#158)
- Fixed bug in gen_attention_mask with len > max_len (7c77bae654e0d93a27e1988e107b3258902b3d05) Co-authored-by: David Wen <davidjwen@users.noreply.huggingface.co>3a94209 -
Fixed error with perturbing individual genes and updated ways to specify cell_states_to_model (#146)
- Fixed error with perturbing individual genes and updated ways to specify cell_states_to_model (771c8bd01b1754c4387d742680e65c34697a2336) - Fix isp perturb_group dims, reformat cell states dict to keyed, add attn mask (c2679c41d352513a56feb5490c5302c6f25ae7ba) Co-authored-by: David Wen <davidjwen@users.noreply.huggingface.co>9169bfd
-
Add error message for "gene" embedding extraction under development.
Christina Theodoris65b4915 -
Update README.md
Update model card to include extracting and plotting cell embeddings as available functione820326 -
Rename heatmap legend to be correct label
Christina Theodorisbadcca6 -
Add function to extract and plot cell embeddings
Christina Theodorisd154fee