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 ·
42053dc
1
Parent(s): ea428cb
add typing list import
Browse files
geneformer/in_silico_perturber.py
CHANGED
|
@@ -39,6 +39,7 @@ import os
|
|
| 39 |
import pickle
|
| 40 |
from collections import defaultdict
|
| 41 |
from multiprocess import set_start_method
|
|
|
|
| 42 |
|
| 43 |
import torch
|
| 44 |
from datasets import Dataset, disable_progress_bars
|
|
|
|
| 39 |
import pickle
|
| 40 |
from collections import defaultdict
|
| 41 |
from multiprocess import set_start_method
|
| 42 |
+
from typing import List
|
| 43 |
|
| 44 |
import torch
|
| 45 |
from datasets import Dataset, disable_progress_bars
|