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
a tiny bug fix missing default_training_args
#319
by icefire080 - opened
geneformer/classifier_utils.py
CHANGED
|
@@ -387,6 +387,8 @@ def get_default_train_args(model, classifier, data, output_dir):
|
|
| 387 |
"per_device_train_batch_size": batch_size,
|
| 388 |
"per_device_eval_batch_size": batch_size,
|
| 389 |
}
|
|
|
|
|
|
|
| 390 |
|
| 391 |
training_args = {
|
| 392 |
"num_train_epochs": epochs,
|
|
|
|
| 387 |
"per_device_train_batch_size": batch_size,
|
| 388 |
"per_device_eval_batch_size": batch_size,
|
| 389 |
}
|
| 390 |
+
else:
|
| 391 |
+
default_training_args = {}
|
| 392 |
|
| 393 |
training_args = {
|
| 394 |
"num_train_epochs": epochs,
|