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")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("ctheodoris/Geneformer") model = AutoModelForMaskedLM.from_pretrained("ctheodoris/Geneformer") - Inference
- Notebooks
- Google Colab
- Kaggle
remove token dictionary and unpickling from init
#403
by madhavanvenkatesh - opened
- geneformer/mtl/__init__.py +1 -11
geneformer/mtl/__init__.py
CHANGED
|
@@ -1,11 +1 @@
|
|
| 1 |
-
# ruff: noqa: F401
|
| 2 |
-
from .. import TOKEN_DICTIONARY_FILE
|
| 3 |
-
import pickle
|
| 4 |
-
|
| 5 |
-
def load_token_dictionary():
|
| 6 |
-
with open(TOKEN_DICTIONARY_FILE, 'rb') as f:
|
| 7 |
-
return pickle.load(f)
|
| 8 |
-
|
| 9 |
-
TOKEN_DICTIONARY = load_token_dictionary()
|
| 10 |
-
|
| 11 |
-
__all__ = ["TOKEN_DICTIONARY"]
|
|
|
|
| 1 |
+
# ruff: noqa: F401
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|