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", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Christina Theodoris commited on
Commit ·
9d8d2f0
1
Parent(s): aea4988
silence tensor copy warning
Browse files
geneformer/collator_for_classification.py
CHANGED
|
@@ -26,8 +26,9 @@ LARGE_INTEGER = int(
|
|
| 26 |
1e20
|
| 27 |
) # This is used when we need something big but slightly smaller than VERY_LARGE_INTEGER
|
| 28 |
|
| 29 |
-
|
| 30 |
|
|
|
|
| 31 |
|
| 32 |
class ExplicitEnum(Enum):
|
| 33 |
"""
|
|
|
|
| 26 |
1e20
|
| 27 |
) # This is used when we need something big but slightly smaller than VERY_LARGE_INTEGER
|
| 28 |
|
| 29 |
+
warnings.filterwarnings("ignore", message="To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach()", category=UserWarning, module="torch")
|
| 30 |
|
| 31 |
+
# precollator functions
|
| 32 |
|
| 33 |
class ExplicitEnum(Enum):
|
| 34 |
"""
|